/* tokens.css */
/**
 * AIRP design tokens — the single source of truth for visual values.
 *
 * Visual direction: light-first familiar messaging UI with optional dark mode.
 * The Chat app keeps its own WeChat-style light surface rules.
 *
 * Cascade order is declared here so every other stylesheet can rely on it.
 */

@layer reset, base, components, app, overrides;

:root {
  color-scheme: dark;

  /* ── Grounds ─────────────────────────────────────────────── */
  --airp-bg: #0b0d12;
  --airp-bg-deep: #06070a;
  --airp-surface: #141822;
  --airp-surface-2: #1b202c;
  --airp-surface-3: #232936;
  --airp-surface-glass: rgb(20 24 34 / 72%);

  /* ── Lines ───────────────────────────────────────────────── */
  --airp-border: rgb(255 255 255 / 8%);
  --airp-border-strong: rgb(255 255 255 / 16%);
  --airp-divider: rgb(255 255 255 / 6%);

  /* ── Ink ─────────────────────────────────────────────────── */
  --airp-text: #eef1f7;
  --airp-text-2: #a7b0c2;
  --airp-text-3: #6d7688;
  --airp-text-inverse: #0b0d12;

  /* ── Accents ─────────────────────────────────────────────── */
  --airp-accent: #7c9cff;
  --airp-accent-strong: #9db4ff;
  --airp-accent-soft: rgb(124 156 255 / 16%);
  --airp-accent-ink: #0a0f1f;
  --airp-attention: #ffb27a;
  --airp-attention-soft: rgb(255 178 122 / 14%);

  /* ── Semantic ────────────────────────────────────────────── */
  --airp-danger: #ff6b6b;
  --airp-danger-soft: rgb(255 107 107 / 14%);
  --airp-success: #58d3a4;
  --airp-warn: #f5c451;

  /* ── Chat bubbles ────────────────────────────────────────── */
  --airp-bubble-self-bg: #2f4bd4;
  --airp-bubble-self-text: #f4f7ff;
  --airp-bubble-other-bg: #1e2431;
  --airp-bubble-other-text: #e9edf6;
  --airp-bubble-radius: 18px;
  --airp-bubble-tail-radius: 6px;
  --airp-bubble-font-size: 15px;
  --airp-bubble-line-height: 1.5;

  /* ── Radii ───────────────────────────────────────────────── */
  --airp-radius-xs: 6px;
  --airp-radius-sm: 10px;
  --airp-radius-md: 14px;
  --airp-radius-lg: 20px;
  --airp-radius-xl: 28px;
  --airp-radius-full: 999px;

  /* ── Spacing (4pt scale) ─────────────────────────────────── */
  --airp-space-1: 4px;
  --airp-space-2: 8px;
  --airp-space-3: 12px;
  --airp-space-4: 16px;
  --airp-space-5: 20px;
  --airp-space-6: 24px;
  --airp-space-8: 32px;
  --airp-space-10: 40px;

  /* ── Type ────────────────────────────────────────────────── */
  --airp-font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --airp-font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --airp-text-2xs: 11px;
  --airp-text-xs: 13px;
  --airp-text-sm: 13px;
  --airp-text-md: 15px;
  --airp-text-lg: 17px;
  --airp-text-xl: 20px;
  --airp-text-2xl: 24px;
  --airp-text-3xl: 30px;

  /* ── Elevation ───────────────────────────────────────────── */
  --airp-shadow-1: 0 1px 2px rgb(0 0 0 / 32%);
  --airp-shadow-2: 0 6px 20px rgb(0 0 0 / 36%);
  --airp-shadow-3: 0 18px 48px rgb(0 0 0 / 46%);
  --airp-shadow-accent: 0 8px 28px rgb(124 156 255 / 22%);

  /* ── Motion ──────────────────────────────────────────────── */
  --airp-ease: cubic-bezier(0.32, 0.72, 0, 1);
  --airp-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --airp-dur-fast: 120ms;
  --airp-dur: 220ms;
  --airp-dur-slow: 320ms;

  /* ── Layout ──────────────────────────────────────────────── */
  --airp-navbar-h: 44px;
  --airp-tabbar-h: 56px;
  --airp-tap-min: 44px;
  --airp-readable-max: 430px;

  /* ── Safe area & insets ──────────────────────────────────── */
  /* Two sources: the browser (env) and the native shell (JS-written vars).
   * The effective value is the max of both. Never assume one is present. */
  --airp-env-top: env(safe-area-inset-top, 0px);
  --airp-env-right: env(safe-area-inset-right, 0px);
  --airp-env-bottom: env(safe-area-inset-bottom, 0px);
  --airp-env-left: env(safe-area-inset-left, 0px);
  --airp-native-top: 0px;
  --airp-native-right: 0px;
  --airp-native-bottom: 0px;
  --airp-native-left: 0px;
  --airp-safe-top: max(var(--airp-env-top), var(--airp-native-top));
  --airp-safe-right: max(var(--airp-env-right), var(--airp-native-right));
  --airp-safe-bottom: max(var(--airp-env-bottom), var(--airp-native-bottom));
  --airp-safe-left: max(var(--airp-env-left), var(--airp-native-left));
  /* Live keyboard height, written by the viewport layer. 0 when closed. */
  --airp-keyboard: 0px;
  /* Current visible app height; set by the viewport layer. When the keyboard
   * opens, the chat's flex list contracts together with the input. */
  --airp-app-height: 100dvh;
}

:root[data-color-mode='light'] {
  color-scheme: light;

  --airp-bg: #f4f6fb;
  --airp-bg-deep: #e8ecf5;
  --airp-surface: #ffffff;
  --airp-surface-2: #f7f9fd;
  --airp-surface-3: #eef2f9;
  --airp-surface-glass: rgb(255 255 255 / 78%);

  --airp-border: rgb(14 20 34 / 8%);
  --airp-border-strong: rgb(14 20 34 / 16%);
  --airp-divider: rgb(14 20 34 / 6%);

  --airp-text: #131824;
  --airp-text-2: #5b657a;
  --airp-text-3: #8b94a6;
  --airp-text-inverse: #ffffff;

  --airp-accent: #3f5fd8;
  --airp-accent-strong: #2f4bc0;
  --airp-accent-soft: rgb(63 95 216 / 12%);
  --airp-accent-ink: #ffffff;
  --airp-attention: #c9713a;
  --airp-attention-soft: rgb(201 113 58 / 12%);

  --airp-danger: #d64545;
  --airp-danger-soft: rgb(214 69 69 / 12%);
  --airp-success: #1f9c74;
  --airp-warn: #b8860b;

  --airp-bubble-self-bg: #3f5fd8;
  --airp-bubble-self-text: #ffffff;
  --airp-bubble-other-bg: #ffffff;
  --airp-bubble-other-text: #131824;

  --airp-shadow-1: 0 1px 2px rgb(14 20 34 / 6%);
  --airp-shadow-2: 0 6px 20px rgb(14 20 34 / 8%);
  --airp-shadow-3: 0 18px 48px rgb(14 20 34 / 12%);
  --airp-shadow-accent: 0 8px 28px rgb(63 95 216 / 18%);
}

/* global.css */
@layer reset, base, components, app, overrides;

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

  html,
  body {
    margin: 0;
    padding: 0;
    height: 100%;
    /* dvh keeps the layout correct while mobile browser chrome animates. */
    min-height: 100dvh;
    overscroll-behavior-y: none;
  }

  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
  }

  body {
    font-family: var(--airp-font);
    font-size: var(--airp-text-md);
    line-height: 1.45;
    color: var(--airp-text);
    background: var(--airp-bg);
    /* Mobile app, not a document: no rubber-band page scroll, no text select
     * on chrome. Text selection is re-enabled where it matters (messages). */
    overflow: hidden;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
  }

  h1,
  h2,
  h3,
  h4,
  p,
  figure {
    margin: 0;
  }

  ul,
  ol {
    margin: 0;
    padding: 0;
    list-style: none;
  }

  button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    touch-action: manipulation;
  }

  input,
  textarea,
  select {
    font: inherit;
    color: inherit;
    /* System keyboard + system emoji picker only. No bundled emoji panel. */
  }

  textarea {
    resize: none;
  }

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

  a {
    color: var(--airp-accent);
    text-decoration: none;
  }

  :focus-visible {
    outline: 2px solid var(--airp-accent);
    outline-offset: 2px;
  }

  ::-webkit-scrollbar {
    width: 0;
    height: 0;
  }
}

@layer base {
  #airp-root {
    height: 100dvh;
    display: flex;
    flex-direction: column;
    /* Horizontal centering for desktop preview only; the app is mobile-first
     * and never becomes a desktop layout. */
    align-items: center;
    background: var(--airp-bg-deep);
  }

  .boot-splash {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    background: var(--airp-bg);
  }

  .boot-splash__pulse {
    width: 44px;
    height: 44px;
    border-radius: var(--airp-radius-full);
    background: var(--airp-accent);
    opacity: 0.5;
    animation: airp-pulse 1.4s var(--airp-ease) infinite;
  }

  @keyframes airp-pulse {
    0%,
    100% {
      transform: scale(0.72);
      opacity: 0.28;
    }
    50% {
      transform: scale(1);
      opacity: 0.7;
    }
  }

  .airp-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  @media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
      animation-duration: 0.001ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.001ms !important;
      scroll-behavior: auto !important;
    }
  }
}

@layer components {
  /* ── Buttons ─────────────────────────────────────────────── */
  .airp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--airp-space-2);
    min-height: var(--airp-tap-min);
    padding: 0 var(--airp-space-4);
    border-radius: var(--airp-radius-md);
    font-size: var(--airp-text-md);
    font-weight: 600;
    transition: background var(--airp-dur-fast) var(--airp-ease),
      opacity var(--airp-dur-fast) var(--airp-ease),
      transform var(--airp-dur-fast) var(--airp-ease);
  }

  .airp-btn:active:not(:disabled) {
    transform: scale(0.97);
  }

  .airp-btn:disabled {
    opacity: 0.45;
    cursor: default;
  }

  .airp-btn--primary {
    background: var(--airp-accent);
    color: var(--airp-accent-ink);
    box-shadow: var(--airp-shadow-accent);
  }

  .airp-btn--secondary {
    background: var(--airp-surface-3);
    color: var(--airp-text);
  }

  .airp-btn--ghost {
    background: transparent;
    color: var(--airp-text-2);
  }

  .airp-btn--danger {
    background: var(--airp-danger-soft);
    color: var(--airp-danger);
  }

  .airp-btn--block {
    width: 100%;
  }

  .airp-btn--sm {
    min-height: 34px;
    padding: 0 var(--airp-space-3);
    font-size: var(--airp-text-sm);
    border-radius: var(--airp-radius-sm);
  }

  /* ── Icon button ─────────────────────────────────────────── */
  .airp-iconbtn {
    display: inline-grid;
    place-items: center;
    width: var(--airp-tap-min);
    height: var(--airp-tap-min);
    min-width: var(--airp-tap-min);
    min-height: var(--airp-tap-min);
    padding: 0;
    border: 0;
    background: transparent;
    flex-shrink: 0;
    border-radius: var(--airp-radius-full);
    color: var(--airp-text-2);
    transition: background var(--airp-dur-fast) var(--airp-ease),
      color var(--airp-dur-fast) var(--airp-ease);
  }

  .airp-iconbtn:active {
    background: var(--airp-surface-3);
    color: var(--airp-text);
  }

  .airp-iconbtn--sm {
    width: var(--airp-tap-min);
    height: var(--airp-tap-min);
  }

  /* ── Avatar ──────────────────────────────────────────────── */
  .airp-avatar {
    position: relative;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: var(--airp-radius-full);
    background: var(--airp-surface-3);
    color: var(--airp-text-2);
    font-weight: 700;
    user-select: none;
  }

  .airp-avatar > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .airp-avatar--squircle {
    border-radius: 30%;
  }

  .airp-avatar__dot {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 26%;
    height: 26%;
    min-width: 8px;
    min-height: 8px;
    border-radius: var(--airp-radius-full);
    border: 2px solid var(--airp-bg);
    background: var(--airp-success);
  }

  /* ── List row ────────────────────────────────────────────── */
  .airp-row {
    display: flex;
    align-items: center;
    gap: var(--airp-space-3);
    width: 100%;
    min-height: 56px;
    padding: var(--airp-space-2) var(--airp-space-4);
    text-align: left;
    background: transparent;
    transition: background var(--airp-dur-fast) var(--airp-ease);
  }

  .airp-row:active {
    background: var(--airp-surface-2);
  }

  .airp-row__body {
    flex: 1 1 auto;
    min-width: 0;
  }

  .airp-row__title {
    font-size: var(--airp-text-md);
    font-weight: 600;
    color: var(--airp-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .airp-row__sub {
    margin-top: 2px;
    font-size: var(--airp-text-sm);
    color: var(--airp-text-3);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .airp-row__trail {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: var(--airp-space-2);
    color: var(--airp-text-3);
    font-size: var(--airp-text-xs);
  }

  /* ── Badge / chip ────────────────────────────────────────── */
  .airp-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--airp-space-1);
    padding: 4px var(--airp-space-2);
    border-radius: var(--airp-radius-full);
    background: var(--airp-surface-3);
    color: var(--airp-text-2);
    font-size: var(--airp-text-2xs);
    font-weight: 600;
  }

  .airp-chip--accent {
    background: var(--airp-accent-soft);
    color: var(--airp-accent-strong);
  }

  .airp-chip--attention {
    background: var(--airp-attention-soft);
    color: var(--airp-attention);
  }

  .airp-chip--danger {
    background: var(--airp-danger-soft);
    color: var(--airp-danger);
  }

  .airp-badge {
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: var(--airp-radius-full);
    background: var(--airp-danger);
    color: #fff;
    font-size: var(--airp-text-2xs);
    font-weight: 700;
    display: inline-grid;
    place-items: center;
  }

  /* ── Field ───────────────────────────────────────────────── */
  .airp-field {
    display: block;
    padding: var(--airp-space-3) var(--airp-space-4);
  }

  .airp-field__label {
    display: flex;
    align-items: baseline;
    gap: var(--airp-space-2);
    margin-bottom: var(--airp-space-2);
    font-size: var(--airp-text-sm);
    font-weight: 600;
    color: var(--airp-text-2);
  }

  .airp-field__hint {
    font-size: var(--airp-text-xs);
    font-weight: 400;
    color: var(--airp-text-3);
  }

  .airp-field__control {
    width: 100%;
    min-height: var(--airp-tap-min);
    padding: var(--airp-space-3);
    border: 1px solid var(--airp-border);
    border-radius: var(--airp-radius-md);
    background: var(--airp-surface-2);
    color: var(--airp-text);
    font-size: var(--airp-text-md);
    -webkit-user-select: text;
    user-select: text;
  }

  .airp-field__control:focus {
    border-color: var(--airp-accent);
    outline: none;
  }

  .airp-field__control--area {
    min-height: 96px;
    line-height: 1.5;
  }

  /* ── Section ─────────────────────────────────────────────── */
  .airp-section {
    margin: var(--airp-space-4) 0;
    background: var(--airp-surface);
    border: 1px solid var(--airp-border);
    border-radius: var(--airp-radius-lg);
    overflow: hidden;
  }

  .airp-section__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--airp-space-2);
    padding: var(--airp-space-3) var(--airp-space-4);
    border-bottom: 1px solid var(--airp-divider);
  }

  .airp-section__title {
    font-size: var(--airp-text-sm);
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--airp-text-2);
  }

  .airp-section__body {
    padding: var(--airp-space-1) 0;
  }

  /* ── Switch ──────────────────────────────────────────────── */
  .airp-switch {
    position: relative;
    flex: 0 0 auto;
    width: 48px;
    height: 30px;
    border-radius: var(--airp-radius-full);
    background: var(--airp-surface-3);
    transition: background var(--airp-dur) var(--airp-ease);
  }

  .airp-switch[data-on='true'] {
    background: var(--airp-accent);
  }

  .airp-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    border-radius: var(--airp-radius-full);
    background: #fff;
    box-shadow: var(--airp-shadow-1);
    transition: transform var(--airp-dur) var(--airp-ease);
  }

  .airp-switch[data-on='true']::after {
    transform: translateX(18px);
  }

  /* ── Empty / spinner ─────────────────────────────────────── */
  .airp-empty {
    display: grid;
    place-items: center;
    gap: var(--airp-space-3);
    padding: var(--airp-space-10) var(--airp-space-6);
    text-align: center;
    color: var(--airp-text-3);
  }

  .airp-empty__title {
    font-size: var(--airp-text-md);
    font-weight: 600;
    color: var(--airp-text-2);
  }

  .airp-empty__text {
    font-size: var(--airp-text-sm);
    max-width: 30ch;
    line-height: 1.6;
  }

  .airp-spinner {
    width: 18px;
    height: 18px;
    border-radius: var(--airp-radius-full);
    border: 2px solid var(--airp-border-strong);
    border-top-color: var(--airp-accent);
    animation: airp-spin 0.7s linear infinite;
  }

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

  /* ── Toast ───────────────────────────────────────────────── */
  .airp-toasts {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(var(--airp-safe-bottom) + 76px);
    z-index: 60;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--airp-space-2);
    width: min(var(--airp-readable-max), calc(100vw - 32px));
    pointer-events: none;
  }

  .airp-toast {
    max-width: 100%;
    padding: var(--airp-space-3) var(--airp-space-4);
    border-radius: var(--airp-radius-md);
    background: var(--airp-surface-3);
    border: 1px solid var(--airp-border-strong);
    box-shadow: var(--airp-shadow-2);
    color: var(--airp-text);
    font-size: var(--airp-text-sm);
    line-height: 1.45;
    animation: airp-toast-in var(--airp-dur) var(--airp-ease-out);
  }

  .airp-toast--error {
    border-color: var(--airp-danger);
    color: var(--airp-danger);
  }

  @keyframes airp-toast-in {
    from {
      opacity: 0;
      transform: translateY(8px);
    }
  }

  /* ── Sheet ───────────────────────────────────────────────── */
  .airp-scrim {
    position: fixed;
    inset: 0;
    z-index: 70;
    background: rgb(0 0 0 / 48%);
    animation: airp-fade-in var(--airp-dur) var(--airp-ease);
  }

  @keyframes airp-fade-in {
    from {
      opacity: 0;
    }
  }

  .airp-sheet {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    z-index: 71;
    width: min(var(--airp-readable-max), 100vw);
    max-height: min(80dvh, 640px);
    display: flex;
    flex-direction: column;
    border-radius: var(--airp-radius-xl) var(--airp-radius-xl) 0 0;
    background: var(--airp-surface);
    border: 1px solid var(--airp-border);
    border-bottom: 0;
    box-shadow: var(--airp-shadow-3);
    padding-bottom: var(--airp-safe-bottom);
    animation: airp-sheet-up var(--airp-dur-slow) var(--airp-ease-out);
  }

  @keyframes airp-sheet-up {
    from {
      transform: translate(-50%, 24px);
      opacity: 0.4;
    }
  }

  /* ── Centred modal ──────────────────────────────────────── */
  /* Sits above the sheet layer: a modal can be opened from a sheet's action. */
  .airp-modal {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 72;
    width: min(340px, calc(100vw - 48px));
    border-radius: var(--airp-radius-lg);
    background: var(--airp-surface);
    box-shadow: var(--airp-shadow-3);
    animation: airp-modal-in var(--airp-dur-slow) var(--airp-ease-out);
  }

  @keyframes airp-modal-in {
    from {
      transform: translate(-50%, -50%) scale(0.92);
      opacity: 0;
    }
  }

  .airp-modal__close {
    position: absolute;
    top: var(--airp-space-2);
    right: var(--airp-space-2);
    z-index: 1;
    display: grid;
    place-items: center;
    width: var(--airp-tap-min);
    height: var(--airp-tap-min);
    border-radius: var(--airp-radius-full);
    font-size: 24px;
    line-height: 1;
    color: var(--airp-text-3);
  }

  .airp-modal__close:active {
    background: var(--airp-surface-3);
  }

  .airp-sheet__grab {
    flex: 0 0 auto;
    width: 40px;
    height: 4px;
    margin: var(--airp-space-2) auto var(--airp-space-1);
    border-radius: var(--airp-radius-full);
    background: var(--airp-border-strong);
  }

  .airp-sheet__head {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--airp-space-3);
    padding: var(--airp-space-2) var(--airp-space-4) var(--airp-space-3);
  }

  .airp-sheet__title {
    font-size: var(--airp-text-lg);
    font-weight: 700;
  }

  .airp-sheet__body {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 var(--airp-space-4) var(--airp-space-4);
  }

  /* ── Action sheet (long-press menu) ──────────────────────── */
  .airp-actions {
    display: flex;
    flex-direction: column;
    padding: var(--airp-space-2) var(--airp-space-3) var(--airp-space-4);
    gap: var(--airp-space-1);
  }

  .airp-actions__group {
    display: flex;
    flex-direction: column;
    padding: var(--airp-space-1) 0;
  }

  .airp-actions__group + .airp-actions__group {
    border-top: 1px solid var(--airp-divider);
    margin-top: var(--airp-space-1);
    padding-top: var(--airp-space-2);
  }

  .airp-actions__item {
    display: flex;
    align-items: center;
    gap: var(--airp-space-3);
    min-height: var(--airp-tap-min);
    padding: 0 var(--airp-space-3);
    border-radius: var(--airp-radius-sm);
    text-align: left;
    font-size: var(--airp-text-md);
    font-weight: 500;
  }

  .airp-actions__item:active {
    background: var(--airp-surface-2);
  }

  .airp-actions__item--danger {
    color: var(--airp-danger);
  }

  .airp-actions__item[disabled] {
    opacity: 0.4;
  }

  .airp-actions__icon {
    display: grid;
    place-items: center;
    width: 22px;
    color: var(--airp-text-3);
  }
}

@layer app {
  /* 角色活人感：一行一项，开关在右侧。
   *
   * 不用三态选择器。第一版设计里「跟随默认」是第三态，但那只在存在全局开关时才有意义 ——
   * 而全局开关已经去掉（默认全关时它只会和角色清单争抢同一个答案）。
   * 剩下的第三态只能是「回退到出厂值」，也就是「关」换了件衣服。 */
  .airp-life-features { display: flex; flex-direction: column; }
  .airp-life-feature {
    display: flex;
    align-items: center;
    gap: var(--airp-space-3);
    padding: var(--airp-space-3) 0;
    border-bottom: 1px solid var(--airp-divider);
  }
  .airp-life-feature:last-child { border-bottom: 0; }
  .airp-life-feature__text { flex: 1 1 auto; min-width: 0; }
  .airp-life-feature__label { font-size: var(--airp-text-sm); }
  .airp-life-feature__detail {
    margin-top: 2px;
    color: var(--airp-text-3);
    font-size: var(--airp-text-2xs);
    line-height: 1.4;
  }
}

@layer app {
  /* 活人感：一个总开关 + 展开后的逐项开关。
   *
   * 总开关是**推导出来的**（有没有任何一项开着），不是单独存的一个标志位。
   * 这样不可能出现「总开关开着但一项都没选」这种看起来像坏了、又没有任何含义的状态。 */
  .airp-life__master {
    display: flex;
    align-items: center;
    gap: var(--airp-space-3);
    padding: var(--airp-space-2) 0;
  }
  .airp-life__master-text { flex: 1 1 auto; min-width: 0; }
  .airp-life__master-label { font-size: var(--airp-text-sm); font-weight: 600; }
  .airp-life__master-detail {
    margin-top: 2px;
    color: var(--airp-text-3);
    font-size: var(--airp-text-2xs);
    line-height: 1.4;
  }
}

@layer app {
  /* 会话信息页里的「一次回复几条」：RangeEditor 复用群旁观的样式，
   * 这里只处理它在 messenger-field 里的排布。 */
  .messenger-field > .airp-observer__count,
  .messenger-field > .airp-observer__edit {
    align-self: flex-start;
  }
  .messenger-field > .airp-observer__count {
    min-height: var(--airp-tap-min);
  }
}

/* beauty.css */
@layer app {
/* The showroom keeps its own light palette across desktop and chat themes. */
.airp-screen:has(.beauty-store){color-scheme:only light;--airp-bg:#faf9fc;--airp-surface:#fff;--airp-surface-2:#f3eef9;--airp-text:#342842;--airp-text-2:#776982;--airp-text-3:#8e819a;--airp-border:#e9e1f1;--airp-divider:#eee8f4;--airp-accent:#9672c2;--airp-accent-soft:#eee5f8;background:#faf9fc;color:#342842}
.airp-screen:has(.beauty-store) .airp-screen__header{background:#fff;border-bottom:1px solid #eee8f4}.beauty-store{padding:12px 16px 32px;color:#342842}.beauty-store h3{font-size:15px;margin:0 0 12px;font-weight:650}.beauty-store p{font-size:13px;color:#8e819a;line-height:1.7;margin:8px 0 12px}.beauty-store button{cursor:pointer}.beauty-store button:disabled{cursor:default;opacity:.45}.beauty-store .airp-btn--primary{background:#9876c2;color:#fff;border:1px solid #9876c2}.beauty-store .airp-btn--secondary{background:#f1ebf8;color:#70558b;border:1px solid #e6dcf0}.beauty-store .airp-btn--ghost{color:#8e819a;background:transparent}.beauty-store-tabs{display:flex;gap:4px;position:sticky;top:0;background:#faf9fc;padding:4px 0 12px;z-index:2;border-bottom:1px solid #e9e1f1;margin-bottom:16px}.beauty-store-tabs button{position:relative;flex:1;border:0;background:transparent;color:#8e819a;border-radius:0;padding:8px 2px;font-size:13px;white-space:nowrap}.beauty-store-tabs button[aria-pressed=true]{color:#8b61bd;font-weight:650}.beauty-store-tabs button[aria-pressed=true]:after{content:'';position:absolute;bottom:-12px;height:3px;background:#a27bc9;left:14%;right:14%;border-radius:6px}
.beauty-section{padding:16px;background:#fff;border:1px solid #e9e1f1;border-radius:20px;margin:12px 0;box-shadow:0 3px 12px #66527e05}.beauty-field{display:flex;flex-direction:column;gap:8px;font-size:13px;color:#776982;margin:12px 0}.beauty-store input:not([type=checkbox]):not([type=color]),.beauty-store select{width:100%;min-width:0;box-sizing:border-box;border-radius:14px;border:1px solid #e6deee;padding:12px;background:#fcfaff;color:#342842;font-size:13px}.beauty-store-actions{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 0}.beauty-store-row{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:12px 0;border-bottom:1px solid #eee8f4;font-size:13px}.beauty-store-row h3{margin:0}.beauty-added-notice{display:flex;align-items:center;justify-content:space-between;gap:8px;background:#eee5f8;padding:8px 12px;border-radius:14px;font-size:13px;margin:12px 0}
.beauty-store-icon-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 8px}.beauty-store-icon-option{display:flex;flex-direction:column;align-items:center;gap:8px;font-size:13px;padding:12px 2px;background:#fcfaff;border:1px solid #eee6f5;border-radius:14px}.beauty-store-icon-option button{border:1px solid #e5d9f1;padding:8px 8px;border-radius:10px;background:#efe6f8;color:#7e5ba6;font-size:11px}.beauty-store-icon-option button:last-child{border:0;background:none;font-size:11px;color:#95869f}.beauty-store-icon{display:grid;place-items:center;background:#fffdfd;width:54px;height:54px;border-radius:14px;overflow:hidden;color:var(--desktop-accent,#a18ac1)}.beauty-store-icon svg{width:36px;height:36px}.beauty-store-icon img{width:100%;height:100%;object-fit:cover}.beauty-store-icon.is-custom{background:transparent;box-shadow:none;border-radius:0;overflow:visible}.beauty-store-icon.is-custom img{object-fit:contain}.beauty-dock-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.beauty-store-check{display:flex;align-items:center;gap:8px;padding:8px;background:#faf7fd;border-radius:10px;font-size:13px}.beauty-store-check input{accent-color:#9876c2}
.beauty-theme-showcase{display:flex;align-items:center;gap:16px;margin:16px 0}.beauty-theme-summary{display:flex;flex:1;min-width:0;flex-direction:column;align-items:flex-start;gap:8px}.beauty-theme-summary strong{font-size:13px;overflow-wrap:anywhere}.beauty-theme-summary p{margin:0;font-size:11px}.beauty-status{border-radius:10px;background:#f2eafa;color:#9171b5;padding:4px 8px;font-size:11px}.beauty-theme-preview{flex:none;width:154px;height:192px;box-sizing:border-box;position:relative;overflow:hidden;border-radius:20px;border:1px solid #e0d8e8;background-size:cover;background-position:center;padding:12px;box-shadow:0 4px 12px #60586d13}.beauty-theme-mini-grid{height:143px;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(6,minmax(0,1fr));gap:4px}.beauty-theme-mini-grid>div{min-width:0;min-height:0;display:flex;justify-content:center}.beauty-theme-preview .beauty-store-icon{width:21px;height:21px;border-radius:6px}.beauty-theme-preview .beauty-store-icon svg{width:16px;height:16px}.beauty-theme-preview .beauty-widget-stack{width:100%;gap:0}.beauty-theme-preview small{display:none}.beauty-theme-preview .beauty-photo,.beauty-theme-preview .beauty-clock{border-radius:6px!important;width:100%}.beauty-theme-preview .beauty-clock-time{font-size:20px}.beauty-theme-preview .beauty-clock-date{display:none}.beauty-theme-preview .beauty-clock-panel{border-radius:6px}.beauty-theme-preview .beauty-camera{height:100%;padding:8px 12px 4px 4px;border-radius:6px}.beauty-theme-preview .beauty-camera>span{font-size:11px;top:3px;left:5px}.beauty-theme-preview .beauty-camera-screen{border-width:1px;border-radius:6px}.beauty-theme-preview .beauty-camera-lens{width:7px;height:7px;right:3px;border-width:1px}.beauty-theme-preview .beauty-decor{font-size:0;padding:0;gap:0}.beauty-theme-preview .beauty-decor svg{width:18px;height:18px}.beauty-theme-mini-dock{display:flex;justify-content:space-around;gap:4px;margin-top:8px;border-radius:10px;padding:4px;background:#ffffff77}.beauty-theme-mini-dock .beauty-store-icon{width:17px;height:17px}.beauty-theme-mini-dock .beauty-store-icon svg{width:13px;height:13px}
.beauty-store-widget-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.beauty-store-widget-card{display:flex;flex-direction:column;align-items:center;gap:8px;padding:8px;border:1px solid #eee6f5;border-radius:14px;background:#fcfaff}.beauty-store-widget-card>span{font-size:13px}.beauty-store-widget-preview{height:100px;width:100%;overflow:hidden;color:#a18ac1}.beauty-store-widget-preview small,.beauty-store-widget-preview .beauty-decor span,.beauty-editor-preview small{display:none}.beauty-store-widget-preview .beauty-widget-stack,.beauty-editor-preview .beauty-widget-stack{gap:0}.beauty-store-widget-preview .beauty-clock-time{font-size:30px}.beauty-store-widget-preview .beauty-clock-date{font-size:11px}.beauty-installed-widget{display:grid;grid-template-columns:100px minmax(0,1fr);align-items:center;gap:12px;border-top:1px solid #eee8f4;padding:16px 0}.beauty-installed-widget strong{font-size:13px}.beauty-installed-widget p{margin:4px 0;font-size:11px}.beauty-installed-widget .beauty-store-actions{margin:8px 0 0}.beauty-editor-preview{width:100%;max-height:280px;margin:12px auto 20px;background:#eeedf1;border-radius:14px;overflow:hidden;color:#a18ac1}.beauty-widget-editor fieldset{border:0;padding:0;margin:16px 0}.beauty-widget-editor legend{font-size:13px;margin-bottom:8px;color:#776982}.beauty-choice-row{display:flex;gap:8px;flex-wrap:wrap}.beauty-choice-row button{border:1px solid #e5d9f1;background:#faf7fd;color:#8e819a;border-radius:10px;padding:8px 12px;font-size:13px}.beauty-choice-row button[aria-pressed=true]{background:#eee1fa;color:#8055ad;border-color:#bfa3dc}.beauty-background-preview{height:180px;border:1px solid #e9e1f1;border-radius:14px;overflow:hidden;display:grid;place-items:center;color:#8e819a;font-size:13px}.beauty-background-preview img{width:100%;height:100%;object-fit:cover}
@media(max-width:350px){.beauty-section{padding:12px}.beauty-theme-showcase{gap:8px}.beauty-theme-summary .airp-btn{padding:8px;font-size:11px}.beauty-theme-summary p{font-size:11px}.beauty-store{padding:8px}.beauty-installed-widget{grid-template-columns:82px minmax(0,1fr)}}
}
@layer app {
.beauty-store-widget-preview .beauty-calendar-month{font-size:11px}.beauty-store-widget-preview .beauty-calendar-grid{font-size:11px;gap:1px}.beauty-theme-preview .beauty-calendar-month{font-size:11px;margin-bottom:1px}.beauty-theme-preview .beauty-calendar-grid{font-size:11px;gap:0}.beauty-theme-preview .beauty-calendar-grid span{border-radius:6px;border-width:.5px}.beauty-widget-editor .airp-color-control{border-bottom:1px solid #eee8f4}.beauty-store-widget-preview:has(.beauty-roman){aspect-ratio:1;max-width:100px}.beauty-editor-preview:has(.beauty-roman){max-width:240px;max-height:240px}
}

/* characters.css */
@layer app {
  /* ── Character library ─────────────────────────────────────────────────── */

  .airp-charlist__tagline {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* ── Character detail ──────────────────────────────────────────────────── */

  .airp-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--airp-space-3);
    padding: var(--airp-space-6) var(--airp-space-4) var(--airp-space-4);
    text-align: center;
  }

  .airp-hero__name {
    font-size: var(--airp-text-xl);
    font-weight: 700;
    letter-spacing: -0.01em;
  }

  .airp-hero__sub {
    font-size: var(--airp-text-xs);
    color: var(--airp-text-3);
  }

  .airp-hero__actions {
    display: flex;
    gap: var(--airp-space-2);
    width: 100%;
    margin-top: var(--airp-space-1);
  }

  .airp-text {
    padding: var(--airp-space-3) var(--airp-space-4);
    font-size: var(--airp-text-sm);
    line-height: 1.7;
    color: var(--airp-text-2);
    white-space: pre-wrap;
    -webkit-user-select: text;
    user-select: text;
  }

  /* Progressive disclosure: the advanced layer is a collapsible header, closed
   * by default, so a normal user never meets a developer field. */
  .airp-disclosure {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: var(--airp-space-3) var(--airp-space-4);
    background: var(--airp-surface);
    border: 1px solid var(--airp-border);
    border-radius: var(--airp-radius-lg);
    margin: var(--airp-space-4) 0;
    font-size: var(--airp-text-sm);
    font-weight: 600;
    color: var(--airp-text-2);
  }

  .airp-disclosure__chevron {
    transition: transform var(--airp-dur) var(--airp-ease);
  }

  .airp-disclosure[aria-expanded='true'] .airp-disclosure__chevron {
    transform: rotate(90deg);
  }

  .airp-warning {
    display: flex;
    gap: var(--airp-space-2);
    padding: var(--airp-space-2) var(--airp-space-4);
    font-size: var(--airp-text-xs);
    line-height: 1.6;
    color: var(--airp-attention);
    border-bottom: 1px solid var(--airp-divider);
  }

  .airp-warning:last-child {
    border-bottom: 0;
  }

  .airp-warning__code {
    flex: 0 0 auto;
    font-family: var(--airp-font-mono);
    opacity: 0.7;
    font-size: 11px;
    padding-top: 1px;
  }

  .airp-kv {
    display: grid;
    grid-template-columns: minmax(84px, auto) 1fr;
    gap: 4px var(--airp-space-3);
    padding: var(--airp-space-3) var(--airp-space-4);
    font-size: var(--airp-text-xs);
  }

  .airp-kv__k {
    color: var(--airp-text-3);
  }

  .airp-kv__v {
    color: var(--airp-text-2);
    word-break: break-word;
    font-family: var(--airp-font-mono);
  }

  .airp-raw {
    margin: var(--airp-space-3) var(--airp-space-4);
    padding: var(--airp-space-3);
    max-height: 320px;
    overflow: auto;
    border-radius: var(--airp-radius-md);
    background: var(--airp-bg-deep);
    border: 1px solid var(--airp-border);
    font-family: var(--airp-font-mono);
    font-size: 11px;
    line-height: 1.5;
    color: var(--airp-text-2);
    white-space: pre;
    -webkit-user-select: text;
    user-select: text;
  }

  .airp-fab {
    position: absolute;
    right: var(--airp-space-4);
    bottom: calc(var(--airp-safe-bottom) + var(--airp-space-5));
    z-index: 30;
    display: inline-flex;
    align-items: center;
    gap: var(--airp-space-2);
    height: 48px;
    padding: 0 var(--airp-space-4);
    border-radius: var(--airp-radius-full);
    background: var(--airp-accent);
    color: var(--airp-accent-ink);
    border: 0;
    font-size: var(--airp-text-sm);
    font-weight: 700;
    box-shadow: var(--airp-shadow-accent);
  }

  .airp-fab:active {
    transform: scale(0.96);
  }
}

@layer app {
  .airp-card-editor-avatar { display:flex; align-items:center; gap:16px; padding:16px; }
  .airp-card-editor-advanced { margin:16px; padding:12px; border:1px solid var(--airp-border); border-radius:14px; }
  .airp-card-editor-save { padding:16px 16px 32px; }
  .airp-card-preview { margin:8px 16px; padding:12px; border:1px solid var(--airp-border); border-radius:14px; }
  .airp-card-preview summary { cursor:pointer; font-weight:600; }
  .airp-card-preview .airp-text { padding:12px 0 0; }
  .airp-lore-bindings { padding:0 16px 16px; display:grid; gap:8px; }
  .airp-lore-binding-row { display:flex; justify-content:space-between; gap:12px; align-items:center; }
}

/* library.css */
.airp-library { display: grid; gap: var(--airp-space-4); }

@layer app {
  /* ── Grids ───────────────────────────────────────────────── */
  /* `auto-fill` with a fixed minimum keeps a sticker square on a 360px screen
   * and does not stretch it to a landscape tablet's full width. */
  .airp-library__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
    gap: var(--airp-space-2);
  }

  .airp-library__cell {
    position: relative;
    display: grid;
    justify-items: center;
    gap: var(--airp-space-1);
    padding: var(--airp-space-2) var(--airp-space-1);
    border: 1px solid transparent;
    border-radius: var(--airp-radius-md);
    background: var(--airp-surface-2);
    color: var(--airp-text-2);
    font-size: var(--airp-text-2xs);
  }

  .airp-library__thumb {
    display: block;
    width: 100%;
    min-width: 0;
    border: 0;
    padding: 0;
    background: transparent;
    border-radius: var(--airp-radius-sm);
    overflow: hidden;
  }

  /* The favorite pin sits in the cell's top-right corner, clear of the image. */
  .airp-library__fav {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: #fff;
    color: #c3a8d8;
    box-shadow: 0 1px 4px #593d6e26;
  }

  .airp-library__fav.is-on {
    color: #d4577f;
    background: #ffeef4;
  }

  .airp-library__fav:hover {
    transform: scale(1.08);
  }

  .airp-library__cell--on {
    border-color: var(--airp-accent);
    background: var(--airp-accent-soft);
    color: var(--airp-accent-strong);
  }

  .airp-library__caption {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* A row's actions are siblings of the row, never nested buttons: a row that
   * navigates is itself a <button>, and nesting is invalid HTML. */
  .airp-library__rowactions {
    display: flex;
    align-items: center;
    gap: var(--airp-space-1);
  }

  .airp-library__viewer {
    display: grid;
    place-items: center;
    padding: var(--airp-space-3);
    border-radius: var(--airp-radius-lg);
    background: var(--airp-surface-2);
    /* Checkerboard-free but neutral: a transparent PNG needs a surface that is
     * not the page background to be readable. */
    border: 1px solid var(--airp-border);
  }
}

.library-screen{height:100%;min-height:0;color:#51475f}.library-screen .airp-screen{background:#f7f3fa}.library-home{max-width:850px;margin:auto;display:grid;gap:20px;padding:4px 0 24px}.library-intro{position:relative;padding:24px;border:1px solid #e8dff0;border-radius:20px;background:linear-gradient(135deg,#f1e6fb,#fff9f5);overflow:hidden}.library-kicker{font-size:11px;letter-spacing:2px;color:#9474ac}.library-intro h2{font-size:24px;line-height:1.4;font-weight:600;margin:12px 0;color:#554162}.library-intro p{font-size:13px;line-height:1.8;color:#8a7d94;margin:0}.library-stats{display:flex;gap:32px;margin-top:24px;color:#9a8ca4;font-size:11px}.library-stats strong{font-size:24px;font-weight:500;color:#8864a1;margin-right:4px}.library-categories{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.library-categories>button{display:flex;flex-direction:column;align-items:flex-start;gap:8px;text-align:left;padding:20px 16px;border:1px solid #e9e1ef;border-radius:20px;background:#fff;color:#66516f;min-width:0;box-shadow:0 5px 18px #6e4b8510}.library-category-icon{display:grid;place-items:center;width:58px;height:58px;border-radius:20px;background:#f1e8f9;color:#a087b7;margin-bottom:4px}.library-categories strong{font-size:17px;font-weight:600}.library-categories button>span:not(.library-category-icon){font-size:11px;line-height:1.7;color:#9b8ca4}.library-categories b{font-size:11px;font-weight:500;color:#9a75b0;margin-top:4px}.library-recent{padding:20px;border:1px solid #e9e1ef;border-radius:20px;background:#fff}.library-section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}.library-section-heading h3{font-size:13px;font-weight:600;margin:0}.library-section-heading button,.library-blank button{font:inherit;font-size:11px;border:0;background:#f5effa;color:#9672ae;padding:8px 12px;border-radius:14px}.library-preview-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.library-preview-grid>button{padding:0;border:0;border-radius:14px;aspect-ratio:1;overflow:hidden;background:#f1edf5}.library-preview-grid img{width:100%;height:100%;object-fit:cover}.library-blank{padding:24px 0;display:flex;flex-direction:column;align-items:center;gap:12px;color:#b5a5c0}.library-blank p{font-size:13px;margin:0}.library-screen .airp-section{border-color:#e9e1ef;border-radius:20px;overflow:hidden;box-shadow:0 5px 18px #6e4b8508}.library-screen .airp-library__grid{gap:12px;padding:12px 0}.library-screen .airp-library__cell{border-radius:14px;background:#f6f1fa;padding:12px 8px;border-color:#eee5f4}.library-screen .airp-btn{border-radius:14px}.library-screen input{border-radius:14px}
@media(min-width:650px){.library-home{padding:12px 24px 32px}.library-intro{padding:32px}.library-preview-grid{grid-template-columns:repeat(6,minmax(0,1fr))}}

.library-screen .airp-screen{color-scheme:only light;--airp-bg:#faf9fc;--airp-surface:#fff;--airp-surface-2:#f3eef9;--airp-text:#342842;--airp-text-2:#776982;--airp-text-3:#8e819a;--airp-border:#e9e1f1;--airp-divider:#eee8f4;--airp-accent:#9672c2;--airp-accent-soft:#eee5f8;background:#faf9fc;color:#342842}

.library-screen{display:flex;flex-direction:column;flex:1;overflow:hidden}.library-screen>.airp-screen{flex:1;min-height:0;height:100%}.library-screen .airp-screen__body{min-height:0;overflow-y:auto;touch-action:pan-y}.library-home{width:100%;padding:12px 16px calc(24px + var(--airp-safe-bottom,0px));box-sizing:border-box}.library-home>*{min-width:0}.library-recent{margin-bottom:12px}

/* me.css */
.persona-loading{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:12px;background:#dedad2;color:#51493b}
.persona-loading button{font:inherit;padding:8px 16px;border:1px solid #aaa297;border-radius:20px;background:#f4f0e9;color:inherit}

.persona-load-error{position:absolute;top:12px;left:12px;right:12px;z-index:20;padding:12px;border-radius:14px;background:#fff8ee;color:#795f45;font-size:13px;box-shadow:0 3px 15px #0001}.persona-load-error button{margin:4px;padding:4px;border:1px solid #bba;background:#fff;border-radius:10px}

/* memory.css */
.memory-app{height:100%;min-height:0;display:flex;flex-direction:column;background:#fff;color:#333;font:14px/1.8 var(--airp-font)}.memory-app *{box-sizing:border-box}.memory-app header{flex:none;height:44px;display:flex;justify-content:flex-end;align-items:center;gap:12px;padding:0 16px;border-bottom:1px solid #e3e3e3}.memory-app header>button:first-child{margin-right:auto}.memory-app button,.memory-app select{font:inherit;color:inherit;background:transparent;border:0}.memory-app button{min-height:44px;padding:4px 8px;cursor:pointer}.memory-app header svg{width:16px;height:16px}.memory-app header select{font-size:13px;max-width:120px}.memory-app main{overflow:auto;flex:1;min-height:0}.mem-list{padding:24px 24px 20px 55px;position:relative}.mem-list:before{content:'';position:absolute;left:34px;top:0;bottom:0;width:1px;background:#bbb}.mem-year{display:flex;justify-content:space-between;margin-bottom:32px;color:#777;font-size:13px}.mem-year>span{margin-left:-38px;background:#444;border-radius:14px;color:#fff;font-size:11px;padding:4px 4px;position:relative}.mem-entry{position:relative;padding-bottom:32px}.mem-entry:before{content:'';position:absolute;left:-24px;top:7px;width:5px;height:5px;border-radius:50%;background:#666}.mem-entry time{font-size:11px;color:#666}.mem-summary{display:flex;align-items:flex-start;gap:4px}.mem-summary p{flex:1;margin:8px 0;color:#333;font-size:14px;white-space:pre-wrap}.mem-menu{flex:none;position:relative}.mem-menu summary{list-style:none;color:#777;min-width:30px;min-height:44px;padding:8px 0;cursor:pointer}.mem-menu button{display:block;font-size:11px;min-height:44px}.mem-source,.mem-entry small{display:block;font-size:11px!important;color:#666!important;padding-left:0!important}.mem-children{border-left:1px solid #ddd;padding-left:12px;margin:8px 0}.mem-children>summary{font-size:11px;cursor:pointer}.mem-children .mem-entry:before{display:none}.memory-app nav{flex:none;display:flex;background:#fff;border:1px solid #eee;border-radius:999px;margin:8px 16px 16px;padding:4px;gap:8px;box-shadow:0 3px 14px #00000008}.memory-app nav button{flex:1;border-radius:999px;font-size:13px;color:#666}.memory-app nav [aria-pressed=true]{background:#f0f0f0;color:#333}.mem-empty{color:#777;font-size:13px}.mem-error{font-size:13px;padding:8px 20px;color:#8b3838;margin:0}.mem-settings{padding:14px 19px 20px;background:#f6f6f5}.mem-toggle,.mem-card label{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:13px;min-height:44px}.mem-card{background:#fff;border:1px solid #e3e3e1;border-radius:10px;margin:12px 0;padding:0 12px}.mem-card>summary{font-size:15px;min-height:44px;padding:12px 0;cursor:pointer}.mem-card>summary span{float:right;color:#777;font-size:11px}.mem-card[open]>summary{border-bottom:1px solid #eee}.mem-card label+label{border-top:1px solid #f0f0f0}.mem-card input[type=number]{width:55px;border:0;background:none;text-align:right;font:inherit}.mem-card select{max-width:65%;font-size:11px}.mem-card small{font-size:11px;color:#777;display:block;padding:8px 0}.mem-card button{font-size:11px;display:block;text-align:left;padding-left:0}.mem-advanced{min-height:400px}.mem-editor{padding:24px}.mem-editor textarea{width:100%;min-height:200px;font:inherit;padding:12px;border:1px solid #ddd;background:#fff;color:#333}.mem-editor button{font-size:13px}.memory-app input{accent-color:#555}

.mem-settings{background:#f4f3f5;padding:12px 16px 24px}.mem-settings-heading{display:flex;align-items:center;gap:8px;margin-bottom:16px;font-size:13px}.mem-settings-heading span{margin-left:auto;color:#6f6879}.mem-settings-actions{display:flex;gap:12px;padding-top:16px}.mem-settings-actions button{font-size:13px;padding:8px 16px;border-radius:10px;border:1px solid #ded9e4;background:#fff}.mem-settings-actions button:first-child{background:#686373;color:#fff;border-color:#686373}

/* Let the scroll viewport size be owned by flex, not by its content padding. */
.memory-app main.mem-list{position:relative;isolation:isolate}.mem-list:before{display:none}.mem-entry:not(:last-child):after{content:"";position:absolute;left:-21px;top:9px;bottom:-9px;width:1px;background:#bbb;z-index:-1}.mem-entry:before{z-index:1}.memory-app main.mem-list{padding-bottom:32px}


.mem-children .mem-entry:after{display:none}.mem-timeline{position:relative}.mem-timeline:before{content:'';position:absolute;left:-21px;top:-32px;height:41px;width:1px;background:#bbb}

/* messages.css */
@layer app {
  /* ── Conversation list ─────────────────────────────────────────────────── */

  /*
   * The windowed list owns its own scroller. `.airp-vlist--fill` makes it the
   * scrolling element inside a `flat` screen frame, which keeps exactly one
   * scroll container per list — two nested scrollers is how a virtualised list
   * measures the wrong viewport and then renders the wrong window.
   */
  .airp-vlist--fill {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    padding-bottom: var(--airp-safe-bottom);
  }

  .airp-inbox__search {
    padding: var(--airp-space-2) var(--airp-space-4) var(--airp-space-3);
  }

  .airp-inbox__preview {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .airp-inbox__meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
  }

  .airp-inbox__time {
    font-size: var(--airp-text-2xs);
    color: var(--airp-text-3);
    font-variant-numeric: tabular-nums;
  }

  .airp-inbox__title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
  }

  .airp-inbox__name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* ── Conversation ──────────────────────────────────────────────────────── */

  .airp-chat {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    background: var(--airp-bg);
    /* Containing block for the "back to latest" button.
     *
     * Without this the button — `position: absolute` with no positioned ancestor — resolved
     * against whatever further-up element happened to be positioned, so it floated over the
     * screen instead of belonging to the conversation panel, and its position depended on a
     * layout it was not part of. That is a plausible contributor to the flicker the user
     * reported while scrolling. */
    position: relative;
  }

  .airp-chat__header {
    flex: 0 0 auto;
    display: flex;
    align-items: flex-end;
    gap: var(--airp-space-2);
    padding: calc(var(--airp-safe-top) + var(--airp-space-2)) var(--airp-space-3) var(--airp-space-2);
    background: var(--airp-surface-glass);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--airp-divider);
    z-index: 20;
  }

  .airp-chat__peer {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: var(--airp-space-2);
    padding: 0 0 2px;
    background: none;
    border: 0;
    text-align: left;
  }

  .airp-chat__peer-text {
    min-width: 0;
  }

  .airp-chat__peer-name {
    font-size: var(--airp-text-md);
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .airp-chat__peer-status {
    font-size: var(--airp-text-2xs);
    color: var(--airp-text-3);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* The message list owns scrolling; when the keyboard opens the shell's
   * visible height contracts, so the list (not only the input) gets shorter. */
  .airp-chat__scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    padding: var(--airp-space-3) var(--airp-space-3) var(--airp-space-2);
    display: flex;
    flex-direction: column;
    gap: var(--airp-space-3);
  }

  .airp-chat__daymark {
    align-self: center;
    padding: 3px 10px;
    border-radius: var(--airp-radius-full);
    background: var(--airp-surface-2);
    color: var(--airp-text-3);
    font-size: var(--airp-text-2xs);
    font-weight: 600;
  }

  /* The time between stretches of conversation: a bare centred line, lighter than the day
   * marker above it. Two chips stacked would be the noise this replaced. */
  .airp-chat__timemark {
    align-self: center;
    color: var(--airp-text-3);
    font-size: var(--airp-text-2xs);
    font-variant-numeric: tabular-nums;
  }

  /* ── Appearance variants ───────────────────────────────────────────────────
   * Everything below keys off attributes the appearance screen writes on <html>.
   * They are attribute selectors, not injected CSS: the user picks a name, and
   * these rules are the only things that name can do. */

  /* Density: the list is the only thing that changes. Bubble internals keep their
   * own padding, or a "compact" list would also mangle the bubble shape. */
  html[data-density='compact'] .airp-chat__scroll {
    gap: var(--airp-space-1);
    padding-top: var(--airp-space-2);
  }

  html[data-density='compact'] .airp-turn__stack {
    gap: 2px;
  }

  /* `plain`: no fill, no tail. It is a reading mode — the author's words with the
   * chat furniture removed. */
  html[data-bubble='plain'] .airp-bubble {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    padding-left: 0;
    padding-right: 0;
  }

  html[data-bubble='plain'] .airp-bubble--self {
    color: var(--airp-accent-strong);
  }

  html[data-bubble='compact'] .airp-bubble {
    padding: 6px 10px;
  }

  /* Wallpaper: a fixed layer behind the list, above the app background. The dim
   * value comes from the appearance token, so the picture never fights the text. */
  .airp-chat__wallpaper {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-size: cover;
    background-position: center;
    pointer-events: none;
  }

  .airp-chat__wallpaperscrim {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: var(--airp-bg);
    opacity: var(--airp-wallpaper-dim, 0.35);
  }

  /* With a wallpaper the list and composer need to sit above the two layers. */
  .airp-chat {
    position: relative;
  }

  .airp-chat__scroll,
  .airp-chat__header,
  .airp-composer {
    position: relative;
    z-index: 2;
  }

  /* ── Bubbles ───────────────────────────────────────────────────────────── */

  .airp-turn {
    display: flex;
    gap: var(--airp-space-2);
    align-items: flex-end;
    max-width: 100%;
  }

  .airp-turn--self {
    flex-direction: row-reverse;
  }

  .airp-turn__stack {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    max-width: 78%;
  }

  .airp-turn--self .airp-turn__stack {
    align-items: flex-end;
  }

  .airp-bubble {
    position: relative;
    padding: 8px 12px;
    border-radius: var(--airp-bubble-radius);
    background: var(--airp-bubble-other-bg);
    color: var(--airp-bubble-other-text);
    font-size: var(--airp-bubble-font-size);
    line-height: var(--airp-bubble-line-height);
    word-break: break-word;
    white-space: pre-wrap;
    -webkit-user-select: text;
    user-select: text;
    border: 0;
    text-align: left;
    max-width: 100%;
  }

  .airp-bubble--self {
    background: var(--airp-bubble-self-bg);
    color: var(--airp-bubble-self-text);
  }

  /* The tail: a squared corner on the side the speaker sits on. */
  .airp-bubble--tail-other {
    border-bottom-left-radius: var(--airp-bubble-tail-radius);
  }

  .airp-bubble--tail-self {
    border-bottom-right-radius: var(--airp-bubble-tail-radius);
  }

  .airp-bubble--pressed {
    opacity: 0.72;
  }

  /*
   * 表情包：贴纸本身就是内容，所以不套文字气泡的那层壳。
   *
   * 气泡的底色和 10/12 的内边距是为了包住一行行文字；套在一张 96px 的方图上，
   * 贴纸会被撑成一个带底色的方块，看起来像张卡片而不是表情。这里把底色去掉、
   * 内边距归零，让贴纸自己贴在对话流里（微信就是这样）。仍保留 button 外壳，
   * 长按菜单、重 roll 这些能力一个都不掉。
   *
   * `.airp-chat ...` 前缀是为了压过 `html[data-bubble='compact'] .airp-bubble`
   * 那几条主题变体，避免切主题时内边距又冒出来。
   */
  .airp-chat .airp-bubble.airp-bubble--sticker {
    padding: 0;
    background: transparent;
  }

  .airp-bubble__translation {
    margin-top: 5px;
    padding-top: 5px;
    border-top: 1px dashed currentColor;
    opacity: 0.72;
    font-size: var(--airp-text-xs);
  }

  .airp-bubble__meta {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 4px;
    font-size: var(--airp-text-2xs);
    color: var(--airp-text-3);
    font-variant-numeric: tabular-nums;
  }

  .airp-bubble__edited {
    font-style: italic;
  }

  .airp-narration {
    align-self: center;
    max-width: 86%;
    padding: 4px 10px;
    border-radius: var(--airp-radius-md);
    background: var(--airp-surface-2);
    color: var(--airp-text-2);
    font-size: var(--airp-text-xs);
    line-height: 1.6;
    text-align: center;
    white-space: pre-wrap;
  }

  /*
   * The offline trace is deliberately full-width and never a bubble: a bubble
   * means "somebody said this", and the trace is the app filing away a meeting.
   * Drawing it as a bubble makes users think the character sent a message.
   */
  .airp-trace-row {
    align-self: stretch;
    width: 100%;
    margin: var(--airp-space-2) 0;
  }

  /*
   * A reply that contains an interface cannot be a bubble.
   *
   * A bubble is a `<button>`, and an interface brings its own interactive
   * elements — a button inside a button is invalid HTML and browsers resolve it
   * by dropping the inner control, which would make parts of the interface dead.
   * The reference product hit the same constraint and gave these messages a card
   * shell (`chat-msg-card`), so this mirrors that: full-width prose with the
   * interface rendered **where it was written**.
   */
  .airp-rich {
    align-self: stretch;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--airp-space-3);
    padding: var(--airp-space-3);
    border-radius: var(--airp-radius-md);
    background: var(--airp-surface-2);
    border: 1px solid var(--airp-border);
    /* The reading rhythm of roleplay prose: roomy lines and an indent, which is
     * what makes it read as a novel rather than as chat. */
    line-height: 1.9;
  }

  .airp-rich__text p {
    margin: 0 0 var(--airp-space-3);
    text-indent: 2em;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  .airp-rich__text p:last-child {
    margin-bottom: 0;
  }

  /* 模型按酒馆习惯输出的行内标记：粗体、斜体、删除线与分隔线。 */
  .airp-bubble strong,
  .airp-narration strong,
  .airp-rich strong {
    font-weight: 600;
  }

  .airp-bubble em,
  .airp-narration em,
  .airp-rich em {
    font-style: italic;
  }

  .airp-bubble del,
  .airp-narration del,
  .airp-rich del {
    text-decoration: line-through;
    opacity: 0.7;
  }

  .airp-bubble .airp-md-rule,
  .airp-narration .airp-md-rule {
    display: block;
    height: 0;
    margin: 6px 0;
    border-top: 1px solid currentColor;
    opacity: 0.28;
  }

  .airp-rich .airp-md-rule {
    width: 100%;
    height: 0;
    margin: var(--airp-space-2) 0;
    border: 0;
    border-top: 1px solid var(--airp-border);
  }

  .airp-pill {
    align-self: center;
    padding: 4px 12px;
    border-radius: var(--airp-radius-full);
    background: var(--airp-attention-soft);
    color: var(--airp-attention);
    font-size: var(--airp-text-2xs);
    font-weight: 600;
    text-align: center;
    white-space: pre-wrap;
  }

  .airp-chat__failed {
    align-self: center;
    max-width: 88%;
    padding: var(--airp-space-2) var(--airp-space-3);
    border-radius: var(--airp-radius-md);
    background: var(--airp-danger-soft);
    color: var(--airp-danger);
    font-size: var(--airp-text-xs);
    line-height: 1.55;
    display: flex;
    flex-direction: column;
    gap: var(--airp-space-2);
  }

  /* Version switcher: appears only when a turn actually has alternatives. */
  .airp-versions {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 2px;
  }

  .airp-versions__count {
    font-size: var(--airp-text-2xs);
    color: var(--airp-text-3);
    font-variant-numeric: tabular-nums;
  }

  /* ── Composer ──────────────────────────────────────────────────────────── */

  .airp-composer {
    flex: 0 0 auto;
    display: flex;
    align-items: flex-end;
    /* 录音浮层（.airp-voice-hud）挂在输入栏上沿，所以这里是它的定位上下文。 */
    position: relative;
    gap: var(--airp-space-2);
    padding: var(--airp-space-2) var(--airp-space-3);
    /* No transform: the shell already contracts to the visible viewport.
     * Translating again leaves an empty strip above the mobile keyboard. */
    padding-bottom: calc(var(--airp-space-2) + var(--airp-safe-bottom));
    background: var(--airp-surface-glass);
    border-top: 1px solid var(--airp-divider);
  }

  .airp-composer__input {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 40px;
    max-height: 132px;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid transparent;
    background: var(--airp-surface);
    color: var(--airp-text);
    font-size: var(--airp-bubble-font-size);
    line-height: 1.45;
    -webkit-user-select: text;
    user-select: text;
    overflow-y: auto;
  }

  .airp-composer__input:focus {
    outline: none;
    border-color: var(--airp-border-strong);
  }

  .airp-composer__sticker {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: var(--airp-radius-full);
    background: transparent;
    color: var(--airp-text-2);
    border: 0;
    transition: color var(--airp-dur-fast) var(--airp-ease);
  }

  .airp-composer__sticker:active:not(:disabled) {
    color: var(--airp-accent);
  }

  .airp-composer__sticker:disabled {
    opacity: 0.4;
  }

  /* The ＋ menu keeps the sticker button's geometry: two round controls at
   * different sizes in the same row reads as a mistake. */
  .airp-composer__more {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: var(--airp-radius-full);
    background: transparent;
    color: var(--airp-text-2);
    border: 0;
    transition: color var(--airp-dur-fast) var(--airp-ease);
  }

  .airp-composer__more:active:not(:disabled) {
    color: var(--airp-accent);
  }

  .airp-composer__more:disabled {
    opacity: 0.4;
  }

  .airp-composer__send {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: var(--airp-radius-full);
    background: var(--airp-accent);
    color: var(--airp-accent-ink);
    border: 0;
    transition: opacity var(--airp-dur-fast) var(--airp-ease), transform var(--airp-dur-fast) var(--airp-ease);
  }

  .airp-composer__send:disabled {
    opacity: 0.4;
  }

  .airp-composer__send:active:not(:disabled) {
    transform: scale(0.93);
  }

  /* ── 语音 ──────────────────────────────────────────────────────────────── */

  /* 麦克风与键盘是同一个按钮的两种状态，所以共用一份几何；
   * 它和表情包、✨ 并列在输入框右侧。 */
  .airp-composer__mic {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: var(--airp-radius-full);
    background: transparent;
    color: var(--airp-text-2);
    border: 0;
    transition: color var(--airp-dur-fast) var(--airp-ease);
  }

  .airp-composer__mic:active:not(:disabled) {
    color: var(--airp-accent);
  }

  .airp-composer__mic:disabled {
    opacity: 0.4;
  }

  /*
   * 「按住 说话」条：占住输入框原来的位置。
   *
   * `touch-action: none` 与禁选中是必须的：这是一个手势面而不是文本面，
   * 少了它们，长按会先把系统的"选择/复制"菜单叫出来，按压手势被浏览器截走。
   */
  .airp-composer__talk {
    flex: 1 1 auto;
    min-width: 0;
    height: 40px;
    border: 1px solid var(--airp-border);
    border-radius: 6px;
    background: var(--airp-surface);
    color: var(--airp-text);
    font-size: var(--airp-text-sm);
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    transition: background var(--airp-dur-fast) var(--airp-ease), color var(--airp-dur-fast) var(--airp-ease);
  }

  .airp-composer__talk:disabled {
    opacity: 0.5;
  }

  .airp-composer__talk--on {
    background: var(--airp-accent);
    color: var(--airp-accent-ink);
    border-color: transparent;
  }

  .airp-composer__talk--cancel {
    background: var(--airp-danger);
    color: var(--airp-accent-ink);
    border-color: transparent;
  }

  /* 录音浮层：贴在输入栏上沿，报秒数并提示"上滑取消"。 */
  .airp-voice-hud {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: var(--airp-space-2);
    max-width: 82%;
    padding: 8px 14px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.74);
    color: #fff;
    font-size: var(--airp-text-xs);
    z-index: 40;
    pointer-events: none;
  }

  .airp-voice-hud__dots {
    display: inline-flex;
    align-items: flex-end;
    gap: 3px;
    height: 14px;
  }

  .airp-voice-hud__dots i {
    width: 3px;
    height: 6px;
    border-radius: 2px;
    background: currentColor;
    animation: airp-voice-hud-bar 0.9s ease-in-out infinite;
  }

  .airp-voice-hud__dots i:nth-child(2) { animation-delay: 0.15s; }
  .airp-voice-hud__dots i:nth-child(3) { animation-delay: 0.3s; }

  @keyframes airp-voice-hud-bar {
    0%, 100% { height: 5px; }
    50% { height: 14px; }
  }

  .airp-voice-hud__time {
    font-variant-numeric: tabular-nums;
  }

  .airp-voice-hud__text {
    opacity: 0.85;
  }

  /*
   * 语音条本体：声波 + 秒数。宽度随时长增长（组件算好写进 inline style）。
   * 声波朝向说话人那一侧 —— 我发的朝右、对方发来的朝左，和微信一致。
   */
  .airp-voice {
    display: inline-flex;
    align-items: center;
    gap: var(--airp-space-2);
    min-height: 24px;
  }

  .airp-voice--self {
    flex-direction: row-reverse;
  }

  .airp-voice__dur {
    /* 定宽的气泡里声波是唯一可伸缩的部分，秒数必须不参与收缩，
       否则「6″」会被拆成「6」和「″」落在两端。 */
    flex: none;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    opacity: 0.85;
  }

  .airp-voice__wave {
    display: inline-flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    gap: 3px;
    height: 16px;
  }

  .airp-voice__wave i {
    width: 3px;
    height: calc(var(--airp-voice-bar, 0.6) * 16px);
    border-radius: 2px;
    background: currentColor;
    opacity: 0.85;
  }

  .airp-voice--playing .airp-voice__wave i {
    animation: airp-voice-bar 0.9s ease-in-out infinite;
  }

  .airp-voice--playing .airp-voice__wave i:nth-child(2) { animation-delay: 0.12s; }
  .airp-voice--playing .airp-voice__wave i:nth-child(3) { animation-delay: 0.24s; }
  .airp-voice--playing .airp-voice__wave i:nth-child(4) { animation-delay: 0.08s; }
  .airp-voice--playing .airp-voice__wave i:nth-child(5) { animation-delay: 0.2s; }
  .airp-voice--playing .airp-voice__wave i:nth-child(6) { animation-delay: 0.3s; }

  @keyframes airp-voice-bar {
    0%, 100% { transform: scaleY(0.55); }
    50% { transform: scaleY(1); }
  }

  /*
   * 语音条 + 「转文字」是一条横排：按钮在气泡**外侧**，我方用 row-reverse 让它落在左边。
   * 参考项目和微信都是这个结构；把按钮塞进气泡里会让绿色气泡撑成一大块，
   * 也会让按钮一起被长按菜单接管。
   */
  .airp-voice-row {
    display: flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    max-width: 100%;
  }

  .airp-voice-row--self {
    flex-direction: row-reverse;
    align-self: flex-end;
  }

  .airp-voice__toggle {
    flex: none;
    padding: 4px;
    border: 0;
    background: none;
    color: var(--airp-text-3);
    font-size: 12px;
    line-height: 1.2;
    cursor: pointer;
  }

  /*
   * 转写：默认不出现，点「转文字」后作为下方一张独立气泡展开——和普通文字气泡同款。
   * 不放在语音条内部，也不带任何「未听清」标记：听不清时微信只在识别那一刻提示一次。
   */
  .airp-voice__transcript {
    align-self: flex-start;
    max-width: 100%;
    padding: 7px 11px;
    border: 1px solid var(--airp-divider);
    border-radius: var(--airp-bubble-radius);
    background: var(--airp-bubble-other-bg);
    color: var(--airp-bubble-other-text);
    font-size: var(--airp-text-xs);
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    text-align: left;
    -webkit-user-select: text;
    user-select: text;
  }

  .airp-turn--self .airp-voice__transcript {
    align-self: flex-end;
  }

  /* 系统减弱动态时，声波停在原处 —— 它只是装饰，不该成为必须忍受的动画。 */
  @media (prefers-reduced-motion: reduce) {
    .airp-voice--playing .airp-voice__wave i,
    .airp-voice-hud__dots i { animation: none; }
  }

  /* ── Sticker picker ────────────────────────────────────────────────────── */

  .airp-stickerpicker__packs {
    display: flex;
    gap: var(--airp-space-2);
    overflow-x: auto;
    padding-bottom: var(--airp-space-2);
    scrollbar-width: none;
  }

  .airp-stickerpicker__packs::-webkit-scrollbar {
    display: none;
  }

  /* One thumb-high row: the pack strip scrolls rather than wrapping, so the grid
   * below never gets pushed off screen by a long list of packs. */
  .airp-stickerpicker__pack {
    flex: 0 0 auto;
    padding: 6px var(--airp-space-3);
    border-radius: var(--airp-radius-full);
    background: var(--airp-surface-3);
    color: var(--airp-text-2);
    border: 0;
    font-size: var(--airp-text-xs);
    font-weight: 600;
    white-space: nowrap;
  }

  .airp-stickerpicker__pack--on {
    background: var(--airp-accent-soft);
    color: var(--airp-accent-strong);
  }

  .airp-stickerpicker__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
    gap: var(--airp-space-2);
  }

  .airp-stickerpicker__cell {
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    padding: var(--airp-space-1);
    border-radius: var(--airp-radius-md);
    background: var(--airp-surface-2);
    border: 0;
  }

  .airp-stickerpicker__cell:active {
    background: var(--airp-surface-3);
  }
}

/* Manual AI trigger lives beside Send; never replaces the Send action. */
.airp-composer__generate {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--airp-accent, #238b61);
  background: transparent;
  cursor: pointer;
}
.airp-composer__generate:disabled { opacity: .4; cursor: default; }

/* Explicit opt-in: manual reply is the default for all existing installations. */
.airp-chat__reply-mode {
  flex: 0 0 auto;
  border: 1px solid var(--airp-divider);
  background: var(--airp-surface-2);
  color: var(--airp-text-2);
  border-radius: 14px;
  font-size: 11px;
  padding: 5px 7px;
  margin-bottom: 4px;
}
.airp-chat__reply-mode[aria-pressed="true"] {
  color: var(--airp-accent);
  border-color: var(--airp-accent);
}

@layer app {
  /* One compact row above the composer. The old version stacked a label, two
   * full-width selects and a second label, which pushed the input off a phone screen
   * and read like a settings form inside a chat. */
  .airp-observer {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-top: 1px solid var(--airp-divider);
    background: var(--airp-bg);
    font-size: 13px;
  }
  .airp-observer__count {
    flex: 0 0 auto;
    min-height: 30px;
    padding: 2px 10px;
    border-radius: 15px;
    border: 1px solid var(--airp-divider);
    background: var(--airp-surface);
    color: inherit;
    font-variant-numeric: tabular-nums;
  }
  .airp-observer__edit {
    display: flex;
    align-items: center;
    gap: 4px;
  }
  .airp-observer__num {
    width: 44px;
    min-height: 30px;
    padding: 2px 6px;
    border-radius: 8px;
    border: 1px solid var(--airp-divider);
    background: var(--airp-surface);
    color: inherit;
    text-align: center;
    font-variant-numeric: tabular-nums;
  }
  .airp-observer__unit { color: var(--airp-text-3); }
  /* Explicit confirm inside the editor. Blur also commits, but a visible button removes
   * any doubt about whether a typed value took effect. */
  .airp-observer__done {
    flex: 0 0 auto;
    min-height: 30px;
    padding: 2px 10px;
    border-radius: 15px;
    border: 1px solid var(--airp-accent);
    background: var(--airp-accent);
    color: #fff;
  }
  /* Shrinks instead of wrapping: a wrapping row is what made this feel heavy. */
  .airp-observer__who {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 30px;
    padding: 2px 6px;
    border-radius: 8px;
    border: 1px solid var(--airp-divider);
    background: var(--airp-surface);
    color: inherit;
  }
  .airp-observer__run {
    flex: 0 0 auto;
    min-height: 30px;
    margin-left: auto;
    padding: 2px 12px;
    border-radius: 15px;
    border: 1px solid var(--airp-accent);
    background: var(--airp-accent);
    color: #fff;
  }
  .airp-observer button:disabled { opacity: .55; }
}

@layer app {
  /* 「回到最新」：36px 圆钮，压在会话右下角。
   *
   * 它取代了一个 48px 高、带粗体文字和阴影的胶囊按钮。滚动快捷方式应该随手可用但不该
   * 被注意到——消息才是内容，一个盖在消息上的醒目按钮会跟它本该帮你找到的东西争注意力。 */
  .airp-chat__jump {
    position: absolute;
    right: var(--airp-space-4);
    bottom: calc(var(--airp-safe-bottom) + 72px);
    z-index: 30;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--airp-divider);
    background: var(--airp-surface);
    color: var(--airp-text-2);
    box-shadow: 0 1px 3px rgb(0 0 0 / 12%);
  }
  .airp-chat__jump:active { transform: scale(0.94); }
}

/* Keyboard-open layout: no ghost safe-area below the input, and no second
 * keyboard translation. The browser's own toolbar is outside the webpage. */
@layer app {
  html[data-keyboard='open'] .airp-chat .airp-composer {
    padding-bottom: var(--airp-space-2);
  }
  html[data-keyboard='open'] .airp-screen__body--flat:has(.airp-chat) {
    padding-bottom: 0;
  }
  .airp-chat .airp-composer {
    align-items: flex-end;
    gap: 4px;
    padding-left: 8px;
    padding-right: 8px;
  }
  .airp-chat .airp-composer__input {
    background: var(--airp-surface);
    border: 1px solid var(--airp-border);
    border-radius: 6px;
    min-width: 60px;
    font-size: 16px; /* prevent mobile browser auto-zoom */
  }
  .airp-chat .airp-composer__more,
  .airp-chat .airp-composer__sticker,
  .airp-chat .airp-composer__mic,
  .airp-chat .airp-composer__generate {
    flex: 0 0 34px;
    width: 34px;
    height: 40px;
    color: var(--airp-text-2);
  }
  .airp-chat .airp-composer__generate {
    color: var(--airp-accent);
  }
  .airp-chat .airp-composer__send {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    align-self: center;
  }
}

@layer app {
  .airp-chat .airp-composer__input:focus {
    outline: none;
    border-color: var(--airp-border-strong);
  }
}

@layer app {
.airp-screen__body--flat:has(.airp-chat){padding-bottom:0!important}
.airp-chat__timemark{display:block;text-align:center;font-size:12px;color:#999;margin:22px 0;background:none;padding:0}
.airp-chat__peer{justify-content:center}.airp-chat__peer>.airp-avatar{display:none}.airp-chat__peer-text{align-items:center}.airp-chat__peer-status:empty{display:none}
.airp-turn{gap:10px;margin-bottom:12px}.airp-turn>.airp-avatar{border-radius:5px!important;flex-shrink:0}.airp-turn__stack{max-width:calc(100% - 100px)}
.airp-bubble{border-radius:4px;padding:10px 12px;line-height:1.55;position:relative}.airp-bubble--tail-other:before,.airp-bubble--tail-self:before{content:'';position:absolute;top:14px;width:8px;height:8px;transform:rotate(45deg);background:inherit}.airp-bubble--tail-other:before{left:-4px}.airp-bubble--tail-self:before{right:-4px}
.chat-typing{font-size:13px;color:#999;display:inline-flex;gap:2px}.chat-typing span{animation:chat-dots 1.4s ease-in-out infinite}@keyframes chat-dots{50%{opacity:.3}}
.airp-chat .airp-composer{padding:8px 10px calc(8px + var(--airp-safe-bottom));gap:8px;border-top:1px solid #ddd;background:var(--airp-chat-composer-bg,#f6f6f6)}
html[data-keyboard='open'] .airp-chat .airp-composer{padding-bottom:8px}
.airp-chat .airp-composer__send{border-radius:5px;min-width:54px;font-size:14px;padding:0 10px;height:36px}.airp-chat .airp-composer__input{min-height:36px;border:0;padding:7px 10px;line-height:22px}
.chat-more-panel{flex:none;display:grid;grid-template-columns:repeat(4,1fr);gap:22px 16px;padding:26px 22px;background:var(--airp-chat-bg,#ededed);border-top:1px solid var(--airp-divider,#ddd);min-height:180px}.chat-more-panel button{display:flex;flex-direction:column;align-items:center;gap:10px;background:none;border:0;font-size:12px;color:#777}.chat-more-panel svg{width:58px;height:58px;padding:17px;border-radius:13px;background:var(--airp-surface,#fff);color:var(--airp-text,#222)}
}

.airp-chat__failed{white-space:pre-wrap;overflow-wrap:anywhere;flex-shrink:0;gap:12px!important}.airp-chat__failed button{height:auto!important;min-height:40px;white-space:normal!important}.airp-chat__failed>span:first-child{max-height:220px;overflow:auto;user-select:text}
/* 模型原文：默认收起，展开后可滚动、可选中复制。模型吐出的东西原样呈现，是我们
 * 唯一能证明"这一步到底坏在哪"的东西——藏起来只会让用户觉得我们在糊弄。 */
.airp-chat__raw{font-size:var(--airp-text-xs);border:1px solid var(--airp-divider);border-radius:var(--airp-radius-sm);background:var(--airp-surface-2)}
.airp-chat__raw>summary{min-height:36px;padding:8px 10px;cursor:pointer;color:var(--airp-text-2);user-select:none;white-space:normal}
.airp-chat__raw>pre{margin:0;padding:8px 10px;max-height:240px;overflow:auto;border-top:1px solid var(--airp-divider);font:inherit;font-size:var(--airp-text-2xs);white-space:pre-wrap;overflow-wrap:anywhere;user-select:text;color:var(--airp-text-2)}

/* 微信式逐条弹出：新消息按行错峰入场，只作用于新出现的行。 */
@keyframes airp-pop-in{0%{opacity:0;transform:translateY(10px) scale(.96)}100%{opacity:1;transform:translateY(0) scale(1)}}
.airp-row-enter{animation:airp-pop-in .24s cubic-bezier(.2,.8,.3,1.05) backwards}
@media (prefers-reduced-motion: reduce){.airp-row-enter{animation:none}}

/* ── 红包 / 转账卡片：通用非文本卡片外壳 + 两张皮肤 ───────────────────────────
 *
 * 外壳 `.airp-card` 只做朝向、点击与长按，保持**透明**（它是个 button，但底板在
 * 皮肤上）；底色、排版、角标全部由皮肤的 `.airp-moneycard` 决定。尖角也画在皮肤
 * 上，用 `background: inherit` 自动跟随皮肤底色——换皮肤不需要动外壳。
 *
 * 卡面按微信实机排成三段：主区（图标 + 主文案 + 副文案）→ 半透明分隔线 → 品牌角标。 */
.airp-card{position:relative;display:block;max-width:100%;padding:0;border:0;background:transparent;font:inherit;color:inherit;text-align:left;cursor:default}
.airp-card--openable{cursor:pointer}
.airp-card--pressed{opacity:.72}
.airp-moneycard{position:relative;display:flex;flex-direction:column;width:216px;max-width:100%;padding:13px 13px 8px;border-radius:6px;background:var(--airp-money-bg);color:var(--airp-money-ink)}
.airp-moneycard--settled{background:var(--airp-money-settled-bg);color:var(--airp-money-settled-ink);--airp-money-hairline:var(--airp-money-settled-hairline)}
.airp-card--tail-other .airp-moneycard:before,.airp-card--tail-self .airp-moneycard:before{content:'';position:absolute;top:16px;width:8px;height:8px;transform:rotate(45deg);background:inherit}
.airp-card--tail-other .airp-moneycard:before{left:-4px}
.airp-card--tail-self .airp-moneycard:before{right:-4px}
.airp-moneycard__main{display:flex;align-items:center;gap:10px;min-width:0}
.airp-moneycard__badge{flex:0 0 auto;display:grid;place-items:center}
/* 转账：白色描边圆环 + 双箭头（微信转账标志），已收款时圆环里换成 ✓。 */
.airp-moneycard--transfer .airp-moneycard__badge{width:38px;height:38px;border:1.5px solid currentColor;border-radius:50%}
/* 红包：实心红包袋 + 金 ¥（微信不在红包卡上画线稿信封）。 */
.airp-moneycard__badge--redpacket{width:34px;height:34px;border-radius:8px;background:#d8433b;color:#ffd76e;font-size:17px;font-weight:700;line-height:1}
.airp-moneycard__body{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.airp-moneycard__title{font-size:calc(var(--airp-bubble-font-size) + 3px);line-height:1.25;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.airp-moneycard__sub{font-size:var(--airp-text-2xs);line-height:1.3;opacity:.92;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.airp-moneycard__note{font-size:var(--airp-text-2xs);line-height:1.3;opacity:.75;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* 红包自定义封面：整张铺满卡面，压一层左浓右淡的暖橙蒙层（照微信实机）。封面是
 * 绝对定位铺满容器的，卡面高度由内容自己决定——不能为了"铺得开"给个固定高度，
 * 那会让加了封面的红包比普通红包胖一圈。 */
.airp-moneycard--has-cover .airp-moneycard__main,.airp-moneycard--has-cover .airp-moneycard__brand{position:relative;z-index:1}
.airp-moneycard__cover{--airp-cover-scrim:linear-gradient(100deg,#c0392fe8 0%,#d6603075 48%,#e88c5029 100%)}
.airp-moneycard__brand{margin-top:11px;padding-top:7px;border-top:1px solid var(--airp-money-hairline);font-size:10px;letter-spacing:.2px;color:var(--airp-money-brand-ink)}
.airp-moneycard--settled .airp-moneycard__brand{color:var(--airp-money-settled-brand-ink)}

/* ── 封面底图（红包卡 / 拆红包弹层共用） ──
 * 铺满所在容器、随容器圆角裁切；蒙层浓度由各容器的 `--airp-cover-scrim` 决定。 */
.airp-cover-fill{position:absolute;inset:0;z-index:0;border-radius:inherit;overflow:hidden}
.airp-cover-fill__image{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:cover}
.airp-cover-fill__scrim{position:absolute;inset:0;background:var(--airp-cover-scrim,#00000033)}

/* ── 红包 / 转账：两个全屏输入页 ─────────────────────────────────────────────
 *
 * 照微信的排版基线：顶栏左 ✕ 右 ⋯，中段是大号金额，底部一条约六成宽、居中的圆角
 * 主按钮。金额走**原生输入框 + 系统键盘**，不再自绘数字键盘——两套键盘并存时，说明
 * 框一聚焦就会顶起整页。中间区域自己滚动，顶栏与按钮固定不动。 */
.airp-money-page{display:flex;flex-direction:column;flex:1 1 auto;min-height:0;background:var(--airp-bg);color:var(--airp-text)}
.airp-money-page__header{flex:0 0 auto;display:flex;align-items:center;gap:8px;padding:calc(var(--airp-safe-top) + 8px) 8px 8px;background:var(--airp-surface-glass);border-bottom:1px solid var(--airp-divider)}
.airp-money-page__title{flex:1 1 auto;min-width:0;text-align:center;font-size:15px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* 顶栏右侧已无「⋯」；等宽占位让标题保持在正中。 */
.airp-money-page__header-spacer{flex:0 0 auto;width:var(--airp-tap-min);height:var(--airp-tap-min)}
.airp-money-page__scroll{flex:1 1 auto;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch}
.airp-money-page__peer{flex:0 0 auto;display:flex;align-items:center;gap:8px;padding:16px 18px 0;font-size:13px;color:var(--airp-text-2)}
.airp-money-page__amount{flex:0 0 auto;display:flex;align-items:flex-end;gap:6px;padding:22px 18px 16px}
.airp-money-page__currency{font-size:30px;font-weight:600;line-height:1.1}
.airp-money-page__value-input{flex:1 1 auto;min-width:0;border:0;background:transparent;outline:none;padding:0;font:inherit;font-size:44px;font-weight:600;line-height:1;letter-spacing:-.5px;font-variant-numeric:tabular-nums;color:var(--airp-text)}
.airp-money-page__value-input::placeholder{color:var(--airp-text-3)}
.airp-money-page__note{flex:0 0 auto;display:block;margin:0 18px;padding:13px 0;border:0;border-top:1px solid var(--airp-divider);background:transparent;font-size:14px;color:var(--airp-text);outline:none}
.airp-money-page__note::placeholder{color:var(--airp-text-3)}

/* 发红包页的「金额 / 祝福语 / 红包封面」三行。 */
.airp-money-page__card{flex:0 0 auto;margin:14px 18px 0;background:var(--airp-surface);border-radius:8px;overflow:hidden}
.airp-money-page__row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;border-bottom:1px solid var(--airp-divider)}
.airp-money-page__row:last-child{border-bottom:0}
/* 红包封面行：可点的「传图 + 裁剪」入口，右侧显示已选封面缩略图。 */
.airp-money-page__row--button{width:100%;border:0;background:transparent;font:inherit;color:inherit;text-align:left;cursor:pointer}
/* 红包封面行：选中封面后右侧展示整张封面的大预览（3:4 竖版，与裁剪比例一致）。 */
.airp-money-page__cover-preview{flex:0 0 auto;width:66px;height:88px;border-radius:6px;overflow:hidden;background:var(--airp-surface-3)}
.airp-money-page__cover-preview img{display:block;width:100%;height:100%;object-fit:cover}
.airp-money-page__row-hint{flex:0 0 auto;display:flex;align-items:center;gap:2px;font-size:13px;color:var(--airp-text-3)}
.airp-money-page__row-label{font-size:14px;color:var(--airp-text);white-space:nowrap}
.airp-money-page__row-amount{flex:1;min-width:0;display:flex;align-items:center;justify-content:flex-end;gap:3px;font-size:15px;font-weight:600;color:var(--airp-text)}
.airp-money-page__row-input{flex:1;min-width:0;border:0;background:transparent;text-align:right;font-size:15px;font-weight:600;color:var(--airp-text);outline:none;padding:0}
.airp-money-page__row-input::placeholder{color:var(--airp-text-3);font-weight:400}
.airp-money-page__preview{flex:0 0 auto;display:flex;flex-direction:column;align-items:center;gap:6px;padding:26px 18px}
.airp-money-page__preview-note{font-size:13px;color:var(--airp-text-3)}
.airp-money-page__preview-amount{font-size:42px;font-weight:600;line-height:1;letter-spacing:-.5px;font-variant-numeric:tabular-nums}
.airp-money-page__preview-amount small{font-size:24px;font-weight:600;margin-right:2px}

/* 主按钮约六成宽、居中——微信的红包/转账按钮都不是通栏的粗条。 */
.airp-money-page__submit{flex:0 0 auto;padding:12px 18px calc(14px + var(--airp-safe-bottom));text-align:center}
.airp-money-page__primary{width:62%;height:44px;border:0;border-radius:6px;font-size:16px;font-weight:600;color:#fff;cursor:pointer}
.airp-money-page__primary--transfer{background:#07a85b}
.airp-money-page__primary--redpacket{background:#e5544b}
.airp-money-page__primary:disabled{opacity:.45;cursor:default}

/* ── 拆红包居中弹层（固定红包红，不随主题变） ── */
.airp-modal.airp-redpacket-modal{position:relative;overflow:hidden;background:#d8433b;color:#fff;padding:30px 22px 26px;text-align:center}
.airp-redpacket-modal .airp-modal__close{color:#ffffffb3;z-index:2}
/* 自定义封面铺满整块面板，压一层暖色蒙层，保证「開」按钮与文案可读。 */
.airp-redpacket-modal__art{--airp-cover-scrim:linear-gradient(180deg,#8f2b26b3 0%,#7a201ccc 100%)}
.airp-redpacket-modal__cover{position:relative;z-index:1;display:flex;flex-direction:column;align-items:center;gap:18px}
.airp-redpacket-modal__from{font-size:14px;color:#ffffffd9}
.airp-redpacket-modal__open{width:74px;height:74px;border:0;border-radius:50%;background:linear-gradient(160deg,#f8df8a,#f0c04a);color:#a8362c;font-size:30px;font-weight:700;display:grid;place-items:center;box-shadow:0 6px 18px #00000033;cursor:pointer}
.airp-redpacket-modal__open:disabled{opacity:.6}
.airp-redpacket-modal__result{display:flex;flex-direction:column;align-items:center;gap:6px}
.airp-redpacket-modal__amount{font-size:38px;font-weight:700;line-height:1;letter-spacing:-.5px}
.airp-redpacket-modal__hint{font-size:12px;color:#ffffffb3}
.airp-redpacket-modal__note{margin:0;font-size:13px;color:#ffffffd9}

/* ── 转账收款 / 退回底部弹层 ── */
.airp-money-dialog{display:flex;flex-direction:column;align-items:center;gap:6px;padding:4px 4px 0}
.airp-money-dialog__amount{margin:0;font-size:30px;font-weight:600;letter-spacing:-.5px}
.airp-money-dialog__note{margin:0;font-size:13px;color:var(--airp-text-2);text-align:center}
.airp-money-dialog__time{display:inline-flex;align-items:center;gap:4px;margin:2px 0 16px;font-size:12px;color:var(--airp-text-3)}
.airp-money-dialog__link{margin-top:10px;border:0;background:transparent;font-size:14px;color:var(--airp-text-2);cursor:pointer}
.airp-money-dialog__link:disabled{opacity:.5}

/* ── 位置卡片：通用卡片外壳 + 一张地图缩略图 ─────────────────────────────────
 *
 * 皮肤结构与钱卡片同源（外壳 `CardBubble` 不认识任何具体卡片类型），尖角照旧画在
 * 皮肤上用 `background: inherit` 跟随底色。副行是一句固定的「共享位置」：地点数据里
 * 本就只有一个地名（`MeetingInfo.place` 是一整句），没有可拆的上级行政区，硬造城市
 * 只会造出假数据。
 *
 * 缩略图是**预生成的 webp**（按地名哈希取，见 `location-art.ts`），不是实时地图切片，
 * 也不是手绘线稿——真地图要等查手机那一轮接上可插拔的 geo provider。 */
.airp-loccard{position:relative;display:flex;align-items:center;gap:10px;width:216px;max-width:100%;padding:10px;border-radius:6px;background:var(--airp-surface);color:var(--airp-text);text-align:left}
.airp-card--tail-other .airp-loccard:before,.airp-card--tail-self .airp-loccard:before{content:'';position:absolute;top:14px;width:8px;height:8px;transform:rotate(45deg);background:inherit}
.airp-card--tail-other .airp-loccard:before{left:-4px}
.airp-card--tail-self .airp-loccard:before{right:-4px}
.airp-loccard__thumb{flex:0 0 auto;display:block;width:52px;height:52px;border-radius:5px;object-fit:cover;background:var(--airp-surface-3)}
.airp-loccard__body{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.airp-loccard__title{font-size:calc(var(--airp-bubble-font-size) + 1px);line-height:1.3;font-weight:500;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;word-break:break-word}
.airp-loccard__sub{font-size:var(--airp-text-2xs);line-height:1.3;color:var(--airp-text-3)}

/* ── 发送位置弹窗 ─────────────────────────────────────────────────────────
 *
 * 弹窗自带内边距，所以 nav 行用负 margin 出血到整宽，让下方分隔线横贯到底——这是
 * 「页面级头部」的观感，而不是一组浮在卡片里的按钮。输入框**永远可编辑**：选单只是
 * 推荐，列表为空时整块收起，纯手输不受任何影响。 */
.airp-locsheet{display:flex;flex-direction:column}
.airp-locsheet__nav{display:flex;align-items:center;gap:8px;margin:0 calc(-1 * var(--airp-space-4)) var(--airp-space-3);padding:var(--airp-space-1) var(--airp-space-4) var(--airp-space-2);border-bottom:1px solid var(--airp-divider)}
.airp-locsheet__cancel,.airp-locsheet__send{border:0;background:transparent;font:inherit;font-size:15px;padding:6px 2px;cursor:pointer}
.airp-locsheet__cancel{color:var(--airp-text-2)}
.airp-locsheet__send{color:var(--airp-accent);font-weight:500}
.airp-locsheet__send:disabled{color:var(--airp-text-3);opacity:.6;cursor:default}
.airp-locsheet__title{flex:1;min-width:0;text-align:center;font-size:15px;font-weight:600;color:var(--airp-text)}
.airp-locsheet__label{display:block;margin-bottom:6px;font-size:12px;color:var(--airp-text-3)}
.airp-locsheet__field{display:flex;align-items:center;gap:4px;padding:0 6px 0 12px;border-radius:6px;background:var(--airp-surface-2)}
.airp-locsheet__input{flex:1;min-width:0;padding:11px 0;border:0;background:transparent;outline:none;font:inherit;font-size:15px;color:var(--airp-text)}
.airp-locsheet__input::placeholder{color:var(--airp-text-3)}
.airp-locsheet__chevron{flex:0 0 auto;display:grid;place-items:center;width:30px;height:30px;border:0;border-radius:6px;background:transparent;color:var(--airp-text-3);cursor:pointer;transition:transform .18s var(--airp-ease-out)}
.airp-locsheet__chevron--open{transform:rotate(180deg)}
.airp-locsheet__list{margin-top:8px;max-height:162px;overflow-y:auto;-webkit-overflow-scrolling:touch}
.airp-locsheet__list::-webkit-scrollbar{width:4px}
.airp-locsheet__list::-webkit-scrollbar-thumb{border-radius:2px;background:var(--airp-border-strong)}
.airp-locsheet__item{display:flex;align-items:center;gap:8px;width:100%;padding:10px 2px;border:0;border-top:1px solid var(--airp-divider);background:transparent;font:inherit;text-align:left;color:var(--airp-text);cursor:pointer}
.airp-locsheet__item:first-child{border-top:0}
.airp-locsheet__item--on{color:var(--airp-accent)}
.airp-locsheet__item-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.airp-locsheet__item-title{font-size:15px;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.airp-locsheet__item-sub{font-size:12px;line-height:1.3;color:var(--airp-text-3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* messenger.css */
@layer overrides {
  /* 全屏输入页（红包 / 转账）复用同一套 messenger token。 */
  .messenger, .airp-chat, .airp-money-page, html[data-messenger=true] .airp-portal {
    color-scheme: light;
    --airp-bg: #ededed; --airp-bg-deep: #e5e5e5;
    --airp-surface: #fff; --airp-surface-2: #f5f5f5; --airp-surface-3: #e7e7e7;
    --airp-surface-glass: #ededed;
    --airp-text: #181818; --airp-text-2: #666; --airp-text-3: #909090;
    --airp-border: #e5e5e5; --airp-border-strong: #ccc; --airp-divider: #e5e5e5;
    --airp-accent: #07a85b; --airp-accent-strong: #06934f; --airp-accent-soft: #e6f5eb;
    --airp-accent-ink: #fff; --airp-bubble-self-bg: #95ec69; --airp-bubble-self-text: #181818;
    --airp-bubble-other-bg: #fff; --airp-bubble-other-text: #181818;
    --airp-bubble-radius: 6px; --airp-bubble-tail-radius: 2px;
    --airp-danger: #d64242; --airp-danger-soft: #ffeded; --airp-text-inverse: #fff;
    /* 红包 / 转账卡片：**固定微信橙，不随主题变**（微信本身也不跟随系统深浅色）。
     * 这几条 token 故意不写进 dark 覆盖块。 */
    --airp-money-bg: linear-gradient(135deg, #f7b733, #f0a020);
    --airp-money-ink: #fff; --airp-money-brand-ink: #ffffffa6;
    --airp-money-settled-bg: #fbe6c8; --airp-money-settled-ink: #8b6b41;
    --airp-money-settled-brand-ink: #b09068;
    /* 卡面底栏那条分隔线：橙色卡上是半透明白，米色已收款卡上是暖棕淡影。 */
    --airp-money-hairline: #ffffff40; --airp-money-settled-hairline: #8b6b4126;
    --airp-shadow-1: 0 1px 3px #0000000a;
    background: var(--airp-bg); color: var(--airp-text);
  }
  .messenger { display: flex; flex: 1; flex-direction: column; min-height: 0; }
  .messenger .airp-screen__header { align-items: center; background: #ededed; backdrop-filter: none; }
  .messenger .airp-screen__title { font-weight: 600; }
  .messenger button, .messenger input, .messenger textarea, .messenger select { font: inherit; }
  .messenger-tabs { display: flex; flex: 0 0 auto; background: #f7f7f7; border-top: 1px solid #ddd; padding-bottom: var(--airp-safe-bottom); }
  .messenger-tabs button { flex: 1; display: grid; justify-items: center; gap: 3px; padding: 10px 0 7px; color: #777; border: 0; background: transparent; font-size: 11px; cursor: pointer; }
  .messenger-tabs button[aria-current=page] { color: #07a85b; }
  .messenger-archive { display: block; border: 0; background: transparent; color: #777; font-size: 12px; padding: 8px 16px; text-align: left; }
  .messenger-search { display: flex; gap: 8px; align-items: center; margin: 4px 12px 10px; padding: 9px 12px; color: #999; background: #fff; border: 0; border-radius: 6px; text-align: center; justify-content: center; }
  .messenger-input { width: 100%; box-sizing: border-box; border: 1px solid #ddd; border-radius: 6px; background: #fff; color: #181818; padding: 12px; outline-color: #07a85b; }
  .messenger-card { margin: 12px; padding: 16px; background: #fff; border-radius: 8px; }
  .messenger-card h2 { font-size: 16px; margin: 0 0 12px; }
  .messenger-card p, .messenger-hint { font-size: 13px; line-height: 1.6; color: #777; }
  .messenger-hint { padding: 8px 16px; margin: 0; }
  .messenger-row { width: 100%; display: flex; align-items: center; gap: 12px; border: 0; border-bottom: 1px solid #eee; background: #fff; color: #181818; padding: 15px 16px; text-align: left; cursor: pointer; }
  .messenger-row__body { flex: 1; min-width: 0; }
  .messenger-row__body strong { display: block; font-weight: 500; }
  .messenger-row__body small { display: block; margin-top: 5px; color: #999; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .messenger-inbox-row { position: relative; background: #fff; border-bottom: 1px solid var(--airp-border-strong); }
  .messenger-inbox-row--pinned { background: #f5f5f5; }
  .messenger-inbox-row .airp-row { background: transparent; }
  .messenger-inbox-menu { position: absolute; right: 10px; top: 34px; border: 0; background: transparent; color: #aaa; padding: 6px; }
  .messenger-list-label { padding: 12px 16px 6px; font-size: 12px; color: #888; }
  .messenger-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
  .messenger-call-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 0; }
  .messenger-call-row .messenger-primary, .messenger-call-row .messenger-secondary { flex: 1; min-width: 120px; text-align: center; }
  .messenger-primary { background: #07a85b; color: #fff; border: 0; border-radius: 6px; padding: 11px 18px; font-weight: 500; cursor: pointer; }
  .messenger-secondary { background: #f2f2f2; color: #333; border: 0; border-radius: 6px; padding: 11px 16px; cursor: pointer; }
  .messenger-primary:disabled, .messenger-secondary:disabled { opacity: .5; cursor: default; }
  .messenger-error { color: #bb3434; padding: 10px 16px; overflow-wrap: anywhere; }
  .messenger-choice { display: flex; gap: 10px; align-items: center; padding: 12px 0; }
  .messenger-choice input { accent-color: #07a85b; width: 18px; height: 18px; flex-shrink: 0; }
  .messenger-field { display: grid; gap: 8px; margin-bottom: 16px; font-size: 14px; }
  .messenger-link { border: 0; background: transparent; color: #576b95; padding: 0; text-align: left; }
  .messenger-profile { display: flex; align-items: center; gap: 16px; padding: 30px 20px; background: #fff; }
  .messenger-profile h2 { margin: 0 0 8px; font-size: 22px; }
  .messenger-feed { background: #fff; }
  .messenger-cover { background: linear-gradient(135deg, #607f6f, #b5c9b1); height: 180px; display: flex; justify-content: flex-end; align-items: flex-end; padding: 24px; color: #fff; font-size: 22px; }
  .messenger-post { display: flex; gap: 12px; padding: 22px 16px; border-bottom: 1px solid #eee; }
  .messenger-post__body { flex: 1; min-width: 0; }
  .messenger-post__name { color: #576b95; font-weight: 600; font-size: 15px; }
  .messenger-post__text { margin: 8px 0 12px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
  .messenger-post__meta { display: flex; gap: 12px; justify-content: space-between; color: #999; font-size: 11px; }
  .messenger-comments { background: #f5f5f5; padding: 10px; margin-top: 12px; font-size: 13px; line-height: 1.65; }
  .messenger-comments button { border: 0; background: transparent; color: #576b95; padding: 0; }
  .messenger-quote { border: 0; padding: 8px 12px; background: #e6e6e6; color: #777; text-align: left; font-size: 12px; max-width: 100%; white-space: pre-wrap; overflow-wrap: anywhere; }
  .airp-chat__header { background: #ededed; backdrop-filter: none; }
  .airp-composer { background: #f7f7f7; }
  .airp-chat__peer-name { font-weight: 600; }
}

@layer overrides {
  /* Chat is light-first, not light-only. User-selected dark (or system dark)
   * must reach Chat too. These variables live on the chat subtree so switching
   * back to light does not affect any other application. */
  html[data-color-mode='dark'] .messenger,
  html[data-color-mode='dark'] .airp-chat,
  html[data-color-mode='dark'][data-messenger='true'] .airp-portal {
    color-scheme: dark;
    --airp-bg: #191919; --airp-bg-deep: #131313;
    --airp-surface: #303030; --airp-surface-2: #282828;
    --airp-surface-3: #383838; --airp-surface-glass: #252525;
    --airp-text: #f1f1f1; --airp-text-2: #c0c0c0; --airp-text-3: #939393;
    --airp-border: #414141; --airp-border-strong: #5a5a5a; --airp-divider: #353535;
    --airp-accent: #36bd73; --airp-accent-strong: #59cb8b; --airp-accent-soft: #193d2c;
    --airp-accent-ink: #151515;
    --airp-bubble-self-bg: #315d45; --airp-bubble-self-text: #f0f0f0;
    --airp-bubble-other-bg: #333333; --airp-bubble-other-text: #f0f0f0;
    --airp-text-inverse: #101010;
    background: var(--airp-bg); color: var(--airp-text);
  }
  html[data-color-mode='dark'] .messenger .airp-screen__header,
  html[data-color-mode='dark'] .airp-chat__header { background: #252525; }
  html[data-color-mode='dark'] .messenger-tabs,
  html[data-color-mode='dark'] .airp-composer { background: #272727; border-color: #3a3a3a; }
  html[data-color-mode='dark'] .messenger-tabs button { color: #aaaaaa; }
  html[data-color-mode='dark'] .messenger-tabs button[aria-current=page] { color: #59cb8b; }
  html[data-color-mode='dark'] .messenger-search,
  html[data-color-mode='dark'] .messenger-input,
  html[data-color-mode='dark'] .messenger-card,
  html[data-color-mode='dark'] .messenger-row,
  html[data-color-mode='dark'] .messenger-inbox-row,
  html[data-color-mode='dark'] .messenger-profile,
  html[data-color-mode='dark'] .messenger-feed { background: #303030; color: #f1f1f1; border-color: #3f3f3f; }
  html[data-color-mode='dark'] .messenger-inbox-row--pinned,
  html[data-color-mode='dark'] .messenger-secondary,
  html[data-color-mode='dark'] .messenger-comments { background: #393939; color: #efefef; }
  html[data-color-mode='dark'] .messenger-quote { background: #363636; color: #dddddd; }
}

/* VisualPreview.css */
@layer app {
  /* ── Visual Preview ─────────────────────────────────────────────────────── */

  .airp-preview__device {
    width: 100%;
    max-width: 360px;
    margin: 0 auto var(--airp-space-6);
    background: var(--airp-bg-deep);
    border-radius: 28px;
    border: 2px solid var(--airp-border);
    box-shadow: var(--airp-shadow-3);
    overflow: hidden;
  }

  .airp-preview__device-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--airp-space-3) var(--airp-space-4);
    background: var(--airp-surface-glass);
    border-bottom: 1px solid var(--airp-border);
    font-size: var(--airp-text-sm);
    font-weight: 600;
    color: var(--airp-text-2);
  }

  .airp-preview__time {
    font-family: var(--airp-font-mono);
    font-size: var(--airp-text-xs);
    color: var(--airp-text-3);
  }

  .airp-preview__screen {
    min-height: 520px;
    max-height: 600px;
    overflow: auto;
  }

  .airp-preview__device-chin {
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--airp-bg);
    border-top: 1px solid var(--airp-border);
  }

  .airp-preview__home-indicator {
    width: 120px;
    height: 4px;
    border-radius: 6px;
    background: var(--airp-divider);
  }

  /* 预览态主屏微调 */
  .airp-launcher--preview {
    height: 100%;
    min-height: 520px;
    padding-bottom: var(--airp-space-4);
  }

  .airp-launcher--preview .airp-appgrid {
    flex: 1;
    padding-bottom: 0;
  }

  /* ── Section ────────────────────────────────────────────────────────────── */

  .airp-preview__section-title {
    margin: var(--airp-space-5) 0 var(--airp-space-3);
    font-size: var(--airp-text-lg);
    font-weight: 700;
    color: var(--airp-text);
  }

  /* ── App Cards ──────────────────────────────────────────────────────────── */

  .airp-preview__app-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--airp-space-4);
  }

  .airp-preview__app-card {
    padding: var(--airp-space-4);
    background: var(--airp-surface);
    border: 1px solid var(--airp-border);
    border-radius: var(--airp-radius-lg);
    transition: box-shadow var(--airp-dur-fast) var(--airp-ease);
  }

  .airp-preview__app-card:hover {
    box-shadow: var(--airp-shadow-2);
  }

  .airp-preview__app-header {
    display: flex;
    align-items: center;
    gap: var(--airp-space-3);
    margin-bottom: var(--airp-space-3);
  }

  .airp-preview__app-tile {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    flex-shrink: 0;
  }

  .airp-preview__app-tile--accent {
    background: linear-gradient(150deg, var(--airp-accent) 0%, var(--airp-accent-strong) 100%);
    color: var(--airp-accent-ink);
  }

  .airp-preview__app-tile--attention {
    background: linear-gradient(150deg, var(--airp-attention) 0%, #f0c49a 100%);
    color: #3a2413;
  }

  .airp-preview__app-tile--success {
    background: linear-gradient(150deg, var(--airp-success) 0%, #7fe0b8 100%);
    color: #0d2a20;
  }

  .airp-preview__app-tile--neutral {
    background: var(--airp-surface-3);
    border: 1px solid var(--airp-border);
    color: var(--airp-text);
  }

  .airp-preview__app-meta {
    flex: 1;
    min-width: 0;
  }

  .airp-preview__app-title {
    font-size: var(--airp-text-base);
    font-weight: 600;
    color: var(--airp-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .airp-preview__app-id {
    font-size: var(--airp-text-xs);
    font-family: var(--airp-font-mono);
    color: var(--airp-text-3);
  }

  .airp-preview__app-badge {
    font-size: var(--airp-text-2xs);
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--airp-radius-sm);
    background: var(--airp-success-soft);
    color: var(--airp-success);
    white-space: nowrap;
  }

  .airp-preview__app-badge--hidden {
    background: var(--airp-surface-3);
    color: var(--airp-text-3);
  }

  .airp-preview__app-stats {
    display: flex;
    gap: var(--airp-space-4);
    margin-bottom: var(--airp-space-3);
    font-size: var(--airp-text-xs);
    color: var(--airp-text-2);
  }

  .airp-preview__app-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .airp-preview__app-routes {
    display: flex;
    flex-wrap: wrap;
    gap: var(--airp-space-2);
  }

  .airp-preview__route-pattern {
    font-size: var(--airp-text-2xs);
    font-family: var(--airp-font-mono);
    padding: 2px 4px;
    background: var(--airp-bg-deep);
    border: 1px solid var(--airp-border);
    border-radius: var(--airp-radius-sm);
    color: var(--airp-text-2);
  }

  /* ── Route Table ────────────────────────────────────────────────────────── */

  .airp-preview__route-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--airp-border);
    border-radius: var(--airp-radius-lg);
  }

  .airp-preview__route-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--airp-text-sm);
  }

  .airp-preview__route-table th,
  .airp-preview__route-table td {
    padding: var(--airp-space-2) var(--airp-space-3);
    text-align: left;
    border-bottom: 1px solid var(--airp-divider);
  }

  .airp-preview__route-table th {
    background: var(--airp-surface-glass);
    font-weight: 600;
    color: var(--airp-text-2);
    position: sticky;
    top: 0;
    z-index: 1;
  }

  .airp-preview__route-table td {
    color: var(--airp-text);
  }

  .airp-preview__route-table tbody tr:hover {
    background: var(--airp-surface-glass);
  }

  .airp-preview__route-table code {
    font-family: var(--airp-font-mono);
    font-size: var(--airp-text-xs);
    background: var(--airp-bg-deep);
    padding: 1px 4px;
    border-radius: var(--airp-radius-sm);
    color: var(--airp-accent);
  }
}

/* browser.css */
.np-browser-app { display:flex; flex-direction:column; min-height:70dvh; }
.np-browser-mount { flex:1; min-height:0; }
.np-browser-mount .wave-browser { min-height:65dvh; }
.np-browser-message { padding:8px; overflow-wrap:anywhere; }
.np-browser-mount .fa-solid,.np-browser-mount .fa-regular { display:inline-block; font-style:normal; min-width:1em; margin-inline:4px; }
.np-browser-mount .fa-magnifying-glass::before { content:'⌕'; }
.np-browser-mount .fa-arrow-right::before { content:'→'; }
.np-browser-mount .fa-bookmark::before { content:'☆'; }
.np-browser-mount .fa-solid.fa-bookmark::before { content:'★'; }
.np-browser-mount .fa-arrow-up-from-bracket::before { content:'↗'; }
.np-browser-mount .fa-arrow-up-right-from-square::before { content:'↗'; }
.np-browser-mount .fa-globe::before { content:'◎'; }
.np-browser-mount .fa-trash-can::before { content:'×'; }
.np-browser-mount .fa-filter::before { content:'≡'; }
.np-browser-mount .fa-sliders::before { content:'⚙'; }
.np-browser-mount .fa-chevron-left::before { content:'‹'; }
.np-browser-mount .fa-chevron-right::before { content:'›'; }
.np-browser-mount .fa-clock-rotate-left::before { content:'◷'; }

/* browser.css */
.wave-device .wave-browser {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #eef2f7;
  color: #38465a;
}
.wave-device .wave-browser button,
.wave-device .wave-browser input {
  font: inherit;
}
.wave-device .wave-browser button {
  cursor: pointer;
  border: 0;
  background: transparent;
  color: #5379b5;
}
.wave-device .wave-browser a {
  text-decoration: none;
}
.wave-device .browser-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 20px 16px;
}
.wave-device .browser-wordmark {
  text-align: center;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -2px;
  padding: 8px 0 24px;
}
.wave-device .browser-wordmark.google span:nth-child(1),
.wave-device .browser-wordmark.google span:nth-child(4) {
  color: #4285f4;
}
.wave-device .browser-wordmark.google span:nth-child(2),
.wave-device .browser-wordmark.google span:nth-child(6) {
  color: #ea4335;
}
.wave-device .browser-wordmark.google span:nth-child(3) {
  color: #fbbc05;
}
.wave-device .browser-wordmark.google span:nth-child(5) {
  color: #34a853;
}
.wave-device .browser-search-field,
.wave-device .browser-library-filter {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #dce2ea;
  border-radius: 28px;
  padding: 12px 16px;
  background: #fff;
  box-shadow: 0 3px 8px rgba(48, 67, 96, 0.0431372549);
}
.wave-device .browser-search-field input,
.wave-device .browser-library-filter input {
  width: 0;
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  outline: none;
  color: #38465a;
  font-size: 15px;
}
.wave-device .browser-search-field button,
.wave-device .browser-library-filter button {
  padding: 4px;
}
.wave-device .browser-sections {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid #dbe2ed;
  margin: 16px 0 24px;
}
.wave-device .browser-sections button {
  padding: 8px 0;
  font-size: 13px;
  color: #7b8492;
  border-bottom: 2px solid transparent;
}
.wave-device .browser-sections button[aria-pressed=true] {
  color: #4285f4;
  border-bottom-color: #4285f4;
}
.wave-device .browser-quick-sites {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 8px;
  margin: 16px 2px 8px;
}
.wave-device .browser-quick-sites a {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #3f4e63 !important;
  opacity: 1;
}
.wave-device .browser-quick-sites span {
  width: 48px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid #dfe5ed;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 3px 9px rgba(48, 67, 96, 0.07);
}
.wave-device .browser-quick-sites img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}
.wave-device .browser-quick-sites small {
  max-width: 100%;
  overflow: hidden;
  color: #3f4e63 !important;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wave-device .browser-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 20px 0 12px;
}
.wave-device .browser-section-heading strong {
  font-size: 15px;
}
.wave-device .browser-section-heading small,
.wave-device .browser-section-heading button {
  font-size: 13px;
  color: #8b98ab;
}
.wave-device .browser-current-card,
.wave-device .browser-result-card {
  background: white;
  border-radius: 20px;
  padding: 16px;
  margin-bottom: 16px;
  overflow-wrap: anywhere;
}
.wave-device .browser-current-card > small,
.wave-device .browser-result-card > small {
  display: flex;
  gap: 8px;
  font-size: 13px;
  color: #9099a7;
  margin-bottom: 8px;
}
.wave-device .browser-current-card > strong,
.wave-device .browser-current-card > a,
.wave-device .browser-result-card > strong,
.wave-device .browser-result-card > a {
  display: block;
  font-size: 17px;
  font-weight: 500;
  color: #3869b2;
}
.wave-device .browser-current-card p,
.wave-device .browser-result-card p {
  font-size: 15px;
  line-height: 1.7;
  margin: 8px 0 16px;
  color: #738095;
}
.wave-device .browser-current-card > div,
.wave-device .browser-result-card > div {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.wave-device .browser-current-card > div a,
.wave-device .browser-current-card > div button,
.wave-device .browser-result-card > div a,
.wave-device .browser-result-card > div button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  font-size: 13px;
  color: #5579b3;
}
.wave-device .browser-favorites-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.wave-device .browser-favorites-grid a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: #68758a;
}
.wave-device .browser-favorites-grid span,
.wave-device .browser-favorites-grid .browser-site-icon {
  background: white;
  border-radius: 14px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: #688ac0;
  font-size: 20px;
}
.wave-device .browser-favorites-grid small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}
.wave-device .browser-empty-small {
  padding: 20px 8px;
  text-align: center;
  font-size: 13px;
  line-height: 1.8;
  color: #9ba5b4;
}
.wave-device .browser-saved-row {
  display: flex;
  gap: 8px;
  align-items: center;
  background: white;
  border-radius: 14px;
  padding: 12px;
  margin-top: 12px;
}
.wave-device .browser-saved-row > div {
  flex: 1;
  min-width: 0;
}
.wave-device .browser-saved-row a,
.wave-device .browser-saved-row small,
.wave-device .browser-saved-row time {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wave-device .browser-saved-row a {
  color: #425e87;
  font-size: 15px;
}
.wave-device .browser-saved-row small,
.wave-device .browser-saved-row time {
  font-size: 11px;
  margin-top: 4px;
  color: #9ca6b5;
}
.wave-device .browser-saved-row button {
  padding: 8px;
  flex-shrink: 0;
}
.wave-device .browser-site-icon {
  width: 32px;
  height: 36px;
  display: grid;
  place-items: center;
  color: #7393c6;
}
.wave-device .browser-toolbar {
  flex-shrink: 0;
  padding: 12px 20px 16px;
  background: rgba(249, 251, 252, 0.937254902);
  border-top: 1px solid #e0e6ee;
}
.wave-device .browser-toolbar > nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.wave-device .browser-toolbar button {
  padding: 8px;
  font-size: 17px;
}
.wave-device .browser-toolbar button:disabled {
  opacity: 0.25;
}
.wave-device .browser-address {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #e8edf4;
  border-radius: 14px;
  padding: 8px;
  margin-bottom: 4px;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* phone.css */
.airp-phone-chooser{padding:16px;background:var(--airp-bg);min-height:100%}.airp-phone-search{display:block;width:100%;min-height:44px;border:1px solid var(--airp-border);border-radius:14px;padding:0 12px;background:var(--airp-surface);color:var(--airp-text);margin-bottom:12px}.airp-phone-person{width:100%;display:flex;align-items:center;text-align:left;gap:12px;min-height:72px;border-bottom:1px solid var(--airp-border);font-size:15px}.airp-phone-person span:nth-child(2){flex:1}.airp-phone-chooser-header{min-height:70px;padding:8px 12px;display:flex;gap:12px;align-items:center;background:var(--airp-surface);color:var(--airp-text);border-bottom:1px solid var(--airp-border)}.airp-phone-chooser-header button{width:40px;height:44px}.airp-phone-chooser-header div{display:flex;flex-direction:column;gap:4px}.airp-phone-chooser-header small{color:var(--airp-text-muted)}
.np-phone{height:100%;min-height:0;display:flex;flex-direction:column;background:var(--airp-bg,#f6f5f1);color:var(--airp-text,#292c2a);font-size:15px}.np-topbar{height:44px;flex:none;display:flex;align-items:center;justify-content:space-between;padding:0 12px;border-bottom:1px solid var(--airp-border,#e5e4de);background:var(--airp-surface,#fff)}.np-topbar button{min-height:44px;min-width:44px;display:flex;align-items:center;justify-content:center}.np-topbar span{font-weight:600}.np-body{flex:1;overflow:auto;padding:20px 16px 32px;min-height:0;overscroll-behavior:contain}.np-body h2{font-size:20px;margin:12px 0 16px}.np-homebody{padding:0;overflow:hidden;position:relative}.np-card{border:1px solid var(--airp-border,#e5e4de);background:var(--airp-surface,#fff);border-radius:14px;padding:16px;margin:12px 0;overflow-wrap:anywhere}.np-card h3{font-size:15px;margin:0 0 8px}.np-card p{white-space:pre-wrap;line-height:1.7;margin:8px 0}.np-card small{display:block;color:var(--airp-text-muted,#808578);font-size:11px}.np-card a{display:block;margin-top:8px;color:var(--airp-accent,#507e70);text-decoration:underline}.np-card img,.np-bubble img{width:100%;max-height:360px;object-fit:contain;border-radius:10px;margin-bottom:8px}.np-card audio,.np-bubble audio{max-width:100%}.np-actions,.np-toolbar{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin:12px 0}.np-actions button,.np-toolbar button,.np-body>button,.np-card>button{min-height:40px;padding:8px 12px;border-radius:10px;background:var(--airp-surface-alt,#eeeee7);color:inherit}.np-actions button{font-size:13px}.np-toolbar input{flex:1;min-width:100px;padding:12px;border:1px solid var(--airp-border,#ddd);border-radius:14px;color:inherit;background:var(--airp-surface,#fff)}.np-toolbar small,.np-muted{color:var(--airp-text-muted,#7f857d);font-size:13px;line-height:1.7}.np-empty{padding:32px 16px;text-align:center;color:var(--airp-text-muted,#808578);line-height:1.7}.np-error{padding:16px;border-radius:14px;background:#ffefec;color:#9c483d;overflow-wrap:anywhere}.np-album{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.np-album .np-card{margin:0;padding:12px}.np-plan{display:flex;gap:16px;border-left:2px solid #b5c7b5;padding:12px;margin:0 0 4px;background:var(--airp-surface,#fff);border-radius:0 14px 14px 0}.np-plan time{font-size:11px;flex:0 0 110px;color:var(--airp-text-muted)}.np-chat-row{display:flex;align-items:center;gap:12px;min-height:78px;padding:12px 0;border-bottom:1px solid var(--airp-border);width:100%;text-align:left}.np-chat-row>span{flex:1;min-width:0}.np-chat-row strong,.np-chat-row small{display:block}.np-chat-row small{font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:8px;color:var(--airp-text-muted)}.np-contact{display:flex;gap:12px;align-items:center}.np-contact h3{margin:0}.np-comment{padding:8px;background:var(--airp-bg);border-radius:10px;font-size:13px}.np-homebar{height:40px;flex:none}.np-homebar button{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.np-homebar span{width:100px;height:4px;border-radius:10px;background:currentColor;opacity:.35}.np-bubble{max-width:88%;padding:12px 16px;margin:12px 0;background:var(--airp-surface,#fff);border:1px solid var(--airp-border);border-radius:14px;overflow-wrap:anywhere}.np-bubble p{white-space:pre-wrap;margin:8px 0;line-height:1.7}.np-bubble small{font-size:11px;color:var(--airp-text-muted)}.np-own{margin-left:auto;background:#e6ede2;color:#2d382e}.np-modal{position:fixed;inset:0;z-index:1000;background:#202a2766;display:flex;align-items:center;justify-content:center;padding:20px}.np-modal form{width:min(100%,480px);max-height:90dvh;overflow:auto;border-radius:20px;padding:20px;background:var(--airp-surface,#fff);color:var(--airp-text)}.np-modal h2{margin:0 0 20px}.np-modal label{display:block;font-size:13px;margin:12px 0}.np-modal input,.np-modal textarea{display:block;width:100%;margin-top:8px;border:1px solid var(--airp-border,#ddd);border-radius:10px;padding:12px;background:var(--airp-bg,#f7f7f2);color:inherit}.np-modal textarea{min-height:110px;resize:vertical}.np-phone button:disabled{opacity:.5}.np-phone button:focus-visible,.np-phone input:focus-visible,.np-phone textarea:focus-visible{outline:2px solid #668a73;outline-offset:3px}@media(max-width:340px){.np-body{padding:12px 8px}.np-album{grid-template-columns:1fr}}
/* ── 查手机 · 锁屏 / 主屏 ──────────────────────────────────────────────
 * 舞台固定 390×844，整个手机等比缩放贴合容器，保证设计稿像素级还原。 */
.np-stage-wrap{position:absolute;inset:0;overflow:hidden;background:#0a0c12;touch-action:none;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}
.np-defs{position:absolute;width:0;height:0;overflow:hidden;pointer-events:none}
.np-stage{position:absolute;left:50%;top:50%;width:390px;height:844px;overflow:hidden;isolation:isolate;background:#0a0c12;color:#fff;font-family:var(--airp-font,ui-sans-serif,system-ui,-apple-system,"PingFang SC","Microsoft YaHei",sans-serif);--np-serif:Georgia,"Times New Roman",serif;--np-cjk:"Songti SC","STSong","Source Han Serif SC","Noto Serif SC",serif;--np-tint:rgba(255,255,255,.055);--np-edge:rgba(255,255,255,.22);--np-grid-top:118px;transform-origin:50% 50%}
.np-stage::before{content:"";position:absolute;inset:0;z-index:20;pointer-events:none;box-shadow:inset 0 0 140px -50px rgba(0,0,0,.62)}
.np-stage::after{content:"";position:absolute;inset:0;z-index:21;pointer-events:none;opacity:.18;mix-blend-mode:overlay;background-size:150px 150px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='150' height='150' filter='url(%23g)'/%3E%3C/svg%3E")}
.np-wall{position:absolute;inset:0;z-index:0;overflow:hidden;background:radial-gradient(120% 90% at 50% 0%,#2b2f3d 0%,#12141c 55%,#080a10 100%);filter:saturate(.96) contrast(1.03) brightness(.9);transition:filter .8s ease}
.np-wall img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:58% 60%}
.np-stage[data-state="unlocked"] .np-wall{filter:saturate(.92) contrast(1.06) brightness(.64)}
.np-scrim-top{position:absolute;inset:0 0 auto 0;height:300px;z-index:1;background:linear-gradient(180deg,rgba(6,9,16,.7) 0%,rgba(6,9,16,.32) 46%,rgba(6,9,16,0) 100%);transition:height .8s ease}
.np-scrim-bot{position:absolute;inset:auto 0 0 0;height:430px;z-index:1;background:linear-gradient(0deg,rgba(6,9,16,.88) 0%,rgba(6,9,16,.5) 46%,rgba(6,9,16,0) 100%);transition:opacity .8s ease,height .8s ease}
.np-stage[data-state="unlocked"] .np-scrim-top{height:230px}
.np-stage[data-state="unlocked"] .np-scrim-bot{height:280px;opacity:.8}
.np-veil{position:absolute;inset:0;z-index:1;background:rgba(8,10,16,.26);opacity:0;transition:opacity .8s ease}
.np-stage[data-state="unlocked"] .np-veil{opacity:1}
.np-layer{position:absolute;inset:0;z-index:5}
/* 液态玻璃：极细边线 + 低透明度染色 + 边缘折射 */
.np-lg{position:relative;isolation:isolate;border:.5px solid var(--np-edge);box-shadow:0 24px 80px rgba(0,0,0,.45),inset 0 1px 0 rgba(255,255,255,.28),inset 0 0 0 .5px rgba(255,255,255,.1)}
.np-lg::before{content:"";position:absolute;inset:0;border-radius:inherit;z-index:-1;pointer-events:none;background:var(--np-tint);-webkit-backdrop-filter:blur(1.5px) saturate(160%) brightness(.9);backdrop-filter:blur(1.5px) saturate(160%) brightness(.9);filter:url(#np-lg-refract)}
.np-hud{position:absolute;left:28px;right:64px;top:52px;display:flex;align-items:center;font-size:8.5px;font-weight:500;letter-spacing:.18em;color:rgba(255,255,255,.4);transition:opacity .34s ease,transform .5s cubic-bezier(.3,.7,.2,1)}
.np-hud-l{display:flex;align-items:center;gap:8px}
.np-hud-l i{display:block;width:4px;height:4px;background:rgba(255,255,255,.5);transform:rotate(45deg)}
.np-exit{position:absolute;top:40px;right:22px;z-index:30;width:32px;height:32px;padding:0;border-radius:50%;display:grid;place-items:center;color:rgba(255,255,255,.72);transition:opacity .34s ease,transform .5s cubic-bezier(.3,.7,.2,1)}
.np-clock{position:absolute;left:28px;top:82px;z-index:6;transition:top .72s cubic-bezier(.22,.88,.18,1)}
.np-clock::before{content:"";position:absolute;inset:-70px -100px -50px -70px;z-index:-1;border-radius:50%;background:rgba(3,6,12,.5);filter:blur(52px)}
.np-stage[data-state="unlocked"] .np-clock::before{display:none}
.np-clock-t{font-family:var(--np-serif);font-size:60px;line-height:.92;letter-spacing:-.01em;color:#f7fafd;font-variant-numeric:tabular-nums;text-shadow:0 2px 26px rgba(4,8,14,.66);transition:font-size .72s cubic-bezier(.22,.88,.18,1)}
.np-clock-d{margin-top:13px;display:flex;align-items:center;gap:10px;font-size:8.5px;font-weight:500;letter-spacing:.14em;color:rgba(255,255,255,.52);text-shadow:0 1px 10px rgba(4,8,14,.7);transition:margin .6s ease,font-size .5s ease,opacity .5s ease}
.np-clock-d i{display:block;width:22px;height:1px;background:rgba(255,255,255,.22)}
.np-stage[data-state="unlocked"] .np-clock{top:54px}
.np-stage[data-state="unlocked"] .np-clock-t{font-size:24px}
.np-stage[data-state="unlocked"] .np-clock-d{margin-top:5px;font-size:8px;opacity:.55}
.np-stage[data-state="unlocked"] .np-clock-d i{width:14px}
.np-who{position:absolute;left:28px;top:470px;transition:opacity .34s ease,transform .55s cubic-bezier(.3,.7,.2,1)}
.np-who-nm{font-family:var(--np-cjk);font-size:15px;letter-spacing:.12em;color:rgba(255,255,255,.93);text-shadow:0 2px 18px rgba(4,8,14,.7)}
.np-who-sb{margin-top:7px;display:flex;align-items:center;gap:7px;font-size:8.5px;font-weight:500;letter-spacing:.16em;color:rgba(255,255,255,.44)}
.np-who-dot{width:4px;height:4px;border-radius:50%;background:rgba(255,255,255,.68)}
.np-widget{position:absolute;left:26px;right:26px;top:522px;z-index:6;padding:14px 18px 13px;border-radius:30px;transform-origin:50% 80%;transition:opacity .36s ease,transform .6s cubic-bezier(.3,.7,.2,1),filter .4s ease}
.np-w-k{font-size:9.5px;font-weight:500;letter-spacing:.18em;color:rgba(255,255,255,.46)}
.np-w-now{margin-top:6px;font-size:14.5px;line-height:1.5;letter-spacing:.01em;color:rgba(255,255,255,.95);text-shadow:0 1px 12px rgba(4,8,14,.4);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.np-w-sep{height:.5px;margin:10px 0 9px;background:rgba(255,255,255,.1)}
.np-w-row{display:flex;align-items:baseline}
.np-w-t{width:44px;flex:none;text-align:right;margin-right:12px;font-size:12px;font-weight:500;letter-spacing:.05em;font-variant-numeric:tabular-nums;color:rgba(255,255,255,.52)}
.np-w-n{flex:1;min-width:0;font-size:13px;line-height:1.5;letter-spacing:.01em;color:rgba(255,255,255,.95);text-shadow:0 1px 10px rgba(4,8,14,.35);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.np-w-row+.np-w-row{margin-top:4px}
.np-grid{position:absolute;left:22px;right:22px;top:var(--np-grid-top);z-index:6;display:grid;grid-template-columns:repeat(4,1fr);row-gap:30px;justify-items:center}
.np-app{display:flex;flex-direction:column;align-items:center;gap:7px;min-width:0;padding:0;border:0;background:none;color:inherit;font:inherit;-webkit-tap-highlight-color:transparent}
.np-tile{width:58px;height:58px;border-radius:17px;display:grid;place-items:center;color:rgba(255,255,255,.92);border-color:rgba(255,255,255,.28);transition:transform 160ms ease}
.np-app:active .np-tile{transform:scale(.93)}
.np-app-lb{max-width:100%;font-size:9.5px;font-weight:500;letter-spacing:.06em;color:rgba(255,255,255,.78);text-shadow:0 1px 8px rgba(0,0,0,.55);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.np-app-lock{--home-y:calc(677px - var(--np-grid-top));transition:transform 780ms cubic-bezier(.22,.88,.18,1),opacity 300ms ease}
.np-stage[data-state="locked"] .np-app-lock{transform:translateY(var(--home-y))}
.np-app-gen{transform:translateY(calc(var(--r) * -108px)) scale(.42);opacity:0;transition:transform 720ms cubic-bezier(.22,.88,.18,1),opacity 380ms ease}
.np-stage[data-state="unlocked"] .np-app-gen{transform:none;opacity:1}
.np-stage[data-state="unlocked"] .np-app-gen[data-row="1"]{transition-delay:200ms,200ms}
.np-stage[data-state="unlocked"] .np-app-gen[data-row="2"]{transition-delay:280ms,260ms}
.np-stage[data-state="unlocked"] .np-app-gen[data-row="3"]{transition-delay:360ms,320ms}
.np-stage[data-state="unlocked"] .np-app-gen[data-row="4"]{transition-delay:440ms,380ms}
.np-hint{position:absolute;left:0;right:0;bottom:26px;z-index:7;display:flex;flex-direction:column;align-items:center;gap:9px;font-size:9px;font-weight:500;letter-spacing:.2em;color:rgba(255,255,255,.26);transition:opacity .3s ease}
.np-hint-bar{width:92px;height:2px;border-radius:2px;background:rgba(255,255,255,.38)}
.np-dots{position:absolute;left:0;right:0;bottom:48px;z-index:6;display:flex;justify-content:center;gap:5px;opacity:0;transition:opacity .4s ease .3s}
.np-dots i{display:block;width:5px;height:5px;border-radius:50%;background:rgba(255,255,255,.26)}
.np-dots i.on{background:rgba(255,255,255,.78)}
.np-stage[data-state="unlocked"] .np-dots{opacity:1}
.np-stage-bar{position:absolute;left:0;right:0;bottom:18px;z-index:6;display:flex;justify-content:center}
.np-stage-bar span{width:120px;height:4px;border-radius:4px;background:rgba(255,255,255,.5)}
.np-stage[data-state="unlocked"] .np-hud,.np-stage[data-state="unlocked"] .np-who,.np-stage[data-state="unlocked"] .np-widget,.np-stage[data-state="unlocked"] .np-hint{opacity:0;pointer-events:none}
.np-stage[data-state="unlocked"] .np-hud{transform:translateY(-16px)}
.np-stage[data-state="unlocked"] .np-who{transform:translateY(-10px) scale(1.05)}
.np-stage[data-state="unlocked"] .np-widget{transform:translateY(-8px) scale(1.08);filter:blur(2px)}

/* presets.css */
.presets-app .ps-content{max-width:760px;margin:0 auto;width:100%}.ps-tip{font-size:13px;line-height:1.6;color:#796786;margin:0 0 12px}.ps-group{background:#f7f4fa;border:1px solid #e7dfed;border-radius:14px;padding:12px;margin-bottom:12px}.ps-group-head{display:flex;flex-wrap:wrap;gap:8px 8px;align-items:center;margin-bottom:8px}.ps-group-title{display:flex;align-items:center;gap:4px;flex:1 1 auto;min-width:0;cursor:pointer;padding:4px 4px;border-radius:10px;transition:background var(--airp-dur, .16s) ease}.ps-group-title:hover{background:#efe8f7}.ps-group-title:active{background:#e8e0f1}.ps-group-name{min-width:0;overflow-wrap:anywhere;font-size:13px;font-weight:600;color:#3c3047}.ps-group-chevron{flex:0 0 auto;color:#c3b5d2;transition:transform var(--airp-dur, .16s) ease}.ps-group--collapsed .ps-group-chevron{transform:rotate(-90deg);color:#9672b6}.ps-group--collapsed .ps-list,.ps-group--collapsed .ps-empty,.ps-group--collapsed .ps-entry--draft{display:none}.ps-scenes{display:flex;gap:8px;align-items:center}.ps-scene{display:flex;gap:4px;align-items:center;font-size:13px;color:#796786}.ps-entry{background:#fff;border:1px solid #e7dfed;border-radius:14px;margin-bottom:8px;overflow:hidden}.ps-entry-head{display:flex;gap:8px;align-items:center;padding:4px 8px 4px 12px;cursor:pointer;transition:background var(--airp-dur, .16s) ease}.ps-entry-head:hover{background:#faf7fd}.ps-entry-head:active{background:#f3eef9}.ps-entry-name{flex:1;min-width:0;overflow-wrap:anywhere;font-size:13px}.ps-entry-chevron{flex:0 0 auto;color:#c3b5d2;transition:transform var(--airp-dur, .16s) ease}.ps-entry--open .ps-entry-chevron{transform:rotate(180deg);color:#9672b6}.ps-entry--open .ps-entry-head{background:#f7f2fb}.ps-editor{padding:8px 12px}.ps-editor label{display:flex;flex-direction:column;gap:4px;font-size:13px;color:#796786;margin-bottom:8px}.character-studio .ps-editor input,.character-studio .ps-editor textarea{width:100%;min-width:0;font:inherit;font-size:13px;padding:8px 8px;border:1px solid #e5ddeb;border-radius:10px;background:#fdfbff;color:#3c3047}.ps-editor textarea{min-height:200px;resize:vertical}.ps-actions,.ps-entry-tools{display:flex;gap:8px;flex-wrap:wrap}.character-studio .ps-actions button,.character-studio .ps-entry-tools button,.character-studio .ps-menu button{border:0;min-height:36px;padding:4px 12px;background:#eee8f5;font-size:13px}.character-studio .ps-actions .cs-primary{background:#805da4;color:#fff}.ps-entry-tools{padding:0 12px 8px}.ps-menu{display:flex;flex-wrap:wrap;gap:8px;padding-bottom:12px}.ps-menu--group{padding:0 2px 8px}.character-studio .ps-add{flex:0 0 auto;min-height:28px;padding:0 8px;border:0;border-radius:10px;background:#ede5f5;color:#74518f;font-size:13px;white-space:nowrap;line-height:1;transition:background var(--airp-dur, .16s) ease}.character-studio .ps-add:hover{background:#e3d8f0}.ps-empty{text-align:center;color:#8a7b95;padding:12px 8px;font-size:13px}
/* Preset switches are a compact, refined control: a 34x20 pill that keeps the
 * full 44px tap target via the negative-margin hit box from primitives.css. */
.presets-app .airp-switchbtn{--airp-switch-bleed:calc((20px - var(--airp-tap-min)) / 2)}
.presets-app .airp-switch{width:34px;height:20px}
.presets-app .airp-switch::after{top:2px;left:2px;width:16px;height:16px}
.presets-app .airp-switch[data-on='true']::after{transform:translateX(14px)}

/* original-style.css */
/* @airp-size-exception: generated scoped original offline narrative meeting stylesheet; do not hand edit. */
@charset "UTF-8";
.shepherd-meeting-port {
  /* @airp-size-exception: original meeting stylesheet and required primitives, scoped during build. */
  /* ── 手账导航栏 ── */
}
.shepherd-meeting-port .navbar,
.shepherd-meeting-port .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 4px;
  background: var(--bg-sheet, #fdf8f4);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px dashed rgba(241, 185, 143, 0.28);
}
.shepherd-meeting-port .navbar-title,
.shepherd-meeting-port .scrapbook-navbar-title {
  flex: 1;
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink-brown);
  letter-spacing: 0.02em;
}
.shepherd-meeting-port .navbar-btn,
.shepherd-meeting-port .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;
}
.shepherd-meeting-port .navbar-btn:active,
.shepherd-meeting-port .scrapbook-nav-btn:active {
  transform: scale(0.94);
}
.shepherd-meeting-port .scrapbook-nav-spacer {
  width: 38px;
  height: 38px;
  visibility: hidden;
}
.shepherd-meeting-port {
  /* ── 按钮（半透明磨砂贴纸） ── */
}
.shepherd-meeting-port .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 14px;
  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);
}
.shepherd-meeting-port .btn:active {
  transform: scale(0.96) translateZ(0);
}
.shepherd-meeting-port {
  /* Android WebView 在动态弹窗、Keep-Alive 复挂后可能漏交 backdrop-filter 的首帧，
   * translateZ(0) 又会让每个按钮各自保留一份过期纹理，直到触摸才重新绘制。
   * 原生壳使用按钮自身底色，不创建毛玻璃合成层；浏览器 / PWA 保持原效果。 */
}
.shepherd-meeting-port html.capacitor-native .btn {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transform: none;
  will-change: auto;
}
.shepherd-meeting-port html.capacitor-native .btn:active {
  transform: scale(0.96);
}
.shepherd-meeting-port .btn-primary {
  background: var(--btn-primary-bg);
  border-color: var(--btn-primary-border);
  color: var(--accent-orange-ink);
}
.shepherd-meeting-port .btn-outline {
  background: var(--btn-outline-bg);
  border-color: var(--btn-outline-border);
  color: var(--accent-orange);
}
.shepherd-meeting-port .btn-soft {
  background: var(--btn-soft-bg);
  border-color: var(--btn-soft-border);
  color: var(--accent-pink-ink);
}
.shepherd-meeting-port .btn-sm {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
  border-width: 2px;
  border-radius: 14px;
}
.shepherd-meeting-port .btn-xs {
  min-height: 30px;
  padding: 0 8px;
  font-size: 11px;
  border-width: 2px;
  border-radius: 14px;
}
.shepherd-meeting-port {
  /* ── AI 生成 loading（按钮 + 全页 overlay + 状态条） ── */
}
.shepherd-meeting-port .btn.is-loading {
  pointer-events: none;
  opacity: 0.78;
  cursor: wait;
}
.shepherd-meeting-port .btn.is-loading:active {
  transform: translateZ(0);
}
.shepherd-meeting-port .btn-loading-spinner,
.shepherd-meeting-port .app-busy-spinner,
.shepherd-meeting-port .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;
}
.shepherd-meeting-port .btn .btn-loading-spinner {
  width: 14px;
  height: 14px;
}
.shepherd-meeting-port .navbar-btn.is-loading {
  position: relative;
  opacity: 0.65;
}
.shepherd-meeting-port .navbar-btn.is-loading .svg-icon {
  opacity: 0.2;
}
.shepherd-meeting-port .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;
}
.shepherd-meeting-port .app-busy-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  text-align: center;
}
.shepherd-meeting-port .app-busy-overlay.is-visible {
  display: flex;
}
.shepherd-meeting-port .app-busy-spinner {
  width: 36px;
  height: 36px;
  border-width: 3px;
  opacity: 1;
}
.shepherd-meeting-port .app-busy-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary, #3d342c);
  line-height: 1.45;
  max-width: 280px;
}
.shepherd-meeting-port .app-busy-hint {
  font-size: 13px;
  color: var(--text-hint, #8c7362);
  line-height: 1.5;
  max-width: 300px;
}
.shepherd-meeting-port .app-busy-hint[hidden] {
  display: none;
}
.shepherd-meeting-port .social-gen-status-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.shepherd-meeting-port .forum-gen-status.is-active,
.shepherd-meeting-port .anon-wall-status.is-active,
.shepherd-meeting-port .anon-space-gen-status.is-active {
  display: block;
}
.shepherd-meeting-port .social-gen-status-hint {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-hint, #8c7362);
  line-height: 1.45;
}
.shepherd-meeting-port .generation-activity {
  margin: 8px 12px 0;
  padding: 8px 12px;
  border: 1px solid var(--border, #d8cbbf);
  border-radius: 14px;
  background: var(--surface, #fff);
  color: var(--text-secondary, #6f6259);
  font-size: 13px;
  line-height: 1.4;
}
.shepherd-meeting-port .generation-activity[hidden] {
  display: none;
}
.shepherd-meeting-port .generation-activity-main {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}
.shepherd-meeting-port .generation-activity-hint {
  display: block;
  margin-top: 4px;
  padding-left: 20px;
  color: var(--text-hint, #8c8077);
  font-size: 11px;
}
.shepherd-meeting-port .generation-activity-mark {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--success-soft, #e7f4ec);
  color: var(--success, #397553);
  font-size: 11px;
}
.shepherd-meeting-port .generation-activity.is-error .generation-activity-mark {
  background: var(--danger-soft, #fae8e6);
  color: var(--danger, #a64c45);
}
@keyframes app-gen-spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .shepherd-meeting-port .btn-loading-spinner,
  .shepherd-meeting-port .app-busy-spinner,
  .shepherd-meeting-port .social-gen-status-spinner,
  .shepherd-meeting-port .navbar-btn.is-loading::after {
    animation-duration: 1.4s;
  }
}
.shepherd-meeting-port {
  /* ── 表单（网格纸输入） ── */
}
.shepherd-meeting-port .form-input,
.shepherd-meeting-port select.form-input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 8px 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;
}
.shepherd-meeting-port .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);
}
.shepherd-meeting-port textarea.form-input {
  background: rgba(255, 255, 255, 0.94);
  resize: vertical;
}
.shepherd-meeting-port {
  /* 页面模块加载中 */
}
.shepherd-meeting-port .route-loading {
  min-height: min(420px, 100vh - var(--navbar-h, 44px) - 48px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--ink-soft, #8b7668);
}
.shepherd-meeting-port .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: 20px;
  box-shadow: var(--shadow-paper, 0 8px 22px rgba(140, 115, 98, 0.08));
  padding: 12px;
  margin-bottom: 12px;
}
.shepherd-meeting-port .scrapbook-panel {
  background: var(--surface-card, #fffdf8);
  border: 1px solid var(--surface-card-border, rgba(140, 115, 98, 0.14));
}
.shepherd-meeting-port {
  /* ── Modal ── */
}
.shepherd-meeting-port #modal-container {
  display: none;
  /*
   * 弹窗挂在 #app 内，应跟随 #app 的实测可视高度与顶部偏移。
   * fixed 会脱离 #app，部分 Android WebView 开启屏幕适配后仍按布局视口铺开，
   * 导致居中长表单的顶部或底部落到实际可触区域之外。
   */
  position: absolute;
  inset: 0;
  z-index: 2000;
  pointer-events: none;
}
.shepherd-meeting-port #modal-container.active {
  display: block;
  pointer-events: auto;
}
.shepherd-meeting-port #modal-container.active.has-floating-call {
  pointer-events: none;
}
.shepherd-meeting-port #modal-container.active.has-floating-call .voice-call-overlay {
  pointer-events: auto;
  touch-action: none;
}
.shepherd-meeting-port {
  /* 通话需要跨页面、跨普通弹窗继续存在，独立挂载避免 #modal-container
   * 被表情、购物等弹层替换时连同实时转写一起销毁。 */
}
.shepherd-meeting-port #capability-approval-container {
  position: absolute;
  inset: 0;
  z-index: 2200;
}
.shepherd-meeting-port #voice-call-container {
  position: fixed;
  inset: 0;
  z-index: 2100;
  pointer-events: none;
}
.shepherd-meeting-port #voice-call-container .voice-call-overlay {
  pointer-events: auto;
}
.shepherd-meeting-port #voice-call-container.has-floating-call .voice-call-overlay {
  touch-action: none;
}
.shepherd-meeting-port .modal-overlay {
  /* #modal-container 已经锚定在 #app 的实测可见区；遮罩继续用 fixed
   * 会在部分 Android WebView 里重新参照布局视口，底部钻到系统导航键后。 */
  position: absolute;
  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;
}
.shepherd-meeting-port .modal-sheet {
  width: 100%;
  /* 旧 Android System WebView 不支持 min()/dvh 时，后面的声明会整条失效。
     先给所有弹层一个只依赖实测应用高度的兜底，避免内容把操作栏顶出屏幕。 */
  max-height: calc(var(--app-height, 100vh) - 12px);
  max-height: min(85dvh, var(--app-height, 100dvh) - 12px);
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #fffdf8;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  overflow: hidden;
  animation: modalSlideUp 0.28s ease-out;
}
.shepherd-meeting-port .modal-overlay.modal-sheet-center .modal-sheet,
.shepherd-meeting-port .offline-ff-sheet {
  background: #fffdf8;
}
.shepherd-meeting-port .modal-header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px dashed rgba(140, 115, 98, 0.18);
}
.shepherd-meeting-port .modal-header h3 {
  margin: 0;
  font-size: var(--font-lg);
  font-weight: 700;
  color: var(--ink-brown);
}
.shepherd-meeting-port .modal-body {
  flex: 1 1 auto;
  padding: 16px;
  overflow-y: auto;
  /* 与 .modal-sheet 同理：这一行是旧 WebView 可解析的通用长内容兜底。 */
  max-height: calc(var(--app-height, 100vh) - 140px);
  max-height: min(60dvh, var(--app-height, 100dvh) - 112px);
  min-height: 0;
  scroll-padding-block: 12px 20px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  /* 列表项多为 .btn（touch-action:manipulation），安卓 WebView 上需显式 pan-y 才能拖滚 */
  touch-action: pan-y;
}
.shepherd-meeting-port .modal-footer {
  flex: 0 0 auto;
}
.shepherd-meeting-port html.capacitor-native .modal-footer {
  padding-bottom: max(12px, var(--safe-bottom, 0px));
}
.shepherd-meeting-port html.capacitor-native .modal-sheet > .modal-body:last-child {
  padding-bottom: calc(16px + var(--safe-bottom, 0px));
}
.shepherd-meeting-port {
  /*
   * 朋友圈与论坛设置都是长表单：外壳必须拥有确定高度，正文单独滚动，
   * 页头与保存栏留在可视区内。这里同时覆盖普通网页、第三方 WebView、
   * PWA 与 Capacitor；不能只依赖 capacitor-native 标识。
   */
  /* 线下沉浸态 · 信纸长卷（复用 story-card 视觉语言） */
}
.shepherd-meeting-port .offline-page {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  overflow-x: hidden;
}
.shepherd-meeting-port .offline-scroll {
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 12px 12px calc(16px + var(--safe-bottom));
  -webkit-overflow-scrolling: touch;
}
.shepherd-meeting-port {
  /* 场景卡 */
}
.shepherd-meeting-port .offline-scene-card {
  padding: 0;
  overflow: hidden;
}
.shepherd-meeting-port .offline-scene-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 12px;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
}
.shepherd-meeting-port .offline-scene-label {
  font-size: var(--font-sm);
  font-weight: 700;
  color: var(--text);
  flex: 0 0 auto;
}
.shepherd-meeting-port .offline-scene-summary {
  flex: 1;
  min-width: 0;
  font-size: var(--font-sm);
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shepherd-meeting-port .offline-scene-caret {
  flex: 0 0 auto;
  font-size: var(--font-xs);
  color: var(--text-hint);
}
.shepherd-meeting-port .offline-scene-body {
  padding: 0 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px dashed var(--border);
}
.shepherd-meeting-port {
  /* hidden 属性需压过上面的 display:flex（作者类样式默认胜过 UA 的 [hidden]），否则收起无效 */
}
.shepherd-meeting-port .offline-scene-body[hidden] {
  display: none;
}
.shepherd-meeting-port .offline-scene-body .off-scene-save {
  align-self: flex-start;
}
.shepherd-meeting-port {
  /* 开场设定 */
}
.shepherd-meeting-port .offline-setup {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.shepherd-meeting-port .offline-setup .off-start {
  margin-top: 4px;
}
.shepherd-meeting-port {
  /* beat 流 · 信纸长卷 */
}
.shepherd-meeting-port .offline-beats {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.shepherd-meeting-port .offline-empty {
  text-align: center;
  padding: 32px 12px;
  font-size: var(--font-sm);
  color: var(--text-hint);
}
.shepherd-meeting-port {
  /* 手账日记 · 叙事条目（带小框） */
}
.shepherd-meeting-port .offline-beat--narration {
  position: relative;
  margin-top: 8px;
  background: linear-gradient(rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.55)), var(--chat-paper);
  border: 1px solid var(--surface-card-border);
  border-radius: 14px;
  padding: 20px 16px 16px;
  box-shadow: var(--shadow-paper);
  background-image: repeating-linear-gradient(to bottom, transparent, transparent 31px, rgba(140, 115, 98, 0.045) 32px);
}
.shepherd-meeting-port {
  /* 内层手账小框：一层细虚线描边 */
}
.shepherd-meeting-port .offline-beat--narration::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px dashed rgba(140, 115, 98, 0.26);
  border-radius: 10px;
  pointer-events: none;
}
.shepherd-meeting-port {
  /* 顶部小标签（washi 胶带感） */
}
.shepherd-meeting-port .offline-beat--narration::before {
  content: "线下手账";
  position: absolute;
  top: -9px;
  left: 16px;
  padding: 4px 12px;
  font-size: var(--font-xs);
  letter-spacing: 0.04em;
  color: #fff;
  background: linear-gradient(135deg, #f1b98f, #e2895f);
  border-radius: 999px;
  box-shadow: 0 3px 8px rgba(213, 138, 92, 0.3);
  transform: rotate(-2deg);
}
.shepherd-meeting-port .offline-beat--narration p {
  position: relative;
  margin: 0 0 12px;
  padding: 0 4px;
  font-size: var(--font-md);
  line-height: 1.92;
  color: var(--text);
  text-indent: 2em;
}
.shepherd-meeting-port .offline-beat--narration p:last-child {
  margin-bottom: 0;
}
.shepherd-meeting-port .offline-reasoning {
  position: relative;
  z-index: 1;
  margin: 0 0 16px;
  border: 1px solid var(--surface-card-border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  color: var(--text-hint);
  font-family: ui-sans-serif, system-ui, sans-serif;
}
.shepherd-meeting-port .offline-session-page[data-os-reasoning=off] .offline-reasoning {
  display: none;
}
.shepherd-meeting-port .offline-reasoning summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  cursor: pointer;
  list-style: none;
  font-size: var(--font-xs);
}
.shepherd-meeting-port .offline-reasoning summary::-webkit-details-marker {
  display: none;
}
.shepherd-meeting-port .offline-reasoning summary i {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border: 1px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
}
.shepherd-meeting-port .offline-reasoning.is-streaming summary i {
  animation: offlineReasoningSpin 0.8s linear infinite;
}
.shepherd-meeting-port .offline-reasoning:not(.is-streaming) summary i {
  border: 0;
  border-radius: 0;
  width: 6px;
  height: 6px;
  background: var(--text-accent, #c98a5c);
  transform: rotate(45deg);
}
.shepherd-meeting-port .offline-reasoning pre {
  max-height: 210px;
  overflow: auto;
  margin: 0;
  padding: 0 12px 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 11px/1.65 ui-monospace, SFMono-Regular, Consolas, monospace;
  color: var(--text-hint);
}
.shepherd-meeting-port .offline-model-output-note {
  margin: 8px 0 0;
  color: var(--os-muted, #8a8179);
  font-size: 13px;
  line-height: 1.55;
}
@keyframes offlineReasoningSpin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .shepherd-meeting-port .offline-reasoning.is-streaming summary i {
    animation: none;
  }
}
.shepherd-meeting-port {
  /* 叙事正文里的翻译入口：紧跟在外语/方言词句后面，默认收起，点开才露出中文 */
}
.shepherd-meeting-port .narration-translate-btn {
  display: inline;
  border: none;
  background: none;
  padding: 0 0 0 4px;
  margin: 0;
  font: inherit;
  font-size: 0.78em;
  line-height: 1;
  color: var(--text-accent, #c98a5c);
  text-decoration: underline dotted;
  text-underline-offset: 2px;
  text-indent: 0;
  cursor: pointer;
  vertical-align: 1px;
}
.shepherd-meeting-port .narration-translate-btn:hover,
.shepherd-meeting-port .narration-translate-btn:focus-visible {
  color: var(--text);
}
.shepherd-meeting-port .narration-translation {
  display: inline;
  text-indent: 0;
  padding: 1px 4px;
  margin-left: 2px;
  border-radius: 6px;
  background: rgba(226, 137, 95, 0.12);
  color: var(--chat-translation-ink, var(--text-secondary, #8c7362));
  font-size: var(--chat-translation-font-size, 0.92em);
}
.shepherd-meeting-port .narration-translation[hidden] {
  display: none;
}
.shepherd-meeting-port .narration-translation::before {
  content: "〔";
  opacity: 0.55;
}
.shepherd-meeting-port .narration-translation::after {
  content: "〕";
  opacity: 0.55;
}
.shepherd-meeting-port .offline-beat-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
  padding-top: 4px;
  position: relative;
  z-index: 1;
}
.shepherd-meeting-port .offline-beat-actions > :where(button) {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-hint);
  font-family: inherit;
  font-size: var(--font-xs);
  line-height: 1.4;
  padding: 4px 8px;
  white-space: nowrap;
  cursor: pointer;
}
.shepherd-meeting-port .offline-beat-actions > :where(button:active) {
  color: var(--text-accent);
}
.shepherd-meeting-port .offline-beat-actions > :where(button:disabled) {
  opacity: 0.45;
  cursor: default;
}
.shepherd-meeting-port .offline-beat-actions > :where(button:focus-visible) {
  outline: 2px solid var(--text-accent);
  outline-offset: 2px;
}
.shepherd-meeting-port .offline-beat-delete {
  padding-left: 4px;
}
.shepherd-meeting-port {
  /*
   * 流式输出光标只能跟在正文流的最后一段。
   * 不能使用宽泛的 `p:last-child` 后代选择器：楼层内的推理、信息卡、HTML 组件
   * 也可能包含末尾 p，旧写法会让光标跑进这些附属内容甚至同时出现多枚。
   */
}
.shepherd-meeting-port .offline-beat--narration.is-streaming > [data-offline-stream-body] > p:last-child::after,
.shepherd-meeting-port .au-theater-page .offline-beat--narration.is-streaming > p:last-child::after {
  content: "▌" !important;
  position: static !important;
  inset: auto !important;
  display: inline !important;
  float: none !important;
  width: auto !important;
  height: auto !important;
  margin: 0 0 0 1px !important;
  padding: 0 !important;
  color: var(--text-accent, #c98a5c) !important;
  font: inherit !important;
  line-height: inherit !important;
  writing-mode: horizontal-tb !important;
  transform: none !important;
  animation: offlineStreamCaret 1s steps(2, start) infinite !important;
}
@keyframes offlineStreamCaret {
  50% {
    opacity: 0;
  }
}
.shepherd-meeting-port {
  /* 你的方向 · 像贴在页边的手写便签 */
}
.shepherd-meeting-port .offline-beat--directive {
  align-self: flex-end;
  max-width: 82%;
  position: relative;
  background: rgba(241, 185, 143, 0.14);
  border: 1px solid rgba(241, 185, 143, 0.34);
  border-radius: 6px 14px 14px 14px;
  padding: 8px 12px;
  box-shadow: 0 2px 6px rgba(213, 138, 92, 0.12);
  transform: rotate(0.6deg);
}
.shepherd-meeting-port .offline-beat--directive span {
  display: block;
  font-size: var(--font-xs);
  color: var(--text-accent);
  margin-bottom: 2px;
}
.shepherd-meeting-port .offline-beat--directive p,
.shepherd-meeting-port .offline-beat--opening p,
.shepherd-meeting-port .os-beat-multiline {
  margin: 0;
  font-size: var(--font-sm);
  line-height: 1.6;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}
.shepherd-meeting-port .offline-beat--directive .offline-beat-actions {
  margin-top: 4px;
  padding-top: 0;
}
.shepherd-meeting-port {
  /* 你的开场 · 剧情由你写下第一句 */
}
.shepherd-meeting-port .offline-beat--opening {
  align-self: flex-end;
  max-width: 88%;
  position: relative;
  background: rgba(255, 248, 240, 0.92);
  border: 1px solid rgba(226, 137, 95, 0.38);
  border-radius: 6px 14px 14px 14px;
  padding: 8px 12px 8px;
  box-shadow: 0 2px 8px rgba(213, 138, 92, 0.14);
  transform: rotate(-0.4deg);
}
.shepherd-meeting-port .offline-beat--opening span {
  display: block;
  font-size: var(--font-xs);
  color: var(--text-accent);
  margin-bottom: 4px;
  font-weight: 600;
}
.shepherd-meeting-port .offline-beat--opening p {
  margin: 0;
  font-size: var(--font-md);
  line-height: 1.72;
  color: var(--text);
  white-space: pre-wrap;
}
.shepherd-meeting-port .offline-beat--opening .offline-beat-actions {
  margin-top: 4px;
  padding-top: 0;
}
.shepherd-meeting-port {
  /* 活动类型分段下的旅行专属字段（出行天数 / 关键词查地点） */
}
.shepherd-meeting-port .off-trip-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
  margin-top: 2px;
  border: 1px dashed var(--surface-card-border);
  border-radius: var(--radius-md);
  background: rgba(255, 253, 248, 0.55);
}
.shepherd-meeting-port .off-trip-fields .off-query-place {
  align-self: flex-start;
}
.shepherd-meeting-port .off-trip-fields[hidden] {
  display: none;
}
.shepherd-meeting-port {
  /* 顶部「第 N / 共 M 天」行程进度条 */
}
.shepherd-meeting-port .offline-trip-progress {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  background: rgba(241, 185, 143, 0.16);
  border: 1px solid rgba(241, 185, 143, 0.36);
  font-size: var(--font-sm);
  color: var(--text);
}
.shepherd-meeting-port .offline-trip-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.shepherd-meeting-port .offline-trip-day-summary {
  font-size: var(--font-xs);
  color: var(--text-muted);
  line-height: 1.4;
}
.shepherd-meeting-port .offline-trip-day-stops {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.shepherd-meeting-port .offline-trip-stop-chip {
  font-size: var(--font-xs);
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(241, 185, 143, 0.4);
  color: var(--text-muted);
}
.shepherd-meeting-port .offline-trip-replan-btn {
  align-self: flex-start;
  border: none;
  background: transparent;
  color: var(--text-accent, #c98a5c);
  font-size: var(--font-xs);
  font-weight: 600;
  padding: 2px 0;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(201, 138, 92, 0.4);
}
.shepherd-meeting-port .offline-trip-replan-btn:disabled {
  opacity: 0.6;
  cursor: default;
}
.shepherd-meeting-port {
  /* 每日岔路 checkpoint 卡：预生成的选项，选完把结果交给角色续写，不是 AI 临时想的走向选项 */
}
.shepherd-meeting-port .offline-trip-checkpoint {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  background: rgba(120, 160, 150, 0.12);
  border: 1px dashed rgba(120, 160, 150, 0.45);
}
.shepherd-meeting-port .offline-trip-checkpoint-prompt {
  font-size: var(--font-sm);
  color: var(--text);
  line-height: 1.5;
}
.shepherd-meeting-port .offline-trip-checkpoint-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.shepherd-meeting-port .offline-trip-checkpoint-opt {
  font-size: var(--font-sm);
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(120, 160, 150, 0.5);
  background: rgba(255, 255, 255, 0.7);
  color: var(--text);
  cursor: pointer;
}
.shepherd-meeting-port .offline-trip-checkpoint-opt:hover {
  background: rgba(120, 160, 150, 0.22);
}
.shepherd-meeting-port {
  /* 场景「更多设置」折叠开关 + 分组小标题 */
}
.shepherd-meeting-port .off-more-toggle {
  align-self: flex-start;
  border: none;
  background: transparent;
  color: var(--text-accent, #c98a5c);
  font-size: var(--font-sm);
  font-weight: 600;
  padding: 4px 2px;
  cursor: pointer;
}
.shepherd-meeting-port .off-more-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 4px;
  border-top: 1px dashed var(--border);
}
.shepherd-meeting-port .off-more-fields[hidden] {
  display: none;
}
.shepherd-meeting-port .off-settings-divider {
  margin-top: 4px;
  font-size: var(--font-xs);
  font-weight: 700;
  color: var(--text-hint);
  letter-spacing: 0.03em;
}
.shepherd-meeting-port {
  /* 仅由相遇页显式开启的线下输入模式；共享机制组件在旅行等页面不会渲染这一组。 */
}
.shepherd-meeting-port .off-encounter-modes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 2px 0 4px;
}
.shepherd-meeting-port .off-mode-toggle {
  position: relative;
  min-width: 0;
  min-height: 76px;
  padding: 0;
  display: flex;
  align-items: flex-start;
  cursor: pointer;
}
.shepherd-meeting-port .off-mode-toggle input {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.shepherd-meeting-port .off-mode-toggle > span {
  width: 100%;
  min-height: inherit;
  box-sizing: border-box;
  padding: 8px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid var(--border-soft, rgba(15, 16, 18, 0.1));
  border-radius: 14px;
  background: transparent;
  pointer-events: none;
}
.shepherd-meeting-port .off-mode-toggle strong {
  color: var(--text, #1b1c20);
  font-size: 13px;
  font-weight: 650;
}
.shepherd-meeting-port .off-mode-toggle small {
  color: var(--text-hint, #7a7d86);
  font-size: 11px;
  line-height: 1.45;
}
.shepherd-meeting-port .off-mode-toggle input:checked + span {
  border-color: var(--os-accent, #5c6b8a);
  background: var(--os-accent-soft, rgba(92, 107, 138, 0.09));
}
.shepherd-meeting-port .off-mode-toggle input:checked + span strong {
  color: var(--os-accent, #5c6b8a);
}
.shepherd-meeting-port .off-mode-toggle:focus-within {
  outline: 2px solid color-mix(in srgb, var(--os-accent, #5c6b8a) 40%, transparent);
  outline-offset: 2px;
}
@media (max-width: 430px) {
  .shepherd-meeting-port .off-encounter-modes {
    grid-template-columns: 1fr;
  }
  .shepherd-meeting-port .off-mode-toggle {
    min-height: 58px;
  }
}
.shepherd-meeting-port .off-field-hint {
  margin: 2px 0 0;
  font-size: 11px;
  color: var(--text-hint);
}
.shepherd-meeting-port select.off-scene-worldbook[multiple],
.shepherd-meeting-port select.off-scene-preset-style[multiple] {
  height: auto;
  padding: 4px;
}
.shepherd-meeting-port select.off-scene-worldbook[multiple] option,
.shepherd-meeting-port select.off-scene-preset-style[multiple] option {
  padding: 4px 8px;
  border-radius: 6px;
}
.shepherd-meeting-port {
  /* 场景预设条 */
}
.shepherd-meeting-port .off-preset-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.shepherd-meeting-port .off-preset-bar .off-preset-select {
  flex: 1 1 auto;
  min-width: 0;
}
.shepherd-meeting-port .off-preset-bar .off-preset-multi {
  flex: 1 0 100%;
  min-width: 0;
}
.shepherd-meeting-port .off-preset-multi > summary {
  cursor: pointer;
  padding: 12px 0;
}
.shepherd-meeting-port .off-preset-multi [data-preset-checks] {
  display: grid;
  gap: 4px;
  max-height: 240px;
  overflow-y: auto;
}
.shepherd-meeting-port .off-preset-multi > summary:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
.shepherd-meeting-port {
  /* beat 场景图 */
}
.shepherd-meeting-port .offline-beat-image {
  position: relative;
  margin-top: 8px;
}
.shepherd-meeting-port .offline-beat-image--error {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 12px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--c-ink, #2a2622) 6%, transparent);
  font-size: 13px;
  line-height: 1.45;
  color: color-mix(in srgb, var(--c-ink, #2a2622) 72%, transparent);
}
.shepherd-meeting-port .offline-beat-image--error p {
  margin: 0;
}
.shepherd-meeting-port .offline-beat-image img {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--surface-card-border);
  cursor: zoom-in;
}
.shepherd-meeting-port .offline-beat-image-save,
.shepherd-meeting-port .offline-audio-history-image-save {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 34px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 999px;
  background: rgba(20, 24, 28, 0.68);
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  font-size: 13px;
  line-height: 1;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.shepherd-meeting-port .offline-beat-image-save {
  position: absolute;
  right: 10px;
  bottom: 10px;
}
.shepherd-meeting-port .offline-beat-image-save svg,
.shepherd-meeting-port .offline-audio-history-image-save svg {
  width: 14px;
  height: 14px;
}
.shepherd-meeting-port .offline-beat-image-save:disabled,
.shepherd-meeting-port .offline-audio-history-image-save:disabled {
  opacity: 0.55;
}
.shepherd-meeting-port .offline-beat-image-warning {
  margin: 4px 2px 0;
  color: color-mix(in srgb, var(--c-ink, #2a2622) 58%, transparent);
  font-size: 13px;
  line-height: 1.4;
}
.shepherd-meeting-port .offline-html-widgets {
  display: grid;
  gap: 8px;
  margin: 12px 0 4px;
}
.shepherd-meeting-port .offline-html-widget {
  min-width: 0;
}
.shepherd-meeting-port .offline-beat-image-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}
.shepherd-meeting-port .offline-beat-audio {
  display: block;
  width: 100%;
  margin-top: 8px;
}
.shepherd-meeting-port .au-theater-page .offline-beat-audio[hidden],
.shepherd-meeting-port .au-theater-page [data-au-audio-load][hidden] {
  display: none;
}
.shepherd-meeting-port .offline-beat-voice-lines {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}
.shepherd-meeting-port .offline-beat-voice-line > span {
  overflow-wrap: anywhere;
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  opacity: 0.66;
}
.shepherd-meeting-port .offline-beat-voice-line .offline-beat-audio {
  margin-top: 0;
}
.shepherd-meeting-port .offline-beat-voice-line .cached-audio-save {
  display: block;
  min-height: 44px;
  margin: 4px 0 0 auto;
}
.shepherd-meeting-port .cached-audio-save:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
.shepherd-meeting-port {
  /* 「叫TA也来」角色选择弹层 */
}
.shepherd-meeting-port .offline-attendance-sheet {
  box-sizing: border-box;
  width: min(100%, 560px);
  /* 旧 Android WebView 对只有 max-height 的 flex 弹层收缩不稳定。
     先用父层的确定高度给外壳一个可计算高度，正文才能成为独立滚动区。 */
  height: calc(100% - 12px);
  max-height: 760px;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
}
@supports (height: 100dvh) {
  .shepherd-meeting-port .offline-attendance-sheet {
    height: min(85dvh, var(--app-height, 100dvh) - 12px, 760px);
  }
}
.shepherd-meeting-port .offline-add-participant-list {
  flex: 1 1 0;
  min-height: 0;
  max-height: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-x: hidden;
  overflow-y: auto;
  padding-bottom: calc(16px + var(--safe-bottom, 0px));
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
}
.shepherd-meeting-port .offline-add-participant-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px;
  border: 1px solid var(--border-soft, #ece0d6);
  border-radius: var(--radius-md, 14px);
  background: var(--surface, #fdf8f4);
  font-size: var(--font-sm);
  color: var(--text);
}
.shepherd-meeting-port .offline-attendance-name {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shepherd-meeting-port .offline-add-participant-row > em {
  flex: 0 0 auto;
  color: var(--text-hint);
  font-size: var(--font-xs);
  font-style: normal;
}
.shepherd-meeting-port .offline-attendance-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 4px;
}
.shepherd-meeting-port .offline-add-participant-row .btn {
  flex: 0 0 auto;
}
.shepherd-meeting-port button.offline-add-participant-row {
  width: 100%;
  text-align: left;
  cursor: pointer;
}
.shepherd-meeting-port {
  /* 手机插曲 · 折进现场时间线的一小段线上往来 */
}
.shepherd-meeting-port .offline-beat--interlude {
  align-self: stretch;
  background: rgba(126, 140, 160, 0.08);
  border: 1px dashed rgba(126, 140, 160, 0.35);
  border-radius: 10px;
  padding: 8px 12px;
}
.shepherd-meeting-port .offline-beat--interlude span {
  display: block;
  font-size: var(--font-xs);
  color: var(--text-hint);
  margin-bottom: 4px;
}
.shepherd-meeting-port .offline-beat--interlude p {
  margin: 0;
  font-size: var(--font-sm);
  line-height: 1.6;
  color: var(--text-secondary);
  white-space: pre-wrap;
}
.shepherd-meeting-port .offline-beat--interlude .offline-beat-actions {
  margin-top: 4px;
  padding-top: 0;
}
.shepherd-meeting-port {
  /* 工具宫格与输入栏共用一个受限底部区，避免 Android WebView 高度波动时把输入栏挤出页面。 */
}
.shepherd-meeting-port .offline-bottom-stack {
  position: relative;
  z-index: 4;
  flex: 0 1 auto;
  min-height: 0;
  max-height: 72%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.shepherd-meeting-port .offline-bottom-stack > .offline-options,
.shepherd-meeting-port .offline-bottom-stack > .offline-tools {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
}
.shepherd-meeting-port {
  /* 长等待只提供状态与用户主动停止入口，不自动中断可能仍在处理的慢请求。 */
}
.shepherd-meeting-port .offline-generation-wait {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 8px 12px;
  border-top: 1px solid var(--os-line, var(--border));
  background: var(--os-paper, var(--bg-sheet));
  color: var(--os-ink-2, var(--text-secondary));
  font-family: var(--os-sans, sans-serif);
  font-size: 13px;
  line-height: 1.45;
}
.shepherd-meeting-port .offline-generation-wait[hidden] {
  display: none !important;
}
.shepherd-meeting-port .offline-generation-wait > span {
  min-width: 0;
}
.shepherd-meeting-port #offline-generation-wait-stop {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 0 !important;
  height: 30px !important;
  padding: 0 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid var(--os-line, var(--border)) !important;
  border-radius: 10px !important;
  background: transparent !important;
  color: var(--os-ink, var(--text)) !important;
  font: 500 13px/1 var(--os-sans, sans-serif) !important;
  letter-spacing: 0 !important;
  writing-mode: horizontal-tb !important;
  white-space: nowrap !important;
}
.shepherd-meeting-port #offline-generation-wait-stop::before,
.shepherd-meeting-port #offline-generation-wait-stop::after {
  content: none !important;
  display: none !important;
}
.shepherd-meeting-port {
  /* 底部推进栏 */
}
.shepherd-meeting-port .offline-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px calc(10px + var(--safe-bottom));
  background: var(--bg-sheet);
  border-top: 1px solid var(--border);
}
.shepherd-meeting-port .offline-scene-autofill {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 8px;
  font-size: var(--font-sm, 13px);
  color: var(--text-muted, #8a7f76);
}
.shepherd-meeting-port .offline-scene-autofill strong {
  color: var(--text, #2b2420);
  font-weight: 600;
}
.shepherd-meeting-port .offline-navbar-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
}
.shepherd-meeting-port .offline-session-page.offline-page > .navbar > .navbar-title {
  position: static;
  width: auto;
  max-width: none;
  min-width: 0;
  text-align: center;
  transform: none;
}
.shepherd-meeting-port .offline-settings-sheet {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.shepherd-meeting-port .offline-settings-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 22, 18, 0.36);
}
.shepherd-meeting-port .offline-settings-sheet-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 560px);
  max-height: min(86vh, var(--app-height, 100dvh) - 12px, 760px);
  display: flex;
  flex-direction: column;
  border-radius: 20px 20px 0 0;
  background: var(--bg-sheet, #fbf7f2);
  box-shadow: 0 -12px 40px rgba(40, 28, 18, 0.18);
}
.shepherd-meeting-port .offline-settings-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 16px 8px;
  border-bottom: 1px solid var(--border-soft, #ece0d6);
}
.shepherd-meeting-port .offline-settings-sheet-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
}
.shepherd-meeting-port .offline-settings-sheet-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 12px 16px 20px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}
.shepherd-meeting-port .offline-settings-sheet-foot {
  flex: 0 0 auto;
  padding: 8px 16px calc(12px + var(--safe-bottom));
  border-top: 1px solid var(--border-soft, #ece0d6);
  background: var(--bg-sheet, #fbf7f2);
}
.shepherd-meeting-port .offline-settings-sheet-foot .btn {
  width: 100%;
}
.shepherd-meeting-port .offline-page--trip .offline-settings-sheet-panel,
.shepherd-meeting-port .offline-page--trip .offline-settings-sheet-foot {
  background: #f7fbfa;
}
.shepherd-meeting-port {
  /* 输入框包裹层：末尾内嵌展开按钮 */
}
.shepherd-meeting-port .offline-bar .offline-input-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}
.shepherd-meeting-port .offline-bar .offline-input-wrap .offline-directive {
  /* 块级：textarea 默认 inline-block 会在父级基线下方留出空隙，导致包裹层底边框
   * 比输入区底边低约 5px，形成两条对不齐的底边。 */
  display: block;
  width: 100%;
  min-height: 38px;
  max-height: 132px;
  padding: 8px 70px 8px 12px;
  resize: none;
  overflow-y: auto;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  /* iOS 上 field-sizing 会在拼音 composition 中持续改高，打乱系统候选栏位置 */
  field-sizing: content;
}
.shepherd-meeting-port html.ios-webkit .offline-bar .offline-input-wrap .offline-directive {
  field-sizing: fixed;
}
.shepherd-meeting-port {
  /* 输入框末尾的展开大输入框按钮（多行时贴右下，图标用 SVG 避免字符基线歪斜） */
}
.shepherd-meeting-port .offline-bar .offline-expand,
.shepherd-meeting-port .offline-bar .offline-directive-clear {
  position: absolute;
  right: 4px;
  bottom: 4px;
  top: auto;
  transform: none;
  width: 30px;
  height: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text-hint);
  line-height: 0;
  cursor: pointer;
}
.shepherd-meeting-port .offline-bar .offline-directive-clear {
  right: 34px;
}
.shepherd-meeting-port .offline-directive-clear[hidden] {
  display: none !important;
}
.shepherd-meeting-port .offline-bar .offline-expand .svg-icon,
.shepherd-meeting-port .offline-bar .offline-directive-clear .svg-icon {
  width: 16px;
  height: 16px;
}
.shepherd-meeting-port .offline-bar .offline-expand:active,
.shepherd-meeting-port .offline-bar .offline-directive-clear:active {
  color: var(--accent, #e2895f);
}
.shepherd-meeting-port {
  /* 左侧 + 工具按钮 */
}
.shepherd-meeting-port .offline-bar .offline-plus {
  flex: 0 0 auto;
  width: 38px;
  min-width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-soft, #ece0d6);
  border-radius: 50%;
  background: var(--surface, #fdf8f4);
  color: var(--text-secondary);
  cursor: pointer;
}
.shepherd-meeting-port .offline-bar .offline-plus .svg-icon {
  width: 20px;
  height: 20px;
}
.shepherd-meeting-port {
  /* 图标推进按钮（仅图标，不带文字） */
}
.shepherd-meeting-port .offline-bar .offline-advance {
  flex: 0 0 auto;
  width: 46px;
  min-width: 46px;
  height: 38px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.shepherd-meeting-port .offline-bar .offline-advance .svg-icon {
  width: 20px;
  height: 20px;
}
.shepherd-meeting-port {
  /* 发送/停止是线下页的逃生控件：常见自定义 CSS 不能把它改成竖排文字或异常尺寸。 */
}
.shepherd-meeting-port .offline-bar #offline-generation-action {
  flex: 0 0 auto !important;
  width: 38px !important;
  min-width: 38px !important;
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0 !important;
  border: 1px solid var(--os-btn, #17181b) !important;
  border-radius: 14px !important;
  background: var(--os-btn, #17181b) !important;
  color: var(--os-btn-ink, #fff) !important;
  font-family: var(--os-sans, sans-serif) !important;
  font-size: 13px !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  writing-mode: horizontal-tb !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  box-shadow: none !important;
}
.shepherd-meeting-port .offline-bar #offline-generation-action.offline-stop-primary {
  width: auto !important;
  min-width: 62px !important;
  padding: 0 12px !important;
  gap: 4px !important;
}
.shepherd-meeting-port #offline-generation-action::before,
.shepherd-meeting-port #offline-generation-action::after {
  content: none !important;
  display: none !important;
}
.shepherd-meeting-port #offline-generation-action .svg-icon {
  flex: 0 0 auto !important;
  display: block !important;
  width: 16px !important;
  height: 16px !important;
  margin: 0 !important;
  transform: none !important;
}
.shepherd-meeting-port #offline-generation-action .offline-primary-action-label {
  display: none !important;
  color: inherit !important;
  font: inherit !important;
  writing-mode: horizontal-tb !important;
  white-space: nowrap !important;
}
.shepherd-meeting-port #offline-generation-action.offline-stop-primary .offline-primary-action-label {
  display: inline !important;
}
.shepherd-meeting-port .offline-bar .offline-advance.is-loading {
  opacity: 0.55;
}
.shepherd-meeting-port {
  /* + 展开的工具栏 */
}
.shepherd-meeting-port .offline-tools {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  padding: 8px 12px;
  background: var(--bg-sheet);
  border-top: 1px solid var(--border-soft, #ece0d6);
}
.shepherd-meeting-port .offline-tools[hidden] {
  display: none;
}
.shepherd-meeting-port .offline-tool {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 8px 12px;
  border: 1px solid var(--border-soft, #ece0d6);
  border-radius: var(--radius-md, 14px);
  background: var(--surface, #fdf8f4);
  color: var(--text);
  font-size: var(--font-sm);
  cursor: pointer;
  overflow: hidden;
}
.shepherd-meeting-port .offline-tool .svg-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: var(--text-secondary);
}
.shepherd-meeting-port .offline-tool > span {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shepherd-meeting-port .offline-tool .offline-tool-state {
  flex: 0 0 auto;
  font-style: normal;
  font-size: var(--font-xs);
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(241, 185, 143, 0.22);
  color: var(--accent, #e2895f);
}
.shepherd-meeting-port .offline-tool:disabled {
  opacity: 0.42;
  cursor: default;
}
.shepherd-meeting-port .offline-stop:not(:disabled) {
  border-color: rgba(169, 91, 88, 0.34);
  color: #a95b58;
}
.shepherd-meeting-port .offline-stop:not(:disabled) .svg-icon {
  color: #a95b58;
}
.shepherd-meeting-port {
  /* 文末推进选项（ABC 快捷走向） */
}
.shepherd-meeting-port .offline-options {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 12px 0;
  background: var(--bg-sheet);
}
.shepherd-meeting-port .offline-options-loading {
  font-size: var(--font-xs);
  color: var(--text-hint);
  padding: 4px 2px;
}
.shepherd-meeting-port .offline-options-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.shepherd-meeting-port .offline-options-title {
  font-size: var(--font-xs);
  color: var(--text-hint);
}
.shepherd-meeting-port .offline-options-collapse {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: var(--font-xs);
  cursor: pointer;
  padding: 2px 4px;
}
.shepherd-meeting-port .offline-options-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.shepherd-meeting-port .offline-options-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}
.shepherd-meeting-port .offline-options-actions button {
  min-height: 32px;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 0 12px;
  background: var(--surface);
  color: var(--text-secondary);
  font: inherit;
}
.shepherd-meeting-port .offline-options-actions .offline-options-apply {
  border-color: var(--os-accent, var(--text-accent));
  background: var(--os-accent, var(--text-accent));
  color: #fff;
}
.shepherd-meeting-port .offline-options-actions button:disabled {
  cursor: default;
  opacity: 0.45;
}
.shepherd-meeting-port .offline-options-pending {
  height: 30px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 2px;
}
.shepherd-meeting-port .offline-options-pending i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--os-accent, var(--text-accent));
  animation: offlineOptionPending 1s ease-in-out infinite;
}
.shepherd-meeting-port .offline-options-pending i:nth-child(2) {
  animation-delay: 140ms;
}
.shepherd-meeting-port .offline-options-pending i:nth-child(3) {
  animation-delay: 280ms;
}
@keyframes offlineOptionPending {
  0%, 70%, 100% {
    opacity: 0.25;
    transform: translateY(0);
  }
  35% {
    opacity: 1;
    transform: translateY(-2px);
  }
}
.shepherd-meeting-port .offline-options-list[hidden] {
  display: none;
}
.shepherd-meeting-port .offline-option-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  border: 1px solid var(--border-soft, #ece0d6);
  border-radius: var(--radius-md, 14px);
  background: var(--surface, #fdf8f4);
  color: var(--text);
  font-size: var(--font-sm);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.shepherd-meeting-port .offline-option-chip:disabled {
  cursor: wait;
  opacity: 0.72;
}
.shepherd-meeting-port .offline-option-chip:active {
  background: rgba(241, 185, 143, 0.18);
  border-color: rgba(241, 185, 143, 0.5);
}
.shepherd-meeting-port .offline-option-chip.is-selected {
  border-color: var(--os-accent, var(--text-accent));
  background: var(--os-accent-soft, rgba(241, 185, 143, 0.18));
}
.shepherd-meeting-port .offline-option-chip b {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(241, 185, 143, 0.25);
  color: var(--accent, #e2895f);
  font-size: var(--font-xs);
}
.shepherd-meeting-port .offline-option-chip span {
  flex: 1 1 auto;
  min-width: 0;
}
.shepherd-meeting-port {
  /* 通用开关行（推进选项开关等） */
}
.shepherd-meeting-port .off-toggle-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--font-sm);
  color: var(--text-secondary);
  cursor: pointer;
}
.shepherd-meeting-port .off-toggle-row input {
  flex: 0 0 auto;
}
.shepherd-meeting-port .off-audio-stage-mix {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  transition: opacity 160ms ease;
}
.shepherd-meeting-port .off-audio-stage-mix.is-disabled {
  opacity: 0.42;
}
.shepherd-meeting-port .off-audio-stage-range {
  display: grid;
  gap: 8px;
  color: var(--text-secondary);
  font-size: var(--font-xs);
}
.shepherd-meeting-port .off-audio-stage-range > span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.shepherd-meeting-port .off-audio-stage-range output {
  color: var(--text-hint);
  font-variant-numeric: tabular-nums;
}
.shepherd-meeting-port .off-audio-stage-range input[type=range] {
  width: 100%;
  margin: 0;
  accent-color: var(--accent, #e2895f);
}
@media (max-width: 360px) {
  .shepherd-meeting-port .off-audio-stage-mix {
    grid-template-columns: 1fr;
  }
}
.shepherd-meeting-port {
  /* 番外会话顶部「推进选项」开关 */
}
.shepherd-meeting-port .offline-options-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  font-size: var(--font-xs);
  color: var(--text-secondary);
  cursor: pointer;
}
.shepherd-meeting-port {
  /* 番外创建：自定义主题面板 */
}
.shepherd-meeting-port .au-custom-theme {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 4px 0 2px;
}
.shepherd-meeting-port .au-custom-theme[hidden] {
  display: none;
}
.shepherd-meeting-port {
  /* 叙事设置：视角 / 人称 分段 */
}
.shepherd-meeting-port .off-seg {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.shepherd-meeting-port .off-seg-btn {
  flex: 1 1 auto;
  min-width: 0;
  padding: 8px 8px;
  border: 1px solid var(--border-soft, #ece0d6);
  border-radius: var(--radius-md, 14px);
  background: var(--surface, #fdf8f4);
  color: var(--text-secondary);
  font-size: var(--font-xs);
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.shepherd-meeting-port .off-seg-btn.is-active {
  background: rgba(241, 185, 143, 0.18);
  border-color: rgba(241, 185, 143, 0.5);
  color: var(--text-accent, #c98a5c);
  font-weight: 600;
}
.shepherd-meeting-port .off-num-row {
  display: flex;
  gap: 8px;
}
.shepherd-meeting-port .off-num-row .off-num {
  flex: 1;
  min-width: 0;
}
.shepherd-meeting-port .off-num-row .off-num .form-input {
  width: 100%;
}
.shepherd-meeting-port {
  /* ============ 线下邀约卡（聊天框内） ============ */
}
.shepherd-meeting-port .offline-invite-card {
  position: relative;
  width: min(78vw, 280px);
  /* 标签留在卡片自身布局盒内，避免消息容器/自定义样式把顶部半截裁掉。 */
  padding: 8px 0 0;
  border: none;
  background: var(--offline-invite-outer-bg, transparent);
  overflow: visible;
}
.shepherd-meeting-port .offline-invite-card-ribbon {
  position: absolute;
  top: 0;
  left: 16px;
  z-index: 2;
  padding: 4px 12px;
  font-size: var(--font-xs);
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--offline-invite-primary-ink, #fff);
  background: var(--offline-invite-ribbon-bg, linear-gradient(135deg, #f1b98f, #e89a78));
  border-radius: 999px;
  box-shadow: 0 3px 8px rgba(213, 138, 92, 0.35);
}
.shepherd-meeting-port .offline-invite-card-paper {
  position: relative;
  margin-top: 4px;
  padding: 20px 16px 12px;
  background: radial-gradient(circle at 0 50%, transparent 6px, var(--offline-invite-paper, var(--chat-paper, #fffaf4)) 6px) left/51% 100% no-repeat, radial-gradient(circle at 100% 50%, transparent 6px, var(--offline-invite-paper, var(--chat-paper, #fffaf4)) 6px) right/51% 100% no-repeat;
  border: 1px solid var(--offline-invite-border, var(--surface-card-border, #ecdccb));
  border-radius: 14px;
  box-shadow: var(--offline-invite-shadow, var(--shadow-paper, 0 6px 18px rgba(150, 110, 80, 0.14)));
}
.shepherd-meeting-port .offline-invite-card-paper::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 40px;
  border-top: 1px dashed var(--offline-invite-divider, rgba(180, 140, 110, 0.4));
}
.shepherd-meeting-port .offline-invite-card-head {
  font-size: var(--font-md);
  font-weight: 700;
  color: var(--offline-invite-ink, var(--text));
}
.shepherd-meeting-port .offline-invite-card-meta {
  margin-top: 4px;
  font-size: var(--font-xs);
  color: var(--offline-invite-accent, var(--text-accent, #c98a5c));
}
.shepherd-meeting-port .offline-invite-card-act {
  margin-top: 4px;
  font-size: var(--font-sm);
  color: var(--offline-invite-ink, var(--text));
}
.shepherd-meeting-port .offline-invite-card-note {
  margin-top: 4px;
  font-size: var(--font-sm);
  line-height: 1.6;
  color: var(--offline-invite-muted, var(--text-secondary));
}
.shepherd-meeting-port .offline-invite-card-route {
  margin-top: 4px;
  font-size: var(--font-xs);
  line-height: 1.5;
  color: var(--offline-invite-muted, var(--text-secondary));
  opacity: 0.85;
}
.shepherd-meeting-port .offline-invite-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.shepherd-meeting-port .offline-invite-card-actions button {
  flex: 1;
  padding: 8px 8px;
  border-radius: 999px;
  border: none;
  font-size: var(--font-sm);
  font-weight: 600;
  cursor: pointer;
}
.shepherd-meeting-port .offline-invite-accept,
.shepherd-meeting-port .offline-invite-enter {
  color: var(--offline-invite-primary-ink, #fff);
  background: var(--offline-invite-primary-bg, linear-gradient(135deg, #f1b98f, #e2895f));
  box-shadow: 0 3px 10px rgba(213, 138, 92, 0.32);
}
.shepherd-meeting-port .offline-invite-decline,
.shepherd-meeting-port .offline-invite-shelve {
  color: var(--offline-invite-secondary-ink, var(--text-secondary));
  background: var(--offline-invite-secondary-bg, var(--surface, #f6ece2));
  border: 1px solid var(--offline-invite-border, var(--border-soft, #ece0d6)) !important;
}
.shepherd-meeting-port .offline-invite-shelve {
  color: var(--offline-invite-secondary-ink, var(--text-hint, #a9968a));
}
.shepherd-meeting-port .offline-invite-card-actions--triple button {
  padding: 8px 4px;
  font-size: var(--font-xs);
}
.shepherd-meeting-port .offline-invite-card-status {
  margin-top: 12px;
  text-align: center;
  font-size: var(--font-xs);
  color: var(--offline-invite-muted, var(--text-hint));
}
.shepherd-meeting-port .offline-invite-card-status.is-shelved {
  margin-top: 0;
  margin-bottom: 8px;
}
.shepherd-meeting-port .offline-invite-card--declined .offline-invite-card-paper {
  opacity: 0.72;
  filter: grayscale(0.2);
}
.shepherd-meeting-port .offline-invite-card--group .offline-invite-card-ribbon {
  background: var(--offline-invite-group-ribbon-bg, linear-gradient(135deg, #8eb8d8, #6a9fc4));
}
.shepherd-meeting-port .offline-invite-card-invitees {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 8px 0 4px;
}
.shepherd-meeting-port .offline-invite-invitee-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: var(--font-xs);
  color: var(--offline-invite-muted, var(--text-secondary));
  background: var(--offline-invite-chip-bg, rgba(140, 115, 98, 0.08));
  border: 1px solid var(--offline-invite-border, rgba(140, 115, 98, 0.14));
}
.shepherd-meeting-port .offline-invite-card-actions--double {
  grid-template-columns: 1fr 1fr;
}
.shepherd-meeting-port .offline-invite-card-responses {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}
.shepherd-meeting-port .offline-invite-response {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 10px;
  background: var(--offline-invite-response-bg, rgba(255, 255, 255, 0.55));
  border: 1px solid var(--offline-invite-border, rgba(140, 115, 98, 0.12));
  opacity: 0;
  transform: translateY(6px);
  animation: offline-invite-response-in 0.45s ease forwards;
}
.shepherd-meeting-port .offline-invite-response:nth-child(2) {
  animation-delay: 0.08s;
}
.shepherd-meeting-port .offline-invite-response:nth-child(3) {
  animation-delay: 0.16s;
}
.shepherd-meeting-port .offline-invite-response:nth-child(4) {
  animation-delay: 0.24s;
}
.shepherd-meeting-port .offline-invite-response.is-attending .offline-invite-response-avatar {
  background: linear-gradient(135deg, #8fd3a8, #5fbf86);
  color: #fff;
}
.shepherd-meeting-port .offline-invite-response.is-skip .offline-invite-response-avatar {
  background: rgba(140, 115, 98, 0.16);
  color: var(--offline-invite-muted, var(--text-hint));
}
.shepherd-meeting-port .offline-invite-response-avatar {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}
.shepherd-meeting-port .offline-invite-response-body {
  display: grid;
  gap: 2px;
  min-width: 0;
  font-size: var(--font-xs);
  line-height: 1.45;
  color: var(--offline-invite-ink, var(--text));
}
.shepherd-meeting-port .offline-invite-response-body strong {
  font-weight: 700;
}
.shepherd-meeting-port .offline-invite-response-body em {
  margin-left: 4px;
  font-style: normal;
  font-size: 11px;
  color: var(--offline-invite-muted, var(--text-hint));
}
.shepherd-meeting-port .offline-invite-response-body small {
  color: var(--offline-invite-muted, var(--text-secondary));
}
.shepherd-meeting-port .offline-invite-card-responses.is-loading {
  opacity: 0.72;
}
@keyframes offline-invite-response-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .shepherd-meeting-port .offline-invite-response {
    animation: none;
    opacity: 1;
    transform: none;
  }
}
.shepherd-meeting-port {
  /* ============ 进入线下 · 模式选择 ============ */
}
.shepherd-meeting-port .offline-mode-sheet {
  width: min(92vw, 440px);
}
.shepherd-meeting-port .offline-mode-choices {
  display: grid;
  gap: 8px;
  padding: 8px 0 12px;
}
.shepherd-meeting-port .offline-mode-choice {
  min-height: 78px;
  display: grid;
  gap: 4px;
  align-content: center;
  padding: 12px 16px;
  border: 1px solid var(--border, rgba(80, 104, 120, 0.16));
  border-radius: 14px;
  color: var(--text, #263b49);
  text-align: left;
  background: rgba(255, 255, 255, 0.62);
}
.shepherd-meeting-port .offline-mode-choice strong {
  font-size: 15px;
}
.shepherd-meeting-port .offline-mode-choice small {
  color: var(--text-muted, #71808a);
  font-size: 11px;
}
.shepherd-meeting-port .offline-mode-choice:disabled {
  opacity: 0.46;
}
.shepherd-meeting-port .offline-mode-choice:focus-visible {
  outline: 2px solid var(--accent, #6e9ab2);
  outline-offset: 2px;
}
.shepherd-meeting-port .offline-mode-cancel {
  width: 100%;
}
.shepherd-meeting-port {
  /* ============ 单角色音声版 · 互动游戏舞台（仅线下会话作用域） ============ */
}
.shepherd-meeting-port .offline-session-page.offline-audio-scene {
  --offline-audio-glass: rgba(11, 17, 24, 0.68);
  --offline-audio-line: rgba(255, 255, 255, 0.18);
  --offline-audio-ink: rgba(255, 255, 255, 0.96);
  isolation: isolate;
  overflow: hidden;
  background: #111a22;
}
.shepherd-meeting-port .offline-audio-scene > .navbar {
  z-index: 4;
  background: rgba(10, 16, 23, 0.68);
  border-bottom-color: var(--offline-audio-line);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.shepherd-meeting-port .offline-audio-scene > .navbar .navbar-title,
.shepherd-meeting-port .offline-audio-scene > .navbar .navbar-btn {
  color: var(--offline-audio-ink);
}
.shepherd-meeting-port .offline-audio-scene .offline-scroll {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 12px 12px 16px;
  background: linear-gradient(180deg, rgba(7, 12, 18, 0.08) 24%, rgba(7, 12, 18, 0.72) 100%), var(--offline-audio-scene-image, linear-gradient(155deg, #243746, #121a22));
  background-size: cover;
  background-position: center;
}
.shepherd-meeting-port .offline-audio-scene .os-anchor,
.shepherd-meeting-port .offline-audio-scene .offline-invite-banner,
.shepherd-meeting-port .offline-audio-scene .offline-settings-hint,
.shepherd-meeting-port .offline-audio-scene .offline-scene-card,
.shepherd-meeting-port .offline-audio-scene .offline-origin-seed,
.shepherd-meeting-port .offline-audio-scene .offline-beat-image,
.shepherd-meeting-port .offline-audio-scene .os-beat-footer {
  display: none;
}
.shepherd-meeting-port .offline-audio-stage-tools {
  position: sticky;
  top: 0;
  z-index: 3;
  align-self: center;
  display: flex;
  flex-wrap: wrap;
  max-width: 100%;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--offline-audio-line);
  border-radius: 999px;
  background: rgba(9, 15, 21, 0.48);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.shepherd-meeting-port .offline-audio-stage-tools button {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  font-size: 11px;
  white-space: nowrap;
}
.shepherd-meeting-port .offline-audio-stage-tools button:active {
  background: rgba(255, 255, 255, 0.12);
}
.shepherd-meeting-port .offline-audio-stage-tools button:focus-visible,
.shepherd-meeting-port .offline-audio-scene .offline-option-chip:focus-visible,
.shepherd-meeting-port .offline-audio-scene .offline-directive:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.92);
  outline-offset: 2px;
}
.shepherd-meeting-port .offline-audio-scene .offline-beats {
  width: min(100%, 560px);
  max-width: 560px;
  margin: auto auto 0;
  padding-top: min(38vh, 320px);
}
.shepherd-meeting-port .offline-audio-scene .offline-beat--narration,
.shepherd-meeting-port .offline-audio-scene .offline-beat--opening {
  padding: 16px 16px;
  border: 1px solid var(--offline-audio-line);
  border-radius: 20px;
  background: var(--offline-audio-glass);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
  -webkit-backdrop-filter: blur(18px) saturate(1.08);
  backdrop-filter: blur(18px) saturate(1.08);
}
.shepherd-meeting-port .offline-audio-scene .offline-beat--narration::before {
  display: none;
}
.shepherd-meeting-port .offline-audio-scene .offline-beat--narration p,
.shepherd-meeting-port .offline-audio-scene .offline-beat--opening p,
.shepherd-meeting-port .offline-audio-scene .offline-beat--opening .os-beat-multiline {
  margin: 0 0 0.72em;
  color: var(--offline-audio-ink);
  font-family: var(--os-sans);
  font-size: clamp(14px, var(--os-body-size), 18px);
  line-height: 1.72;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.32);
}
.shepherd-meeting-port .offline-audio-scene .offline-beat-voice-lines {
  margin-top: 8px;
  border-top: 1px solid var(--offline-audio-line);
  padding-top: 8px;
}
.shepherd-meeting-port .offline-audio-scene .offline-beat-voice-line span {
  color: rgba(255, 255, 255, 0.72);
}
.shepherd-meeting-port .offline-audio-scene .offline-options,
.shepherd-meeting-port .offline-audio-scene .offline-bar {
  width: min(100%, 588px);
  align-self: center;
  margin-inline: auto;
  border-color: var(--offline-audio-line);
  background: rgba(9, 15, 21, 0.82);
  color: var(--offline-audio-ink);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
.shepherd-meeting-port .offline-audio-scene .offline-options {
  padding: 8px 12px;
}
.shepherd-meeting-port .offline-audio-scene .offline-options-title,
.shepherd-meeting-port .offline-audio-scene .offline-options-collapse {
  color: rgba(255, 255, 255, 0.76);
}
.shepherd-meeting-port .offline-audio-scene .offline-options-list {
  display: grid;
  gap: 8px;
}
.shepherd-meeting-port .offline-audio-scene .offline-option-chip {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--offline-audio-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--offline-audio-ink);
  text-align: left;
}
.shepherd-meeting-port .offline-audio-scene .offline-option-chip b {
  background: rgba(255, 255, 255, 0.13);
  color: var(--offline-audio-ink);
}
.shepherd-meeting-port .offline-audio-scene .offline-bar .offline-input-wrap {
  border-color: var(--offline-audio-line);
  background: rgba(255, 255, 255, 0.09);
}
.shepherd-meeting-port .offline-audio-scene .offline-bar .offline-directive,
.shepherd-meeting-port .offline-audio-scene .offline-bar .offline-directive::placeholder,
.shepherd-meeting-port .offline-audio-scene .offline-bar .offline-plus,
.shepherd-meeting-port .offline-audio-scene .offline-bar .offline-expand {
  color: rgba(255, 255, 255, 0.88);
}
.shepherd-meeting-port .offline-audio-scene[data-audio-layout=landscape] .offline-scroll {
  background-position: center 42%;
}
@media (min-width: 760px) {
  .shepherd-meeting-port .offline-audio-scene[data-audio-layout=landscape] .offline-beats {
    width: min(66vw, 720px);
    max-width: 720px;
    margin-right: 4vw;
  }
  .shepherd-meeting-port .offline-audio-scene[data-audio-layout=landscape] .offline-options,
  .shepherd-meeting-port .offline-audio-scene[data-audio-layout=landscape] .offline-bar {
    width: min(66vw, 748px);
    margin-right: 4vw;
  }
}
@media (max-width: 430px) {
  .shepherd-meeting-port .offline-audio-stage-tools {
    width: 100%;
    justify-content: space-between;
    border-radius: 14px;
  }
  .shepherd-meeting-port .offline-audio-stage-tools button {
    min-width: 0;
    padding-inline: 8px;
  }
}
.shepherd-meeting-port {
  /* ============ 线下页 · 邀约 banner（赴约仪式感） ============ */
}
.shepherd-meeting-port .offline-invite-banner {
  position: relative;
  margin-bottom: 12px;
  padding: 16px 16px 12px;
  background: linear-gradient(160deg, rgba(241, 185, 143, 0.16), rgba(255, 250, 244, 0.9));
  border: 1px solid rgba(241, 185, 143, 0.4);
  overflow: visible;
}
.shepherd-meeting-port .offline-invite-banner-ribbon {
  position: absolute;
  top: -10px;
  left: 16px;
  padding: 4px 12px;
  font-size: var(--font-xs);
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #f1b98f, #e89a78);
  border-radius: 999px;
  box-shadow: 0 3px 8px rgba(213, 138, 92, 0.35);
}
.shepherd-meeting-port .offline-invite-banner-meta {
  margin-top: 4px;
  font-size: var(--font-sm);
  color: var(--text-accent, #c98a5c);
}
.shepherd-meeting-port .offline-invite-banner-act {
  margin-top: 4px;
  font-size: var(--font-md);
  font-weight: 600;
  color: var(--text);
}
.shepherd-meeting-port .offline-invite-banner-note {
  margin-top: 4px;
  font-size: var(--font-sm);
  line-height: 1.7;
  color: var(--text-secondary);
}
.shepherd-meeting-port .offline-invite-banner-route {
  margin-top: 8px;
  font-size: var(--font-xs);
  line-height: 1.5;
  color: var(--text-secondary);
  opacity: 0.85;
}
.shepherd-meeting-port {
  /* ============ 发起邀约模态 ============ */
}
.shepherd-meeting-port .offline-invite-sheet-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.shepherd-meeting-port .offline-invite-sheet-ribbon {
  align-self: flex-start;
  padding: 4px 12px;
  font-size: var(--font-xs);
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #f1b98f, #e89a78);
  border-radius: 999px;
}
.shepherd-meeting-port .offline-invite-sheet-body .oi-send {
  margin-top: 4px;
}
.shepherd-meeting-port {
  /* ============ 邀约结束 ============ */
}
.shepherd-meeting-port .offline-done-scroll {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
}
.shepherd-meeting-port .offline-done-card {
  width: min(100%, 420px);
  margin: 0 auto;
  padding: 20px 16px;
  text-align: center;
}
.shepherd-meeting-port .offline-done-ribbon {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(241, 185, 143, 0.28);
  color: #b85c5c;
  font-size: 13px;
  font-weight: 800;
}
.shepherd-meeting-port .offline-done-title {
  margin: 12px 0 8px;
  font-size: 17px;
  line-height: 1.45;
}
.shepherd-meeting-port .offline-done-summary {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  text-align: left;
}
.shepherd-meeting-port .offline-done-note {
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-hint);
}
.shepherd-meeting-port .offline-done-actions {
  display: grid;
  gap: 8px;
}
.shepherd-meeting-port {
  /* ============ 约会档案详情 ============ */
}
.shepherd-meeting-port .oda-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: grid;
  gap: 12px;
  padding: 12px 12px calc(12px + var(--safe-bottom));
}
.shepherd-meeting-port .oda-head-card,
.shepherd-meeting-port .oda-summary-card {
  padding: 16px;
}
.shepherd-meeting-port .oda-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.shepherd-meeting-port .oda-ribbon {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(241, 185, 143, 0.24);
  font-size: 11px;
  font-weight: 700;
  color: #b85c5c;
}
.shepherd-meeting-port .oda-title {
  margin: 8px 0 4px;
  font-size: 17px;
  line-height: 1.45;
}
.shepherd-meeting-port .oda-meta,
.shepherd-meeting-port .oda-section-label {
  font-size: 13px;
  color: var(--text-secondary);
}
.shepherd-meeting-port .oda-summary {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.75;
}
.shepherd-meeting-port .oda-view-switch {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 4px;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: var(--bg-card);
}
.shepherd-meeting-port .oda-view-switch button {
  min-height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
}
.shepherd-meeting-port .oda-view-switch button.is-active {
  background: var(--bg-secondary);
  color: var(--text);
  font-weight: 700;
}
.shepherd-meeting-port .oda-view-switch button:focus-visible,
.shepherd-meeting-port .oda-memory-person:focus-visible {
  outline: 2px solid var(--text-accent);
  outline-offset: 2px;
}
.shepherd-meeting-port .oda-view-content {
  display: grid;
  gap: 12px;
}
.shepherd-meeting-port {
  /* 结构化卷宗：核心锚点分组 */
}
.shepherd-meeting-port .oda-dossier-card {
  padding: 16px;
}
.shepherd-meeting-port .oda-dossier-cast {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.shepherd-meeting-port .oda-dossier-group {
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}
.shepherd-meeting-port .oda-dossier-group-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-hint);
  margin-bottom: 4px;
}
.shepherd-meeting-port .oda-dossier-group p {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
}
.shepherd-meeting-port .oda-dossier-story {
  white-space: pre-wrap;
}
.shepherd-meeting-port .oda-rounds {
  display: grid;
  gap: 8px;
}
.shepherd-meeting-port .oda-round {
  padding: 12px 12px;
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.82);
  border: 1px dashed rgba(140, 115, 98, 0.16);
}
.shepherd-meeting-port .oda-round--directive {
  background: rgba(255, 240, 230, 0.72);
}
.shepherd-meeting-port .oda-round--opening {
  background: rgba(255, 248, 240, 0.88);
  border-color: rgba(226, 137, 95, 0.22);
}
.shepherd-meeting-port .oda-round--attendance {
  background: var(--bg-card);
  border-style: solid;
  border-color: var(--border-soft);
}
.shepherd-meeting-port .oda-round-label {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
}
.shepherd-meeting-port .oda-round p {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.75;
}
.shepherd-meeting-port .oda-round p:last-child {
  margin-bottom: 0;
}
.shepherd-meeting-port .oda-empty {
  padding: 24px 12px;
  text-align: center;
  color: var(--text-hint);
  font-size: 13px;
}
.shepherd-meeting-port .oda-memory-card {
  padding: 16px;
}
.shepherd-meeting-port .oda-memory-people {
  display: flex;
  gap: 4px;
  margin: -4px 0 12px;
  overflow-x: auto;
}
.shepherd-meeting-port .oda-memory-person {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 4px 12px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
}
.shepherd-meeting-port .oda-memory-person.is-active {
  border-color: var(--text-accent);
  color: var(--text-accent);
}
.shepherd-meeting-port .oda-memory-range {
  margin-top: 4px;
  color: var(--text-hint);
  font-size: 11px;
}
.shepherd-meeting-port .oda-memory-text {
  margin: 8px 0 0;
  white-space: pre-wrap;
  color: var(--text);
  font-size: 14px;
  line-height: 1.75;
}
.shepherd-meeting-port {
  /* ============ 我们的记录 · 相遇列表 ============ */
}
.shepherd-meeting-port .odl-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 12px 12px calc(16px + var(--safe-bottom));
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.shepherd-meeting-port .odl-filter .odl-char-select {
  width: 100%;
}
.shepherd-meeting-port .odl-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.shepherd-meeting-port .odl-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  padding: 12px 12px;
  text-align: left;
  border: 1px solid var(--surface-card-border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  cursor: pointer;
}
.shepherd-meeting-port .odl-item.is-favorite {
  border-color: rgba(241, 185, 143, 0.6);
  background: rgba(241, 185, 143, 0.08);
}
.shepherd-meeting-port .odl-item-fav {
  flex: 0 0 auto;
  color: #e2895f;
}
.shepherd-meeting-port .odl-item-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.shepherd-meeting-port .odl-item-body strong {
  font-size: var(--font-sm);
  color: var(--text);
}
.shepherd-meeting-port .odl-item-body small {
  font-size: var(--font-xs);
  color: var(--text-secondary);
}
.shepherd-meeting-port .odl-item-body p {
  margin: 2px 0 0;
  font-size: var(--font-xs);
  line-height: 1.5;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.shepherd-meeting-port .odl-empty {
  padding: 32px 12px;
  text-align: center;
  font-size: var(--font-sm);
  color: var(--text-hint);
}
.shepherd-meeting-port {
  /* chat-details 小提示 */
}
.shepherd-meeting-port .chat-details-hint {
  padding: 0 2px 4px;
  font-size: var(--font-xs);
  line-height: 1.5;
  color: var(--text-hint);
}
.shepherd-meeting-port {
  /* ============ 无进行中会话时的空态 ============ */
}
.shepherd-meeting-port .offline-empty-state {
  margin-top: 20vh;
  padding: 24px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.shepherd-meeting-port .offline-empty-state p {
  margin: 0;
  font-size: var(--font-sm);
  color: var(--text-secondary);
}
.shepherd-meeting-port {
  /* ============ 设置未调整提醒横幅 ============ */
}
.shepherd-meeting-port .offline-settings-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding: 8px 8px 8px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(241, 185, 143, 0.22), rgba(226, 137, 95, 0.14));
  border: 1px solid rgba(241, 185, 143, 0.5);
  font-size: var(--font-xs);
  color: var(--text);
}
.shepherd-meeting-port .offline-settings-hint span {
  flex: 1;
  min-width: 0;
}
.shepherd-meeting-port .offline-settings-hint-open {
  flex: 0 0 auto;
  border: none;
  background: transparent;
  color: var(--text-accent, #c98a5c);
  font-size: var(--font-xs);
  font-weight: 700;
  padding: 4px 4px;
  cursor: pointer;
}
.shepherd-meeting-port .offline-settings-hint-close {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-hint);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}
.shepherd-meeting-port {
  /* ============ 日期分隔 beat（一起旅行 · 推进到下一天） ============ */
}
.shepherd-meeting-port .offline-beat--daymark {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 4px 0;
}
.shepherd-meeting-port .offline-beat--daymark span {
  padding: 4px 16px;
  font-size: var(--font-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-accent, #c98a5c);
  background: rgba(241, 185, 143, 0.16);
  border: 1px dashed rgba(241, 185, 143, 0.55);
  border-radius: 999px;
}
.shepherd-meeting-port {
  /* ============ 一起旅行 · ins 白卡视觉变体（Phase E2，限定在 .offline-page--trip 作用域内）
     脱离奶油手账底色/repeating 网格线/washi 胶带；主色调保留青绿——沿用旧版
     "一起旅行=青绿，旅行char=赭石"这套区分。不影响"约线下"本身仍用的手账体系。 ============ */
}
.shepherd-meeting-port .offline-page--trip {
  --text: #17181b;
  --text-secondary: #6c6e74;
  --text-hint: rgba(21, 22, 26, 0.44);
  --text-muted: #6c6e74;
  --text-accent: #3f6b60;
  --accent: #3f6b60;
  --border: rgba(15, 16, 18, 0.1);
  --border-soft: rgba(15, 16, 18, 0.08);
  --surface-card-border: rgba(15, 16, 18, 0.08);
  --surface: #ffffff;
  --chat-paper: #ffffff;
  --bg-sheet: #ffffff;
  --bg-card: #ffffff;
  --shadow-paper: 0 1px 2px rgba(15, 16, 18, 0.04), 0 8px 20px rgba(15, 16, 18, 0.05);
}
.shepherd-meeting-port .offline-page--trip .offline-scene-card {
  border-color: rgba(15, 16, 18, 0.08);
}
.shepherd-meeting-port .offline-page--trip .offline-trip-progress {
  position: relative;
  background: #fff;
  border: 1px solid rgba(63, 107, 96, 0.28);
}
.shepherd-meeting-port .offline-page--trip .offline-trip-stop-chip {
  background: rgba(63, 107, 96, 0.07);
  border-color: rgba(63, 107, 96, 0.28);
  color: var(--text-secondary);
}
.shepherd-meeting-port .offline-page--trip .offline-trip-replan-btn {
  color: #3f6b60;
  text-decoration-color: rgba(63, 107, 96, 0.4);
}
.shepherd-meeting-port .offline-page--trip .offline-trip-checkpoint {
  background: rgba(63, 107, 96, 0.06);
  border: 1px dashed rgba(63, 107, 96, 0.4);
}
.shepherd-meeting-port .offline-page--trip .offline-trip-checkpoint-opt {
  border-color: rgba(63, 107, 96, 0.45);
  background: #fff;
}
.shepherd-meeting-port .offline-page--trip .offline-trip-checkpoint-opt:hover {
  background: rgba(63, 107, 96, 0.12);
}
.shepherd-meeting-port .offline-page--trip .offline-beat--daymark span {
  color: #3f6b60;
  background: rgba(63, 107, 96, 0.08);
  border: 1px dashed rgba(63, 107, 96, 0.4);
}
.shepherd-meeting-port .offline-page--trip .offline-beat--narration {
  background: #ffffff;
  border: 1px solid rgba(15, 16, 18, 0.08);
  background-image: none;
}
.shepherd-meeting-port .offline-page--trip .offline-beat--narration::after {
  content: none;
}
.shepherd-meeting-port .offline-page--trip .offline-beat--narration::before {
  content: "旅行手账";
  color: #fff;
  background: #3f6b60;
  box-shadow: none;
  transform: none;
}
.shepherd-meeting-port .offline-page--trip .offline-beat--narration.is-streaming > [data-offline-stream-body] > p:last-child::after {
  color: #3f6b60 !important;
}
.shepherd-meeting-port .offline-page--trip .offline-beat--directive {
  background: rgba(15, 16, 18, 0.05);
  border: 1px solid rgba(15, 16, 18, 0.1);
  box-shadow: none;
  transform: none;
}
.shepherd-meeting-port .offline-page--trip .offline-beat--directive span {
  color: #3f6b60;
}
.shepherd-meeting-port .offline-page--trip .offline-beat--opening {
  background: #ffffff;
  border: 1px solid rgba(15, 16, 18, 0.12);
  box-shadow: var(--shadow-paper);
  transform: none;
}
.shepherd-meeting-port .offline-page--trip .offline-beat--opening span {
  color: #3f6b60;
}
.shepherd-meeting-port .offline-page--trip .off-trip-fields {
  background: #fafaf9;
  border-color: rgba(15, 16, 18, 0.1);
}
.shepherd-meeting-port .offline-page--trip .off-more-toggle,
.shepherd-meeting-port .offline-page--trip .narration-translate-btn {
  color: #3f6b60;
}
.shepherd-meeting-port .offline-page--trip .narration-translation {
  background: rgba(63, 107, 96, 0.1);
}
.shepherd-meeting-port .offline-page--trip .offline-bar {
  background: #ffffff;
}
.shepherd-meeting-port .offline-page--trip .offline-plus {
  background: #fff;
}
.shepherd-meeting-port .offline-page--trip .offline-tools {
  background: #ffffff;
}
.shepherd-meeting-port .offline-page--trip .offline-invite-banner {
  background: #ffffff;
  border-color: rgba(63, 107, 96, 0.3);
}
.shepherd-meeting-port .offline-page--trip .offline-invite-banner-ribbon {
  background: #3f6b60;
  box-shadow: none;
}
.shepherd-meeting-port .offline-page--trip .offline-invite-banner-meta {
  color: #3f6b60;
}
.shepherd-meeting-port .offline-page--trip .offline-settings-hint {
  background: rgba(63, 107, 96, 0.08);
  border-color: rgba(63, 107, 96, 0.32);
}
.shepherd-meeting-port .offline-page--trip .offline-settings-hint-open {
  color: #3f6b60;
}
.shepherd-meeting-port .offline-page--trip .navbar {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(15, 16, 18, 0.08);
}
.shepherd-meeting-port .offline-page--trip .navbar-title {
  color: var(--text);
}
.shepherd-meeting-port .offline-page--trip .navbar-btn {
  background: #fff;
  color: var(--text);
  box-shadow: var(--shadow-paper);
}
.shepherd-meeting-port .offline-page--trip {
  background: #f6f5f3;
}
.shepherd-meeting-port .offline-page--trip .offline-options {
  background: #ffffff;
}
.shepherd-meeting-port .offline-page--trip .offline-option-chip:active {
  background: rgba(63, 107, 96, 0.14);
  border-color: rgba(63, 107, 96, 0.4);
}
.shepherd-meeting-port .offline-page--trip .offline-option-chip b {
  background: rgba(63, 107, 96, 0.16);
  color: #3f6b60;
}
.shepherd-meeting-port {
  /* ============ 总结收纳确认 · 可选时间线推进 ============ */
}
.shepherd-meeting-port .off-settle-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.shepherd-meeting-port .off-settle-hint,
.shepherd-meeting-port .off-settle-note {
  margin: 0;
  font-size: 13px;
  color: var(--text-hint);
  line-height: 1.45;
}
.shepherd-meeting-port .off-settle-advance-details {
  border: 1px dashed var(--line-soft, rgba(0, 0, 0, 0.14));
  border-radius: 10px;
  padding: 8px 8px;
}
.shepherd-meeting-port .off-settle-advance-details[hidden] {
  display: none;
}
.shepherd-meeting-port .off-settle-advance-details > summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.45;
  user-select: none;
}
.shepherd-meeting-port .off-settle-advance-details[open] > summary {
  margin-bottom: 8px;
}
.shepherd-meeting-port .off-settle-advance-details > .api-field,
.shepherd-meeting-port .off-settle-advance-details > .off-settle-time-preview,
.shepherd-meeting-port .off-settle-advance-details > .off-settle-note,
.shepherd-meeting-port .off-settle-advance-details > .off-settle-keep-virtual {
  margin-top: 8px;
}
.shepherd-meeting-port .off-settle-time-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-sheet);
  color: var(--text-secondary);
  font-size: var(--font-xs);
  line-height: 1.45;
}
.shepherd-meeting-port .off-settle-time-preview[hidden] {
  display: none;
}
.shepherd-meeting-port .off-settle-time-preview i {
  color: var(--text-hint);
  font-style: normal;
}
.shepherd-meeting-port .off-settle-time-preview strong {
  color: var(--text);
  font-size: var(--font-sm);
  font-weight: 600;
}
.shepherd-meeting-port .off-settle-time-preview small {
  grid-column: 1/-1;
  color: var(--text-hint);
  font-size: var(--font-xs);
}
.shepherd-meeting-port .off-settle-time-preview.is-cross-day {
  border-style: solid;
  border-color: var(--accent-orange);
}
.shepherd-meeting-port .off-time-confirm-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.shepherd-meeting-port .off-time-confirm-body p {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--font-sm);
  line-height: 1.55;
}
.shepherd-meeting-port .off-time-confirm-sheet > .off-settle-actions {
  padding: 0 16px 16px;
}
.shepherd-meeting-port .off-settle-keep-virtual {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}
.shepherd-meeting-port .off-settle-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
@media (max-width: 420px) {
  .shepherd-meeting-port .off-settle-time-preview {
    grid-template-columns: 1fr;
  }
  .shepherd-meeting-port .off-settle-time-preview i {
    transform: rotate(90deg);
    justify-self: start;
  }
}
.shepherd-meeting-port {
  /* ============ 离开线下 · 暂离 / 删除 ============ */
}
.shepherd-meeting-port .off-leave-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.shepherd-meeting-port .off-leave-hint,
.shepherd-meeting-port .off-leave-note {
  margin: 0;
  font-size: 13px;
  color: var(--text-hint);
  line-height: 1.45;
}
.shepherd-meeting-port .off-leave-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.shepherd-meeting-port .off-leave-actions .btn {
  width: 100%;
}
.shepherd-meeting-port .off-leave-discard {
  color: #b45454;
  border-color: color-mix(in srgb, #b45454 45%, var(--border-color, #d8dde3));
}
.shepherd-meeting-port {
  /* 赴约自动回复 · 叙事设置里的档位 */
}
.shepherd-meeting-port .off-auto-reply-global {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}
.shepherd-meeting-port {
  /* ============ P3 · 线下沉浸页「相遇」皮（限定 .offline-session-page，不影响旅行/其它页）
     主体：虚拟现实里真实发生过的一段线下时空。ins 系克制方向，有意偏离全站奶油手账。
     签名元素：时空锚（地点 · 时间 · 同行 的小字锚行）+ beat 之间的菱形针脚（时间线的缝合点）。
     token 溯源（v2，回应「还是奶油风」的反馈）：
     - 底 #ffffff 纯白默认（可切暖纸/暮色）；chrome 一律干净黑体栈，摆脱全局楷体的手账感；
     - 墨 #1a1b1e / 次墨 #72737a / 淡墨 40%（正文串行阅读态）；
     - 强调「暮色蓝」#5c6b8a——傍晚见面、路灯未亮时的天色，只用在时空锚/方向墨线/小状态上；
     - 主按钮石墨 #17181b（与旅行皮黑按钮同语系），不再用全局奶油橙；
     - 正文默认衬线 16px/1.9，措施上限 42em；字号/行距/宽度/底色/底图/自定义 CSS 由用户偏好覆盖。 ============ */
}
.shepherd-meeting-port .offline-session-page {
  --os-paper: #ffffff;
  --os-ink: #1a1b1e;
  --os-ink-2: #72737a;
  --os-ink-3: rgba(26, 27, 30, 0.4);
  --os-line: rgba(26, 27, 30, 0.08);
  --os-accent: #5c6b8a;
  --os-accent-soft: rgba(92, 107, 138, 0.1);
  --os-btn: #17181b;
  --os-btn-ink: #ffffff;
  --os-serif: Georgia, "Songti SC", "Noto Serif SC", "Source Han Serif SC", serif;
  --os-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --os-body-size: 16px;
  --os-leading: 1.9;
  --os-measure: 42em;
  /* 把通用变量映射进新 token，让既有组件在作用域内自动换装 */
  --text: var(--os-ink);
  --text-secondary: var(--os-ink-2);
  --text-hint: var(--os-ink-3);
  --text-muted: var(--os-ink-2);
  --text-accent: var(--os-accent);
  --accent: var(--os-accent);
  --border: var(--os-line);
  --border-soft: var(--os-line);
  --surface-card-border: var(--os-line);
  --surface: #ffffff;
  --surface-card: #ffffff;
  --bg-sheet: var(--os-paper);
  --bg-card: #ffffff;
  --chat-paper: transparent;
  --shadow-paper: 0 1px 2px rgba(15, 16, 18, 0.04);
  font-family: var(--os-sans);
  background: var(--os-paper);
}
.shepherd-meeting-port .offline-session-page[data-os-bg=white] {
  --os-paper: #ffffff;
}
.shepherd-meeting-port .offline-session-page[data-os-bg=paper] {
  --os-paper: #faf9f7;
}
.shepherd-meeting-port {
  /* 自定义底图：图上盖一层可调浓度的纸色蒙版，保证正文可读 */
}
.shepherd-meeting-port .offline-session-page[data-os-has-bg="1"] {
  isolation: isolate;
  background-image: none;
}
.shepherd-meeting-port .offline-session-page[data-os-has-bg="1"]::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(var(--os-veil, rgba(255, 255, 255, 0.88)), var(--os-veil, rgba(255, 255, 255, 0.88))), var(--os-bg-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.shepherd-meeting-port .offline-session-page[data-os-has-bg="1"] > :not(.offline-settings-sheet) {
  position: relative;
  z-index: 1;
}
.shepherd-meeting-port .offline-session-page[data-os-has-bg="1"] .offline-bar,
.shepherd-meeting-port .offline-session-page[data-os-has-bg="1"] .offline-tools,
.shepherd-meeting-port .offline-session-page[data-os-has-bg="1"] .offline-options,
.shepherd-meeting-port .offline-session-page[data-os-has-bg="1"] .os-manage-bar {
  background: transparent !important;
  background-image: none !important;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.shepherd-meeting-port .offline-session-page[data-os-bg=dusk] {
  --os-paper: #191a1d;
  --os-ink: #e9e7e2;
  --os-ink-2: #a3a19c;
  --os-ink-3: rgba(233, 231, 226, 0.42);
  --os-line: rgba(233, 231, 226, 0.14);
  --os-accent: #8b9cc4;
  --os-accent-soft: rgba(139, 156, 196, 0.16);
  --os-btn: #e9e7e2;
  --os-btn-ink: #191a1d;
  --os-veil: rgba(25, 26, 29, 0.82);
  --surface: #222327;
  --surface-card: #222327;
  --bg-card: #202124;
  --shadow-paper: none;
}
.shepherd-meeting-port {
  /* 按钮统一改石墨/发丝线，摆脱全局奶油橙按钮 */
}
.shepherd-meeting-port .offline-session-page .btn-primary {
  background: var(--os-btn);
  border-color: var(--os-btn);
  color: var(--os-btn-ink);
  box-shadow: none;
}
.shepherd-meeting-port .offline-session-page .btn-outline,
.shepherd-meeting-port .offline-session-page .btn-soft {
  background: transparent;
  border: 1px solid var(--os-line);
  color: var(--os-ink-2);
  box-shadow: none;
}
.shepherd-meeting-port .offline-session-page[data-os-bg=dusk] .form-input {
  background: #26272b;
  color: var(--os-ink);
  border-color: var(--os-line);
}
.shepherd-meeting-port {
  /* 导航条：融进纸面，细线收边 */
}
.shepherd-meeting-port .offline-session-page .navbar {
  background: var(--os-paper);
  border-bottom: 1px solid var(--os-line);
}
.shepherd-meeting-port .offline-session-page .navbar-title {
  color: var(--os-ink);
}
.shepherd-meeting-port .offline-session-page .navbar-btn {
  background: transparent;
  color: var(--os-ink-2);
  box-shadow: none;
}
.shepherd-meeting-port {
  /* 线下页右侧有时会放两枚操作按钮；标题按整条导航栏居中，而非按剩余空间居中。 */
}
.shepherd-meeting-port .offline-page > .navbar {
  position: sticky;
}
.shepherd-meeting-port {
  /* 壁纸层不能取消普通线下顶栏的安全区保护，也不能把顶栏降到正文层级。
   * 使用实色纸面，不依赖部分 WebView 不支持的背景模糊。 */
}
.shepherd-meeting-port .offline-session-page.offline-page:not(.offline-audio-scene):not(.room-encounter-page) > .navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  flex-shrink: 0;
  box-sizing: border-box;
  min-height: calc(var(--navbar-h, 44px) + var(--safe-top, 0px));
  padding-top: calc(6px + var(--safe-top, 0px));
  background: var(--os-paper, #ffffff);
  background-image: none;
}
.shepherd-meeting-port .offline-page > .navbar > .navbar-title {
  position: absolute;
  left: 50%;
  width: calc(100% - 180px);
  max-width: 28rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transform: translateX(-50%);
}
.shepherd-meeting-port .offline-page > .navbar > :last-child:not(.navbar-title) {
  margin-left: auto;
}
.shepherd-meeting-port {
  /* 阅读栏宽：正文与场景卡限宽居中 */
}
.shepherd-meeting-port .offline-session-page .offline-scroll {
  padding: 12px 16px calc(20px + var(--safe-bottom));
}
.shepherd-meeting-port .offline-session-page.os-has-options .offline-scroll {
  padding-bottom: calc(42px + var(--safe-bottom));
}
.shepherd-meeting-port .offline-session-page .offline-options {
  padding-bottom: 2px;
}
.shepherd-meeting-port .offline-session-page .offline-beat--preview {
  margin: 2px 0 8px;
}
.shepherd-meeting-port .offline-session-page .offline-beat--preview::before {
  display: none;
}
.shepherd-meeting-port .offline-session-page .os-anchor,
.shepherd-meeting-port .offline-session-page .offline-invite-banner,
.shepherd-meeting-port .offline-session-page .offline-settings-hint,
.shepherd-meeting-port .offline-session-page .offline-scene-card,
.shepherd-meeting-port .offline-session-page .offline-beats {
  width: 100%;
  max-width: var(--os-measure);
  margin-left: auto;
  margin-right: auto;
}
.shepherd-meeting-port {
  /* 时空锚：签名元素，一行小字钉住这段相遇的时空 */
}
.shepherd-meeting-port .os-anchor {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--os-ink-3, rgba(31, 32, 35, 0.45));
}
.shepherd-meeting-port .os-anchor-mark {
  flex: 0 0 auto;
  width: 5px;
  height: 5px;
  border: 1px solid var(--os-accent, #9a5b3c);
  transform: rotate(45deg);
}
.shepherd-meeting-port .os-anchor-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shepherd-meeting-port .os-anchor-dot {
  display: inline-block;
  width: 3px;
  height: 3px;
  margin: 0 8px;
  vertical-align: 2px;
  border-radius: 50%;
  background: currentColor;
  font-style: normal;
}
.shepherd-meeting-port .offline-session-page[data-os-anchor=off] .os-anchor {
  display: none;
}
.shepherd-meeting-port {
  /* 场景卡与邀约条：白卡细线，去掉奶油投影 */
}
.shepherd-meeting-port .offline-session-page .offline-scene-card {
  background: var(--surface);
  border: 1px solid var(--os-line);
  border-radius: 14px;
  box-shadow: none;
}
.shepherd-meeting-port .offline-session-page .offline-invite-banner {
  background: var(--surface);
  border: 1px solid var(--os-line);
  border-radius: 14px;
}
.shepherd-meeting-port .offline-session-page .offline-invite-banner-ribbon {
  background: var(--os-accent);
  box-shadow: none;
}
.shepherd-meeting-port .offline-session-page .offline-settings-hint {
  background: var(--os-accent-soft);
  border-color: var(--os-line);
}
.shepherd-meeting-port {
  /* 叙事：去小框，串行阅读态；衬线正文，字号行距吃用户偏好 */
}
.shepherd-meeting-port .offline-session-page .offline-beat--narration {
  margin-top: 0;
  padding: 4px 2px 2px;
  background: none;
  background-image: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
}
.shepherd-meeting-port .offline-session-page .offline-beat--narration::after {
  content: none;
}
.shepherd-meeting-port {
  /* 菱形针脚：每段叙事前的缝合点；若这轮带「你的方向」，针脚让位给方向块 */
}
.shepherd-meeting-port .offline-session-page .offline-beat--narration::before {
  content: "";
  position: static;
  display: block;
  width: 5px;
  height: 5px;
  margin: 4px auto 16px;
  padding: 0;
  background: none;
  border: 1px solid var(--os-line);
  border-radius: 0;
  box-shadow: none;
  transform: rotate(45deg);
}
.shepherd-meeting-port .offline-session-page .offline-beat--narration:first-child::before,
.shepherd-meeting-port .offline-session-page .offline-beat--directive + .offline-beat--narration::before,
.shepherd-meeting-port .offline-session-page .offline-beat--narration.is-streaming::before,
.shepherd-meeting-port .offline-session-page[data-os-anchor=off] .offline-beat--narration::before {
  display: none;
}
.shepherd-meeting-port .offline-session-page .offline-beat--narration p {
  padding: 0;
  font-family: var(--os-serif);
  font-size: var(--os-body-size);
  line-height: var(--os-leading);
  text-indent: 0;
  color: var(--os-body-ink, var(--os-ink));
  margin: 0 0 0.9em;
}
.shepherd-meeting-port .os-style-color-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: 100%;
}
.shepherd-meeting-port .os-style-color-row input[type=color] {
  width: 44px;
  height: 38px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}
.shepherd-meeting-port .offline-session-page[data-os-font=sans] .offline-beat--narration p {
  font-family: inherit;
}
.shepherd-meeting-port {
  /* 你的开场 / 你的方向：右缘一道墨线，安静地站在页边 */
}
.shepherd-meeting-port .offline-session-page .offline-beat--opening,
.shepherd-meeting-port .offline-session-page .offline-beat--directive {
  background: none;
  border: none;
  border-right: 2px solid var(--os-accent);
  border-radius: 0;
  box-shadow: none;
  transform: none;
  padding: 2px 12px 2px 0;
  text-align: right;
}
.shepherd-meeting-port .offline-session-page .offline-beat--opening span,
.shepherd-meeting-port .offline-session-page .offline-beat--directive span {
  color: var(--os-ink-3);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.06em;
}
.shepherd-meeting-port .offline-session-page .offline-beat--opening p,
.shepherd-meeting-port .offline-session-page .offline-beat--directive p,
.shepherd-meeting-port .offline-session-page .os-beat-multiline {
  color: var(--os-ink-2);
  font-size: calc(var(--os-body-size) - 2px);
  line-height: 1.7;
  text-align: left;
  white-space: pre-wrap;
  word-break: break-word;
}
.shepherd-meeting-port .offline-session-page .offline-beat--opening p {
  color: var(--os-ink);
}
.shepherd-meeting-port {
  /* 手机插曲 / 日界标：细线收敛 */
}
.shepherd-meeting-port .offline-session-page .offline-beat--interlude {
  background: none;
  border: 1px dashed var(--os-line);
  border-radius: 10px;
}
.shepherd-meeting-port .offline-session-page .offline-beat--daymark span {
  color: var(--os-ink-2);
  background: none;
  border: 1px solid var(--os-line);
}
.shepherd-meeting-port {
  /* beat 操作行：常驻但安静 */
}
.shepherd-meeting-port .offline-session-page .offline-beat-actions {
  margin-top: 4px;
  padding-top: 0;
}
.shepherd-meeting-port .offline-session-page .offline-beat--opening .offline-beat-actions,
.shepherd-meeting-port .offline-session-page .offline-beat--directive .offline-beat-actions {
  justify-content: flex-end;
}
.shepherd-meeting-port {
  /* 翻译入口沿用锚点色 */
}
.shepherd-meeting-port .offline-session-page .narration-translation {
  background: var(--os-accent-soft);
}
.shepherd-meeting-port {
  /* 底栏与工具：纸面 + 细线 */
}
.shepherd-meeting-port .offline-session-page .offline-bar {
  background: var(--os-paper);
  border-top: 1px solid var(--os-line);
}
.shepherd-meeting-port .offline-session-page .offline-plus {
  background: transparent;
  border-color: var(--os-line);
  color: var(--os-ink-2);
}
.shepherd-meeting-port .offline-session-page .offline-directive {
  background: var(--surface);
  border-color: var(--os-line);
  color: var(--os-ink);
}
.shepherd-meeting-port .offline-session-page .offline-tools {
  background: var(--os-paper);
  border-top-color: var(--os-line);
}
.shepherd-meeting-port .offline-session-page .offline-tool {
  background: var(--surface);
}
.shepherd-meeting-port .offline-session-page .offline-tool .offline-tool-state {
  background: var(--os-accent-soft);
  color: var(--os-accent);
}
.shepherd-meeting-port .offline-session-page .offline-options {
  background: var(--os-paper);
}
.shepherd-meeting-port .offline-session-page .offline-option-chip {
  background: var(--surface);
}
.shepherd-meeting-port .offline-session-page .offline-option-chip b {
  background: var(--os-accent-soft);
  color: var(--os-accent);
}
.shepherd-meeting-port {
  /* 叙事设置：固定在真实视口底部，不再受页面底图层/滚动容器定位影响。 */
}
.shepherd-meeting-port .offline-session-page .offline-settings-sheet {
  position: fixed !important;
  inset: 0 !important;
  z-index: 120;
  align-items: flex-end;
  padding-top: max(12px, var(--safe-top, 0px));
  font-family: var(--os-sans);
}
.shepherd-meeting-port .offline-session-page .offline-settings-sheet-backdrop {
  background: rgba(13, 14, 17, 0.42);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.shepherd-meeting-port .offline-session-page .offline-settings-sheet-panel {
  width: min(100%, 560px);
  max-height: calc(var(--app-height, 100dvh) - max(12px, var(--safe-top, 0px)));
  min-height: 0;
  border-radius: 20px 20px 0 0;
  background: var(--os-paper);
  box-shadow: 0 -20px 60px rgba(15, 16, 18, 0.18);
  overflow: hidden;
  transition: margin-bottom 0.14s ease, max-height 0.14s ease;
}
.shepherd-meeting-port {
  /*
   * 线下页的设置/重修弹层不是全局 .modal-sheet，需单独接入软键盘适配。
   * 主屏幕 PWA 的应用壳不会随 IME 缩短：输入聚焦时把弹层整体抬到键盘上方，
   * 同时收紧外壳高度，正文 flex 区才能继续接管触摸滚动。
   */
}
.shepherd-meeting-port html.pwa-standalone:not(.capacitor-native).keyboard-visible .offline-session-page .offline-settings-sheet-panel:is(.ime-panel-active, :focus-within) {
  margin-bottom: var(--keyboard-inset, 0px);
  max-height: calc(100dvh - var(--keyboard-inset, 0px) - max(12px, var(--safe-top, 0px)));
}
.shepherd-meeting-port {
  /*
   * Android 原生壳已按 visualViewport 缩短 #app；键盘出现时再给 flex 外壳确定高度，
   * 避免 System WebView 只拿到 max-height 后让正文失去可滚动高度。
   */
}
.shepherd-meeting-port html.capacitor-native.keyboard-visible .offline-session-page .offline-settings-sheet-panel:focus-within {
  height: calc(var(--app-height, 100dvh) - max(12px, var(--safe-top, 0px)));
}
.shepherd-meeting-port .offline-session-page .offline-settings-sheet-head {
  flex: 0 0 auto;
  min-height: 58px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--os-line);
  background: var(--os-paper);
}
.shepherd-meeting-port .offline-session-page .offline-settings-sheet-head h2 {
  font-family: var(--os-sans);
  font-size: 15px;
  letter-spacing: 0;
}
.shepherd-meeting-port .offline-session-page .offline-settings-sheet-head p {
  margin: 2px 0 0;
  color: var(--os-ink-3);
  font-size: 11px;
}
.shepherd-meeting-port .offline-session-page .offline-settings-sheet-body {
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 12px 16px;
  background: var(--os-paper);
  overscroll-behavior: contain;
}
.shepherd-meeting-port .offline-session-page .offline-settings-sheet-foot {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  padding: 8px 12px calc(10px + var(--safe-bottom, 0px));
  border-top: 1px solid var(--os-line);
  background: var(--os-paper);
  box-shadow: 0 -8px 20px color-mix(in srgb, var(--os-paper) 86%, transparent);
}
.shepherd-meeting-port .offline-session-page .offline-settings-sheet-foot .btn {
  min-height: 42px;
  border-radius: 14px;
}
.shepherd-meeting-port {
  /* 结束相遇二选一（归档保存 / 删除本次见面）。 */
}
.shepherd-meeting-port .offline-session-page .offline-end-sheet-tip {
  margin: 2px 0 12px;
  color: var(--os-ink-3);
  font-size: 13px;
}
.shepherd-meeting-port .offline-session-page .offline-end-choices-btn {
  width: 100%;
  min-height: 44px;
  border-radius: 14px;
}
.shepherd-meeting-port .offline-session-page .offline-end-choices-btn--danger {
  color: #b8433a;
  border-color: rgba(184, 67, 58, 0.45);
}
.shepherd-meeting-port .offline-session-page .offline-end-hint {
  margin: 4px 2px 12px;
  color: var(--os-ink-3);
  font-size: 11px;
  line-height: 1.5;
}
.shepherd-meeting-port .os-settings-preset {
  padding: 2px 0 8px;
}
.shepherd-meeting-port .offline-session-page .os-settings-preset .off-preset-bar {
  gap: 4px;
}
.shepherd-meeting-port .offline-session-page .os-settings-preset .off-preset-save,
.shepherd-meeting-port .offline-session-page .os-settings-preset .off-preset-delete {
  padding-inline: 8px;
  white-space: nowrap;
}
.shepherd-meeting-port .os-settings-group {
  border-top: 1px solid var(--os-line);
}
.shepherd-meeting-port .os-settings-group:last-child {
  border-bottom: 1px solid var(--os-line);
}
.shepherd-meeting-port .os-settings-group > summary {
  min-height: 44px;
  display: grid;
  grid-template-columns: 1fr auto 18px;
  align-items: center;
  gap: 8px;
  list-style: none;
  cursor: pointer;
  color: var(--os-ink);
}
.shepherd-meeting-port .os-settings-group > summary::-webkit-details-marker {
  display: none;
}
.shepherd-meeting-port .os-settings-group > summary span {
  font-size: 15px;
  font-weight: 600;
}
.shepherd-meeting-port .os-settings-group > summary small {
  color: var(--os-ink-3);
  font-size: 11px;
  font-weight: 400;
}
.shepherd-meeting-port .os-settings-group > summary .svg-icon {
  width: 16px;
  height: 16px;
  color: var(--os-ink-3);
  transition: transform 160ms ease;
}
.shepherd-meeting-port .os-settings-group[open] > summary .svg-icon {
  transform: rotate(180deg);
}
.shepherd-meeting-port .os-settings-group-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 0 16px;
}
.shepherd-meeting-port .offline-session-page .os-settings-group-body .api-field,
.shepherd-meeting-port .offline-session-page .os-settings-group-body .off-num-row,
.shepherd-meeting-port .offline-session-page .os-settings-group-body .off-toggle-row {
  margin: 0;
}
.shepherd-meeting-port .offline-session-page .os-settings-group-body .off-settings-divider {
  display: none;
}
.shepherd-meeting-port {
  /* 自动回复独立成一个短面板，不再埋进叙事参数。 */
}
.shepherd-meeting-port .offline-session-page .os-auto-reply-sheet .offline-settings-sheet-panel {
  max-height: min(72dvh, 620px);
}
.shepherd-meeting-port .offline-session-page .os-guided-revision-sheet .offline-settings-sheet-panel {
  max-height: min(82dvh, 680px);
}
.shepherd-meeting-port .offline-session-page .os-routes-sheet .offline-settings-sheet-panel {
  max-height: min(82dvh, 680px);
}
.shepherd-meeting-port html.pwa-standalone:not(.capacitor-native).keyboard-visible .offline-session-page .offline-settings-sheet-panel.ime-panel-active {
  margin-bottom: var(--keyboard-inset, 0px);
  max-height: calc(100dvh - var(--keyboard-inset, 0px) - 12px);
}
.shepherd-meeting-port .os-route-group + .os-route-group {
  margin-top: 16px;
}
.shepherd-meeting-port .os-route-group h3 {
  margin: 0 0 8px;
  color: var(--os-ink-3, var(--text-hint));
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
}
.shepherd-meeting-port .os-route-list,
.shepherd-meeting-port .os-bookmark-list {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border-block: 1px solid var(--os-line, var(--border-soft));
}
.shepherd-meeting-port .os-route-row,
.shepherd-meeting-port .os-bookmark-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  min-height: 54px;
  border-bottom: 1px solid var(--os-line, var(--border-soft));
}
.shepherd-meeting-port .os-route-row:last-child,
.shepherd-meeting-port .os-bookmark-row:last-child {
  border-bottom: 0;
}
.shepherd-meeting-port .os-route-row.is-active {
  box-shadow: inset 2px 0 var(--os-accent, var(--accent));
}
.shepherd-meeting-port .os-route-main,
.shepherd-meeting-port .os-bookmark-row > button:first-child {
  min-width: 0;
  padding: 8px 12px;
  border: 0;
  background: transparent;
  color: var(--os-ink, var(--text));
  text-align: left;
}
.shepherd-meeting-port .os-route-main strong,
.shepherd-meeting-port .os-route-main small,
.shepherd-meeting-port .os-bookmark-row strong,
.shepherd-meeting-port .os-bookmark-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shepherd-meeting-port .os-route-main strong,
.shepherd-meeting-port .os-bookmark-row strong {
  font-size: 13px;
  font-weight: 600;
}
.shepherd-meeting-port .os-route-main small,
.shepherd-meeting-port .os-bookmark-row small {
  margin-top: 2px;
  color: var(--os-ink-3, var(--text-hint));
  font-size: 11px;
}
.shepherd-meeting-port .os-route-main:disabled {
  opacity: 1;
}
.shepherd-meeting-port .os-route-icon-btn {
  min-height: 34px;
  padding: 4px 8px;
  border: 0;
  background: transparent;
  color: var(--os-ink-2, var(--text-secondary));
  font-size: 11px;
}
.shepherd-meeting-port .os-route-icon-btn.is-danger {
  color: #a34f4f;
}
.shepherd-meeting-port .os-route-empty {
  padding: 16px 12px;
  color: var(--os-ink-3, var(--text-hint));
  font-size: 13px;
  text-align: center;
}
.shepherd-meeting-port .os-route-main:focus-visible,
.shepherd-meeting-port .os-bookmark-row > button:focus-visible,
.shepherd-meeting-port .os-route-icon-btn:focus-visible {
  outline: 2px solid var(--os-accent, var(--accent));
  outline-offset: -2px;
}
.shepherd-meeting-port .oda-unused-branches {
  margin-top: 12px;
  border-block: 1px solid var(--border-soft);
}
.shepherd-meeting-port .oda-unused-branches > summary,
.shepherd-meeting-port .oda-unused-branch > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
}
.shepherd-meeting-port .oda-unused-branches > summary span {
  min-width: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg-card);
  text-align: center;
}
.shepherd-meeting-port .oda-unused-branch {
  border-top: 1px solid var(--border-soft);
}
.shepherd-meeting-port .oda-unused-branch > summary {
  min-height: 42px;
  padding-inline: 4px;
}
.shepherd-meeting-port .oda-unused-rounds {
  display: grid;
  gap: 8px;
  padding: 0 0 12px;
}
@media (max-width: 420px) {
  .shepherd-meeting-port .os-route-row,
  .shepherd-meeting-port .os-bookmark-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .shepherd-meeting-port .os-route-row .os-route-icon-btn:last-child,
  .shepherd-meeting-port .os-bookmark-row .os-route-icon-btn:last-child {
    grid-column: 2;
  }
}
@media (prefers-reduced-motion: reduce) {
  .shepherd-meeting-port .offline-session-page .offline-beat {
    scroll-behavior: auto;
  }
}
.shepherd-meeting-port .os-revision-original {
  border-block: 1px solid var(--os-line);
}
.shepherd-meeting-port .os-revision-original > summary,
.shepherd-meeting-port .os-revision-history > summary {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--os-ink-2);
  font-size: 13px;
  cursor: pointer;
}
.shepherd-meeting-port .os-revision-original > p {
  max-height: 132px;
  margin: 0 0 12px;
  overflow: auto;
  color: var(--os-ink-3);
  font-family: var(--os-serif);
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
}
.shepherd-meeting-port .os-guidance-conversation {
  max-height: min(34vh, 300px);
  margin-top: 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.shepherd-meeting-port .os-guidance-conversation[hidden] {
  display: none;
}
.shepherd-meeting-port .os-guidance-conversation-list {
  display: grid;
  gap: 8px;
}
.shepherd-meeting-port .os-guidance-turn {
  width: min(92%, 520px);
  padding: 8px 12px;
  border: 1px solid var(--os-line);
  border-radius: 14px;
  background: var(--os-surface);
}
.shepherd-meeting-port .os-guidance-turn--user {
  justify-self: end;
  border-color: color-mix(in srgb, var(--os-accent) 26%, var(--os-line));
  background: var(--os-accent-soft);
}
.shepherd-meeting-port .os-guidance-turn--assistant {
  justify-self: start;
}
.shepherd-meeting-port .os-guidance-turn > span {
  display: block;
  margin-bottom: 4px;
  color: var(--os-ink-3);
  font-size: 11px;
}
.shepherd-meeting-port .os-guidance-turn > p {
  margin: 0;
  color: var(--os-ink-1);
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
}
.shepherd-meeting-port .os-revision-request {
  margin: 12px 0 8px;
}
.shepherd-meeting-port .os-revision-request textarea {
  resize: vertical;
}
.shepherd-meeting-port .os-revision-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.shepherd-meeting-port .os-revision-chips button,
.shepherd-meeting-port .os-revision-restore {
  min-height: 32px;
  padding: 4px 8px;
  border: 1px solid var(--os-line);
  border-radius: 999px;
  background: transparent;
  color: var(--os-ink-2);
  font-family: var(--os-sans);
  font-size: 11px;
  cursor: pointer;
}
.shepherd-meeting-port .os-revision-chips button.is-active {
  border-color: var(--os-accent);
  background: var(--os-accent-soft);
  color: var(--os-accent);
}
.shepherd-meeting-port .os-revision-status {
  min-height: 18px;
  margin-top: 8px;
  color: var(--os-ink-3);
  font-size: 11px;
}
.shepherd-meeting-port .os-guided-revision-sheet .offline-settings-sheet-foot {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.shepherd-meeting-port .os-current-guidance,
.shepherd-meeting-port .os-guidance-draft {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--os-line);
}
.shepherd-meeting-port .os-current-guidance > summary {
  min-height: 36px;
  display: flex;
  align-items: center;
  color: var(--os-ink-2);
  font-size: 13px;
  cursor: pointer;
}
.shepherd-meeting-port .os-current-guidance > p {
  max-height: 150px;
  margin: 0 0 8px;
  overflow: auto;
  color: var(--os-ink-3);
  font-size: 11px;
  line-height: 1.65;
  white-space: pre-wrap;
}
.shepherd-meeting-port .os-guidance-draft[hidden] {
  display: none;
}
.shepherd-meeting-port .os-guidance-draft-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.shepherd-meeting-port .os-guidance-draft-head strong {
  color: var(--os-ink-1);
  font-size: 13px;
  font-weight: 600;
}
.shepherd-meeting-port .os-guidance-draft-head span {
  color: var(--os-accent);
  font-size: 11px;
}
.shepherd-meeting-port .os-guidance-draft .api-field + .api-field {
  margin-top: 8px;
}
.shepherd-meeting-port .os-guidance-draft textarea {
  resize: vertical;
}
.shepherd-meeting-port .os-guidance-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 8px;
}
.shepherd-meeting-port .os-revision-history {
  margin-top: 4px;
  border-top: 1px solid var(--os-line);
}
.shepherd-meeting-port .os-revision-history > summary span {
  min-width: 20px;
  padding: 2px 4px;
  border-radius: 999px;
  background: var(--os-accent-soft);
  color: var(--os-accent);
  text-align: center;
}
.shepherd-meeting-port .os-revision-history-list {
  display: grid;
  gap: 8px;
  padding-bottom: 4px;
}
.shepherd-meeting-port .os-revision-version {
  padding: 8px 8px;
  border: 1px solid var(--os-line);
  border-radius: 14px;
  background: var(--os-surface);
}
.shepherd-meeting-port .os-revision-version > header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--os-ink-3);
  font-size: 11px;
}
.shepherd-meeting-port .os-revision-version > header span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shepherd-meeting-port .os-revision-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 8px 0;
}
.shepherd-meeting-port .os-revision-compare details {
  min-width: 0;
  color: var(--os-ink-2);
  font-size: 11px;
}
.shepherd-meeting-port .os-revision-compare p {
  max-height: 92px;
  margin: 4px 0 0;
  overflow: auto;
  color: var(--os-ink-3);
  font-family: var(--os-serif);
  line-height: 1.55;
  white-space: pre-wrap;
}
.shepherd-meeting-port .os-revision-restore {
  min-height: 28px;
  padding-block: 4px;
}
.shepherd-meeting-port .os-reroll-version-list {
  display: grid;
  gap: 8px;
}
.shepherd-meeting-port .os-reroll-version {
  padding: 12px;
  border: 1px solid var(--os-line);
  border-radius: 14px;
  background: var(--os-surface);
}
.shepherd-meeting-port .os-reroll-version.is-active {
  border-color: color-mix(in srgb, var(--os-accent) 42%, var(--os-line));
  background: var(--os-accent-soft);
}
.shepherd-meeting-port .os-reroll-version > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.shepherd-meeting-port .os-reroll-version > header span {
  color: var(--os-accent);
  font-size: 11px;
}
.shepherd-meeting-port .os-reroll-version > p {
  max-height: 8.5em;
  margin: 8px 0 12px;
  overflow: auto;
  color: var(--os-ink-2);
  font-family: var(--os-serif);
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
}
@supports not (color: color-mix(in srgb, black, white)) {
  .shepherd-meeting-port .os-reroll-version.is-active {
    border-color: var(--os-accent);
  }
}
.shepherd-meeting-port .offline-session-page .os-auto-reply-sheet [hidden] {
  display: none !important;
}
.shepherd-meeting-port .os-reply-modes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.shepherd-meeting-port .os-reply-mode {
  min-width: 0;
  min-height: 72px;
  padding: 8px 8px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  border: 1px solid var(--os-line);
  border-radius: 14px;
  background: transparent;
  color: var(--os-ink);
  text-align: left;
  cursor: pointer;
}
.shepherd-meeting-port .os-reply-mode strong {
  font-size: 13px;
}
.shepherd-meeting-port .os-reply-mode small {
  color: var(--os-ink-3);
  font-size: 11px;
  line-height: 1.45;
}
.shepherd-meeting-port .os-reply-mode.is-active {
  border-color: var(--os-accent);
  background: var(--os-accent-soft);
}
.shepherd-meeting-port .os-phone-playback-settings {
  display: flex;
  flex-direction: column;
  margin-top: 12px;
  border-top: 1px solid var(--os-line);
}
.shepherd-meeting-port .os-phone-playback-row {
  min-height: 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 62px;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--os-line);
}
.shepherd-meeting-port .os-phone-playback-row.is-toggle-only {
  grid-template-columns: minmax(0, 1fr) auto;
}
.shepherd-meeting-port .os-phone-playback-row > span {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.shepherd-meeting-port .os-phone-playback-row strong {
  color: var(--os-ink);
  font-size: 13px;
}
.shepherd-meeting-port .os-phone-playback-row small {
  color: var(--os-ink-3);
  font-size: 11px;
  line-height: 1.4;
}
.shepherd-meeting-port .os-phone-playback-row .form-input {
  height: 32px;
  min-height: 32px;
  padding: 0 8px;
  font-size: 13px;
}
.shepherd-meeting-port .offline-session-page .off-auto-reply-global {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--os-ink-2);
  font-size: 13px;
}
.shepherd-meeting-port .offline-session-page .offline-settings-sheet .form-input {
  border-color: var(--os-line);
  background: var(--os-surface);
  color: var(--os-ink);
  box-shadow: none;
}
.shepherd-meeting-port .offline-session-page .offline-settings-sheet .off-seg-btn {
  border-color: var(--os-line);
  background: transparent;
  color: var(--os-ink-2);
}
.shepherd-meeting-port .offline-session-page .offline-settings-sheet .off-seg-btn.is-active {
  border-color: var(--os-accent);
  background: var(--os-accent-soft);
  color: var(--os-accent);
  box-shadow: none;
}
.shepherd-meeting-port .offline-session-page .offline-settings-sheet input[type=checkbox] {
  accent-color: var(--os-accent);
}
.shepherd-meeting-port .offline-session-page .offline-settings-sheet .off-audio-stage-range input[type=range] {
  accent-color: var(--os-accent);
}
.shepherd-meeting-port {
  /* 底部输入：单一胶囊输入 + 两枚克制图标按钮。 */
}
.shepherd-meeting-port .offline-session-page .offline-bar {
  gap: 8px;
  padding: 8px 12px calc(8px + var(--safe-bottom));
}
.shepherd-meeting-port .offline-session-page .offline-bar .offline-plus {
  width: 34px;
  min-width: 34px;
  height: 34px;
  border: none;
  border-radius: 10px;
}
.shepherd-meeting-port .offline-session-page .offline-bar .offline-input-wrap {
  min-height: 38px;
  border: 1px solid var(--os-line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
}
.shepherd-meeting-port {
  /* 焦点环只画在包裹层上：输入区自身不再描边，避免两条底边一高一低。 */
}
.shepherd-meeting-port .offline-session-page .offline-bar .offline-input-wrap:focus-within {
  border-color: var(--os-accent);
}
.shepherd-meeting-port .offline-session-page .offline-bar .offline-directive {
  min-height: 38px;
  height: auto;
  padding: 8px 64px 8px 12px;
  border: none;
  border-radius: inherit;
  background: transparent;
  box-shadow: none;
  font-family: var(--os-sans);
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
  resize: none;
}
.shepherd-meeting-port .offline-session-page .offline-bar .offline-directive:focus {
  outline: none;
  box-shadow: none;
}
.shepherd-meeting-port .offline-session-page .offline-bar .offline-expand {
  right: 3px;
  bottom: 4px;
  top: auto;
  transform: none;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  color: var(--os-ink-3);
}
.shepherd-meeting-port .offline-session-page .offline-bar .offline-directive-clear {
  right: 33px;
  bottom: 4px;
  width: 30px;
  height: 30px;
  color: var(--os-ink-3);
}
.shepherd-meeting-port .offline-session-page .offline-bar .offline-advance {
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  border-radius: 14px;
  box-shadow: none;
}
.shepherd-meeting-port {
  /* 楼层导航浮在右侧，不改变正文边距；线下、番外与交汇均保留原有阅读栏宽。 */
}
.shepherd-meeting-port .offline-session-page .os-timeline-nav {
  position: absolute;
  right: max(12px, env(safe-area-inset-right));
  bottom: var(--os-timeline-bottom-offset, calc(84px + var(--safe-bottom)));
  z-index: 5;
  width: 40px;
  display: grid;
  grid-template-columns: 40px;
  grid-auto-rows: 40px;
  gap: 4px;
  padding: 0;
  transition: opacity 180ms ease, transform 180ms ease;
}
.shepherd-meeting-port .offline-session-page .os-timeline-nav.is-idle {
  opacity: 0.16;
  transform: translateX(6px);
}
.shepherd-meeting-port .offline-session-page .os-timeline-nav:focus-within {
  opacity: 1;
  transform: none;
}
@media (hover: hover) {
  .shepherd-meeting-port .offline-session-page .os-timeline-nav:hover {
    opacity: 1;
    transform: none;
  }
}
.shepherd-meeting-port .offline-session-page[data-os-has-bg="1"] > .os-timeline-nav {
  position: absolute;
  z-index: 5;
}
.shepherd-meeting-port .offline-session-page[data-os-timeline-nav=off] .os-timeline-nav,
.shepherd-meeting-port .offline-session-page .os-timeline-nav.is-space-limited,
.shepherd-meeting-port .offline-session-page .os-timeline-nav[hidden] {
  display: none;
}
.shepherd-meeting-port .offline-session-page .os-timeline-nav-button {
  position: relative;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--os-line);
  border-radius: 50%;
  background: color-mix(in srgb, var(--os-paper) 90%, transparent);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--os-ink) 9%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--os-ink-2);
  cursor: pointer;
}
.shepherd-meeting-port .offline-session-page .os-timeline-nav-button .svg-icon {
  width: 15px;
  height: 15px;
}
.shepherd-meeting-port .offline-session-page .os-timeline-nav-button.is-prev .svg-icon {
  transform: rotate(180deg);
}
.shepherd-meeting-port .offline-session-page .os-timeline-nav-button.is-top .svg-icon {
  transform: translateY(3px) rotate(180deg);
}
.shepherd-meeting-port .offline-session-page .os-timeline-nav-button.is-bottom .svg-icon {
  transform: translateY(-3px);
}
.shepherd-meeting-port .offline-session-page .os-timeline-nav-button.is-top::before,
.shepherd-meeting-port .offline-session-page .os-timeline-nav-button.is-bottom::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 9px;
  height: 1px;
  background: currentColor;
  transform: translateX(-50%);
}
.shepherd-meeting-port .offline-session-page .os-timeline-nav-button.is-top::before {
  top: 8px;
}
.shepherd-meeting-port .offline-session-page .os-timeline-nav-button.is-bottom::after {
  bottom: 8px;
}
@media (hover: hover) {
  .shepherd-meeting-port .offline-session-page .os-timeline-nav-button:not(:disabled):hover {
    background: var(--os-accent-soft);
    color: var(--os-accent);
  }
}
.shepherd-meeting-port .offline-session-page .os-timeline-nav-button:focus-visible {
  outline: 2px solid var(--os-accent);
  outline-offset: 2px;
}
.shepherd-meeting-port .offline-session-page .os-timeline-nav-button:disabled {
  opacity: 0.28;
  cursor: default;
}
@media (prefers-reduced-motion: reduce) {
  .shepherd-meeting-port .offline-session-page .os-timeline-nav {
    transition: none;
  }
}
.shepherd-meeting-port {
  /* 每段文字的翻页页脚：默认只显示时间和省略号，操作按需展开。 */
}
.shepherd-meeting-port .os-beat-footer {
  position: relative;
  min-height: 28px;
  margin-top: 8px;
  display: block;
  color: var(--os-ink-3);
}
.shepherd-meeting-port .os-beat-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.shepherd-meeting-port .os-beat-rule {
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, transparent, var(--os-line));
}
.shepherd-meeting-port .os-beat-thoughts {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: min(58%, 320px);
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.shepherd-meeting-port .os-beat-thoughts::-webkit-scrollbar {
  display: none;
}
.shepherd-meeting-port .os-beat-thought {
  flex: 0 0 auto;
  padding: 4px 8px;
  border: 1px solid var(--os-line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--os-accent-soft) 52%, transparent);
  color: var(--os-ink-2);
  font-family: var(--os-sans);
  font-size: 11px;
  line-height: 1.2;
  cursor: pointer;
}
.shepherd-meeting-port .os-beat-thought:hover,
.shepherd-meeting-port .os-beat-thought:focus-visible {
  border-color: var(--os-accent);
  color: var(--os-accent);
  outline: none;
}
.shepherd-meeting-port .offline-page .narrative-thought {
  margin: -0.15em 0 1.1em;
  padding: 0 0 0 1em;
  border-left: 1px solid var(--os-line, var(--border));
  color: var(--os-body-ink, var(--os-ink, var(--text)));
  color: color-mix(in srgb, var(--os-body-ink, var(--os-ink, var(--text))) 84%, var(--os-ink-2, var(--text-secondary)));
  font: inherit;
  font-family: var(--os-serif, inherit);
  font-size: var(--os-body-size, inherit);
  line-height: var(--os-leading, inherit);
  overflow-wrap: anywhere;
}
.shepherd-meeting-port .offline-page[data-os-font=sans] .narrative-thought {
  font-family: var(--os-sans, inherit);
}
.shepherd-meeting-port .offline-page .narrative-thought-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6em;
  min-height: 44px;
  padding: 4px 8px 4px 0;
  box-sizing: border-box;
  list-style: none;
  cursor: pointer;
}
.shepherd-meeting-port .offline-page .narrative-thought-heading::-webkit-details-marker {
  display: none;
}
.shepherd-meeting-port .offline-page .narrative-thought-heading:focus-visible,
.shepherd-meeting-port .offline-page .narrative-thought-attributes > summary:focus-visible,
.shepherd-meeting-port .thought-settings summary:focus-visible {
  outline: 2px solid var(--os-ink, var(--text));
  outline-offset: 3px;
  border-radius: 6px;
}
.shepherd-meeting-port .offline-page .narrative-thought-caret {
  flex: 0 0 6px;
  height: 6px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(-45deg);
  margin-right: 4px;
}
.shepherd-meeting-port .offline-page .narrative-thought[open] > summary .narrative-thought-caret {
  transform: rotate(45deg);
}
.shepherd-meeting-port .offline-page .narrative-thought-content {
  padding: 0.15em 0.6em 0.6em 0;
}
.shepherd-meeting-port .offline-page .narrative-thought-name {
  display: block;
  color: var(--os-ink-2, var(--text-secondary));
  font-family: var(--os-sans, inherit);
  font-size: max(12px, 0.78em);
  font-weight: 500;
  line-height: 1.6;
}
.shepherd-meeting-port .offline-page .narrative-thought-translate {
  flex: 0 0 auto;
  min-width: 44px;
  min-height: 44px;
  padding: 4px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--os-ink-2, var(--text-secondary));
  font-family: var(--os-sans, inherit);
  font-size: 0.72em;
  line-height: 1.6;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}
.shepherd-meeting-port .offline-page .narrative-thought-translate:focus-visible {
  outline: 2px solid var(--os-ink, var(--text));
  outline-offset: 2px;
}
.shepherd-meeting-port .offline-page .narrative-thought-translate:disabled {
  cursor: wait;
}
.shepherd-meeting-port .offline-page .narrative-thought .narrative-thought-text,
.shepherd-meeting-port .offline-page .narrative-thought .narrative-thought-translation {
  margin: 0;
  color: inherit;
  font: inherit;
  line-height: inherit;
  white-space: pre-wrap;
}
.shepherd-meeting-port .offline-page .narrative-thought .narrative-thought-translation {
  margin-top: 0.5em;
  color: var(--os-ink-2, var(--text-secondary));
  font-size: 0.9em;
}
.shepherd-meeting-port {
  /* 心声像段落边的一道折口；色与字体沿用本页阅读 token，不新增装饰色。 */
}
.shepherd-meeting-port .offline-page .narrative-thought-attributes {
  margin-top: 0.65em;
  font-family: var(--os-sans, inherit);
  font-size: 13px;
  color: var(--os-ink-2, var(--text-secondary));
}
.shepherd-meeting-port .offline-page .narrative-thought-attributes > summary {
  min-height: 44px;
  align-content: center;
  cursor: pointer;
}
.shepherd-meeting-port .offline-page .narrative-thought-attributes dl {
  margin: 0;
  padding: 0;
}
.shepherd-meeting-port .offline-page .narrative-thought-attribute {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 16px;
  padding: 8px 0;
  border-top: 1px solid var(--os-line, var(--border));
}
.shepherd-meeting-port .offline-page .narrative-thought-attribute dd {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  color: var(--os-ink, var(--text));
  font-variant-numeric: tabular-nums;
}
.shepherd-meeting-port .offline-page .narrative-thought-attribute small {
  color: var(--os-ink-2, var(--text-secondary));
  font-size: inherit;
}
.shepherd-meeting-port .offline-page .narrative-thoughts-tail {
  margin-top: 1.5em;
}
.shepherd-meeting-port .offline-page .narrative-thought-status {
  font: 13px/1.6 var(--os-sans);
  color: var(--os-ink-2);
}
.shepherd-meeting-port .thought-settings {
  min-width: 0;
}
.shepherd-meeting-port .thought-settings summary {
  min-height: 44px;
  align-content: center;
  cursor: pointer;
  font-size: 13px;
  color: var(--os-ink, var(--text));
  overflow-wrap: anywhere;
}
.shepherd-meeting-port .thought-attribute-editor {
  padding: 4px 0 12px;
  border-top: 1px solid var(--os-line, var(--border));
}
.shepherd-meeting-port .thought-settings .api-field {
  margin: 8px 0;
  min-width: 0;
}
.shepherd-meeting-port .thought-settings .form-input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
}
.shepherd-meeting-port .thought-attribute-numbers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 12px;
}
.shepherd-meeting-port .thought-attribute-numbers[hidden] {
  display: none;
}
.shepherd-meeting-port .thought-attribute-numbers > :last-child {
  grid-column: 1/-1;
}
.shepherd-meeting-port .thought-settings button {
  min-height: 44px;
}
@media (prefers-reduced-motion: no-preference) {
  .shepherd-meeting-port .offline-page .narrative-thought-caret {
    transition: transform 160ms ease;
  }
}
.shepherd-meeting-port .os-inline-thoughts {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: -2px 0 12px;
  padding-left: clamp(4px, 2vw, 18px);
}
.shepherd-meeting-port .os-inline-thought {
  flex: 0 1 auto;
  box-sizing: border-box;
  min-width: 0;
  max-width: min(100%, 320px);
  min-height: 30px;
  padding: 4px 8px 4px 8px;
  border: 0;
  border-left: 1px solid color-mix(in srgb, var(--os-accent) 52%, var(--os-line));
  background: transparent;
  color: var(--os-ink-3);
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--os-serif);
  font-style: italic;
  text-align: left;
  cursor: pointer;
}
.shepherd-meeting-port .os-inline-thought > span {
  color: var(--os-accent);
  font-size: 17px;
  line-height: 1;
  letter-spacing: 0.08em;
}
.shepherd-meeting-port .os-inline-thought small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: inherit;
  font-size: 11px;
  letter-spacing: 0.02em;
}
.shepherd-meeting-port .os-inline-thought:hover,
.shepherd-meeting-port .os-inline-thought:focus-visible {
  color: var(--os-ink-2);
  border-left-color: var(--os-accent);
  outline: none;
}
@media (prefers-reduced-motion: no-preference) {
  .shepherd-meeting-port .os-inline-thought {
    transition: color 160ms ease, border-color 160ms ease;
  }
}
.shepherd-meeting-port .os-beat-footer time {
  font-family: var(--os-sans);
  font-size: 11px;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}
.shepherd-meeting-port .os-beat-menu {
  width: 28px;
  height: 26px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--os-ink-3);
  cursor: pointer;
}
.shepherd-meeting-port .os-beat-menu .svg-icon {
  width: 16px;
  height: 16px;
}
.shepherd-meeting-port .os-beat-menu[aria-expanded=true] {
  background: var(--os-accent-soft);
  color: var(--os-accent);
}
.shepherd-meeting-port .os-beat-quick-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.shepherd-meeting-port .os-beat-quick-actions button {
  appearance: none;
  -webkit-appearance: none;
  min-height: 26px;
  padding: 4px 8px;
  border: 1px solid var(--os-line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--os-accent-soft) 48%, transparent);
  color: var(--os-ink-2);
  font-family: var(--os-sans);
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
}
.shepherd-meeting-port .os-beat-quick-actions button:active {
  border-color: var(--os-accent);
  color: var(--os-accent);
}
.shepherd-meeting-port .os-recovery-choice-list {
  display: grid;
  gap: 8px;
}
.shepherd-meeting-port .os-recovery-choice {
  width: 100%;
  display: grid;
  gap: 4px;
  padding: 12px 12px;
  border: 1px solid var(--os-line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--os-ink);
  text-align: left;
  cursor: pointer;
}
.shepherd-meeting-port .os-recovery-choice strong {
  font-size: 13px;
  font-weight: 600;
}
.shepherd-meeting-port .os-recovery-choice span {
  color: var(--os-ink-3);
  font-size: 11px;
  line-height: 1.5;
}
.shepherd-meeting-port .os-recovery-choice:focus-visible {
  outline: 2px solid var(--os-accent);
  outline-offset: 2px;
}
.shepherd-meeting-port .os-beat-footer .offline-beat-actions {
  margin: 0;
  padding: 0 2px 0 4px;
  gap: 2px;
}
.shepherd-meeting-port .os-beat-footer .offline-beat-actions[hidden] {
  display: none;
}
.shepherd-meeting-port .os-beat-footer .offline-beat-edit,
.shepherd-meeting-port .os-beat-footer .offline-beat-delete,
.shepherd-meeting-port .os-beat-footer .offline-beat-image-btn,
.shepherd-meeting-port .os-beat-footer .offline-beat-image-clear,
.shepherd-meeting-port .os-beat-footer .offline-beat-revise,
.shepherd-meeting-port .os-beat-footer .offline-beat-continue,
.shepherd-meeting-port .os-beat-footer .offline-beat-bookmark,
.shepherd-meeting-port .os-beat-footer .offline-beat-fork {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--os-ink-2);
  font-family: var(--os-sans);
  font-size: 11px;
  padding: 4px 8px;
  cursor: pointer;
}
.shepherd-meeting-port .os-beat-footer .offline-beat-delete,
.shepherd-meeting-port .os-beat-footer .offline-beat-image-clear {
  color: #a95b58;
}
.shepherd-meeting-port {
  /*
   * 楼层「更多」使用独立操作面板，不继承气泡的宽度、书写方向和 flex 布局。
   * !important 只圈在这个运行时面板内，用来抵抗用户主题对通用 beat 按钮的覆盖。
   */
}
.shepherd-meeting-port .offline-beat-action-layer {
  position: fixed !important;
  inset: 0 !important;
  z-index: 1600 !important;
  box-sizing: border-box !important;
  display: grid !important;
  place-items: end center !important;
  padding: max(16px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(16px, var(--safe-bottom, 0px)) max(14px, env(safe-area-inset-left)) !important;
  font-family: var(--os-sans, var(--font-family, sans-serif)) !important;
  writing-mode: horizontal-tb !important;
}
.shepherd-meeting-port .offline-beat-action-backdrop {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: rgba(21, 24, 30, 0.46) !important;
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.shepherd-meeting-port .offline-beat-action-sheet {
  position: relative !important;
  box-sizing: border-box !important;
  width: min(100%, 390px) !important;
  max-width: calc(100vw - 28px) !important;
  max-height: min(76vh, 620px) !important;
  max-height: min(76dvh, 620px) !important;
  overflow: auto !important;
  margin: 0 !important;
  padding: 8px !important;
  border: 1px solid var(--os-line, rgba(126, 119, 111, 0.24)) !important;
  border-radius: 20px !important;
  background: var(--os-paper, var(--surface, #fff)) !important;
  color: var(--os-ink, var(--text, #242424)) !important;
  box-shadow: 0 20px 56px rgba(20, 24, 31, 0.24) !important;
  writing-mode: horizontal-tb !important;
}
.shepherd-meeting-port .offline-beat-action-sheet-head {
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  min-height: 42px !important;
  padding: 4px 4px 8px 8px !important;
  writing-mode: horizontal-tb !important;
}
.shepherd-meeting-port .offline-beat-action-sheet-head strong {
  color: var(--os-ink, var(--text, #242424)) !important;
  font-size: 15px !important;
  font-weight: 650 !important;
  line-height: 1.3 !important;
  white-space: nowrap !important;
  writing-mode: horizontal-tb !important;
}
.shepherd-meeting-port .offline-beat-action-sheet-head button {
  appearance: none !important;
  -webkit-appearance: none !important;
  box-sizing: border-box !important;
  width: 34px !important;
  min-width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: var(--os-accent-soft, rgba(120, 130, 150, 0.1)) !important;
  color: var(--os-ink-2, var(--text-secondary, #666)) !important;
}
.shepherd-meeting-port .offline-beat-action-sheet-head .svg-icon {
  width: 17px !important;
  height: 17px !important;
}
.shepherd-meeting-port .offline-beat-action-sheet .offline-beat-actions {
  position: static !important;
  box-sizing: border-box !important;
  z-index: auto !important;
  width: 100% !important;
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  justify-content: stretch !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
  writing-mode: horizontal-tb !important;
}
.shepherd-meeting-port .offline-beat-action-sheet .offline-beat-actions button,
.shepherd-meeting-port .offline-beat-action-cancel {
  appearance: none !important;
  -webkit-appearance: none !important;
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 42px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 8px 8px !important;
  border: 1px solid var(--os-line, rgba(126, 119, 111, 0.22)) !important;
  border-radius: 14px !important;
  background: color-mix(in srgb, var(--os-accent-soft, #eef0f3) 52%, transparent) !important;
  color: var(--os-ink-2, var(--text-secondary, #666)) !important;
  font-family: var(--os-sans, var(--font-family, sans-serif)) !important;
  font-size: 13px !important;
  font-weight: 520 !important;
  line-height: 1.25 !important;
  text-align: center !important;
  text-indent: 0 !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
  word-break: keep-all !important;
  overflow-wrap: normal !important;
  writing-mode: horizontal-tb !important;
  transform: none !important;
}
.shepherd-meeting-port .offline-beat-action-sheet .offline-beat-delete,
.shepherd-meeting-port .offline-beat-action-sheet .offline-beat-image-clear {
  color: #a95b58 !important;
}
.shepherd-meeting-port .offline-beat-action-cancel {
  margin-top: 8px !important;
  background: transparent !important;
}
@media (max-width: 320px) {
  .shepherd-meeting-port .offline-beat-action-sheet .offline-beat-actions {
    grid-template-columns: 1fr !important;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .shepherd-meeting-port .offline-beat-action-sheet {
    animation: offlineBeatActionSheetIn 150ms ease-out both;
  }
}
@keyframes offlineBeatActionSheetIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}
.shepherd-meeting-port {
  /* 手机往来只占一张消息提醒，不把聊天摘要铺进叙事正文。 */
}
.shepherd-meeting-port .offline-session-page .offline-beat--interlude.os-interlude-notice {
  max-width: 100%;
  padding: 0;
  border: none;
  background: transparent;
}
.shepherd-meeting-port .os-message-notice {
  width: 100%;
  min-height: 58px;
  padding: 8px 12px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--os-line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--os-paper) 92%, transparent);
  color: var(--os-ink);
  text-align: left;
  cursor: pointer;
}
.shepherd-meeting-port .offline-session-page .os-phone-action-notices {
  margin-top: 16px;
  display: grid;
  gap: 8px;
}
.shepherd-meeting-port .offline-session-page .os-phone-action-notices .os-message-notice {
  background: color-mix(in srgb, var(--os-paper) 86%, var(--os-accent-soft));
}
.shepherd-meeting-port .offline-session-page .os-message-notice:focus-visible {
  outline: 2px solid var(--os-accent);
  outline-offset: 2px;
}
.shepherd-meeting-port .os-message-notice-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--os-accent-soft);
  color: var(--os-accent);
}
.shepherd-meeting-port .os-message-notice-icon .svg-icon,
.shepherd-meeting-port .os-message-notice-go .svg-icon {
  width: 16px;
  height: 16px;
}
.shepherd-meeting-port .os-message-notice-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.shepherd-meeting-port .os-message-notice-copy strong {
  overflow: hidden;
  color: var(--os-ink);
  font-family: var(--os-sans);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shepherd-meeting-port .os-message-notice-copy small {
  overflow: hidden;
  color: var(--os-ink-3);
  font-family: var(--os-sans);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shepherd-meeting-port .os-message-notice-go {
  color: var(--os-ink-3);
}
.shepherd-meeting-port .os-phone-cinematic-cue {
  position: fixed;
  z-index: 180;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  min-width: 190px;
  padding: 16px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  background: rgba(18, 19, 22, 0.9);
  color: #fff;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.25);
  font-family: var(--os-sans);
  font-size: 13px;
  animation: osPhoneCueIn 220ms ease-out both;
}
.shepherd-meeting-port .os-phone-cinematic-cue .svg-icon {
  width: 18px;
  height: 18px;
}
@keyframes osPhoneCueIn {
  from {
    opacity: 0;
    transform: translate(-50%, -44%) scale(0.96);
  }
}
.shepherd-meeting-port .oda-round--message-notice {
  width: 100%;
  padding: 12px 12px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: var(--bg-card);
  color: var(--text);
  text-align: left;
}
.shepherd-meeting-port .oda-round--message-notice > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.shepherd-meeting-port .oda-round--message-notice strong,
.shepherd-meeting-port .oda-round--message-notice small {
  display: block;
}
.shepherd-meeting-port .oda-round--message-notice small {
  color: var(--text-hint);
  font-size: 11px;
}
.shepherd-meeting-port .oda-message-notice-icon {
  color: var(--text-accent);
}
@media (prefers-reduced-motion: reduce) {
  .shepherd-meeting-port .os-phone-cinematic-cue {
    animation: none;
  }
  .shepherd-meeting-port .offline-options-pending i {
    animation: none;
    opacity: 0.55;
  }
}
.shepherd-meeting-port {
  /* ============ beat 重 roll（最后一轮叙事常驻） ============ */
}
.shepherd-meeting-port .offline-beat-reroll {
  border: none;
  background: transparent;
  color: var(--text-hint);
  font-size: var(--font-xs);
  padding: 4px 8px;
  cursor: pointer;
}
.shepherd-meeting-port .offline-beat-reroll:active {
  color: var(--text-accent);
}
.shepherd-meeting-port .offline-beat-edit:focus-visible,
.shepherd-meeting-port .offline-beat-delete:focus-visible,
.shepherd-meeting-port .offline-beat-reroll:focus-visible,
.shepherd-meeting-port .offline-beat-revise:focus-visible,
.shepherd-meeting-port .offline-beat-continue:focus-visible,
.shepherd-meeting-port .offline-beat-bookmark:focus-visible,
.shepherd-meeting-port .offline-beat-fork:focus-visible,
.shepherd-meeting-port .os-beat-quick-actions button:focus-visible,
.shepherd-meeting-port .os-revision-chips button:focus-visible,
.shepherd-meeting-port .os-revision-restore:focus-visible,
.shepherd-meeting-port .os-current-guidance > summary:focus-visible,
.shepherd-meeting-port .os-current-guidance button:focus-visible,
.shepherd-meeting-port .os-guidance-actions button:focus-visible,
.shepherd-meeting-port .os-revision-original > summary:focus-visible,
.shepherd-meeting-port .os-revision-history > summary:focus-visible,
.shepherd-meeting-port .os-history-toggle:focus-visible,
.shepherd-meeting-port .os-manage-btn:focus-visible {
  outline: 2px solid var(--accent, #e2895f);
  outline-offset: 2px;
  border-radius: 6px;
}
@media (max-width: 430px) {
  .shepherd-meeting-port .os-revision-compare {
    grid-template-columns: 1fr;
  }
  .shepherd-meeting-port .os-guidance-actions {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  .shepherd-meeting-port .os-guided-revision-sheet *,
  .shepherd-meeting-port .os-guided-revision-sheet *::before,
  .shepherd-meeting-port .os-guided-revision-sheet *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
.shepherd-meeting-port {
  /* ============ 管理模式：批量选择 / 删除（两套皮通用） ============ */
}
.shepherd-meeting-port .os-manage-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px calc(10px + var(--safe-bottom));
  background: var(--bg-sheet);
  border-top: 1px solid var(--border);
}
.shepherd-meeting-port .os-manage-bar[hidden] {
  display: none;
}
.shepherd-meeting-port .os-manage-count {
  flex: 1;
  min-width: 0;
  font-size: var(--font-xs);
  color: var(--text-secondary);
}
.shepherd-meeting-port .os-manage-btn {
  flex: 0 0 auto;
  border: 1px solid var(--border-soft, #ece0d6);
  background: var(--surface, #fff);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: var(--font-sm);
  color: var(--text);
  cursor: pointer;
}
.shepherd-meeting-port .os-manage-btn:disabled {
  opacity: 0.45;
  cursor: default;
}
.shepherd-meeting-port .os-manage-btn--danger {
  color: #b8433a;
  border-color: rgba(184, 67, 58, 0.4);
}
.shepherd-meeting-port .offline-beats.is-managing .offline-beat:not(.offline-beat--daymark) {
  position: relative;
  margin-left: 32px;
}
.shepherd-meeting-port .os-beat-pick {
  position: absolute;
  top: 6px;
  left: -30px;
  display: inline-flex;
  padding: 2px;
}
.shepherd-meeting-port .os-beat-pick input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent, #e2895f);
}
.shepherd-meeting-port {
  /* 历史折叠：早前剧情收起，一键展开 */
}
.shepherd-meeting-port .os-history-toggle {
  display: block;
  margin: 0 auto 12px;
  border: 1px solid var(--border-soft, #ece0d6);
  background: var(--surface, #fff);
  border-radius: 999px;
  padding: 4px 16px;
  font-size: var(--font-xs);
  color: var(--text-secondary);
  cursor: pointer;
}
.shepherd-meeting-port {
  /* ============ 美化界面 · token 偏好面板 ============
     面板挂在全局 modal 容器（页面作用域之外），单独按相遇皮 token 换装：
     纯白面、发丝线、石墨 #17181b 强调，黑体栈。 */
}
.shepherd-meeting-port .os-style-sheet {
  width: min(560px, 100%);
  margin-left: auto;
  margin-right: auto;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  background: #ffffff;
  background-image: none;
  border: 1px solid rgba(26, 27, 30, 0.08);
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(15, 16, 18, 0.16);
}
.shepherd-meeting-port {
  /*
   * 线下美化是长表单。部分小米 System WebView 无法从只有 max-height 的
   * flex 弹层推导出正文滚动高度，结果会把内容裁掉但不生成可触摸的滚动区。
   * 跟其他 Android 长设置弹层一样锚定 #app，并由父层百分比给出确定高度；
   * 不依赖旧 WebView 可能不识别的 dvh。
   */
}
.shepherd-meeting-port .modal-overlay[data-style-overlay] {
  position: absolute;
  padding-top: max(12px, var(--safe-top, 0px));
  overflow: hidden;
  overscroll-behavior: none;
}
.shepherd-meeting-port .modal-overlay[data-style-overlay] > .os-style-sheet {
  height: 85%;
  max-height: 100%;
  min-height: 0;
}
.shepherd-meeting-port .os-style-sheet .modal-header h3 {
  font-family: inherit;
  color: #1a1b1e;
}
.shepherd-meeting-port .os-style-sheet .os-style-label {
  color: #72737a;
}
.shepherd-meeting-port .os-style-sheet .os-style-val {
  color: rgba(26, 27, 30, 0.4);
}
.shepherd-meeting-port .os-style-sheet .os-style-seg-btn {
  background: #ffffff;
  border-color: rgba(26, 27, 30, 0.12);
  color: #72737a;
}
.shepherd-meeting-port .os-style-sheet .os-style-seg-btn.is-on {
  border-color: #17181b;
  color: #17181b;
}
.shepherd-meeting-port .os-style-sheet .os-style-range,
.shepherd-meeting-port .os-style-sheet input[type=checkbox] {
  accent-color: #17181b;
}
.shepherd-meeting-port .os-style-sheet .form-input {
  background: #ffffff;
  border-color: rgba(26, 27, 30, 0.12);
  color: #1a1b1e;
}
.shepherd-meeting-port .os-style-sheet .btn-primary {
  background: #17181b;
  border-color: #17181b;
  color: #ffffff;
  box-shadow: none;
}
.shepherd-meeting-port .os-style-sheet .btn-outline {
  background: transparent;
  border: 1px solid rgba(26, 27, 30, 0.14);
  color: #72737a;
  box-shadow: none;
}
.shepherd-meeting-port .os-style-sheet .os-style-foot {
  border-top-color: rgba(26, 27, 30, 0.08);
}
.shepherd-meeting-port .os-style-sheet .os-style-row--check {
  color: #72737a;
}
.shepherd-meeting-port .os-style-sheet .modal-close-btn {
  background: transparent;
  color: #72737a;
  box-shadow: none;
}
.shepherd-meeting-port .os-style-sheet > .os-style-body {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
}
.shepherd-meeting-port .os-style-presets {
  display: grid;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(26, 27, 30, 0.08);
}
.shepherd-meeting-port .os-style-preset-row,
.shepherd-meeting-port .os-style-preset-save-row,
.shepherd-meeting-port .os-style-doc-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.shepherd-meeting-port .os-style-preset-select,
.shepherd-meeting-port .os-style-preset-save-row .form-input {
  min-width: 0;
  flex: 1;
}
.shepherd-meeting-port .os-style-doc-actions {
  flex-wrap: wrap;
  margin-top: -6px;
}
.shepherd-meeting-port .os-style-sheet :is(button, input, select, textarea):focus-visible {
  outline: 2px solid rgba(23, 24, 27, 0.58);
  outline-offset: 2px;
}
.shepherd-meeting-port .os-style-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.shepherd-meeting-port .os-style-row--check {
  flex-direction: row;
  align-items: center;
  font-size: var(--font-sm);
  color: var(--text-secondary);
}
.shepherd-meeting-port .os-style-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: var(--font-xs);
  font-weight: 600;
  color: var(--text-secondary);
}
.shepherd-meeting-port .os-style-val {
  font-style: normal;
  font-weight: 400;
  color: var(--text-hint);
}
.shepherd-meeting-port .os-style-seg {
  display: flex;
  gap: 4px;
}
.shepherd-meeting-port .os-style-seg-btn {
  flex: 1;
  padding: 8px 0;
  border: 1px solid var(--border-soft, #ece0d6);
  border-radius: 10px;
  background: var(--surface, #fff);
  font-size: var(--font-sm);
  color: var(--text-secondary);
  cursor: pointer;
}
.shepherd-meeting-port .os-style-seg-btn.is-on {
  border-color: var(--accent, #e2895f);
  color: var(--accent, #e2895f);
  font-weight: 600;
}
.shepherd-meeting-port .os-style-range {
  width: 100%;
  accent-color: var(--accent, #e2895f);
}
.shepherd-meeting-port .os-style-css {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
  resize: vertical;
}
.shepherd-meeting-port .os-style-foot {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 12px 0 0;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}
@media (max-width: 440px) {
  .shepherd-meeting-port .os-style-preset-row,
  .shepherd-meeting-port .os-style-preset-save-row {
    align-items: stretch;
    flex-wrap: wrap;
  }
  .shepherd-meeting-port .os-style-preset-row .os-style-preset-select,
  .shepherd-meeting-port .os-style-preset-save-row .form-input {
    flex-basis: 100%;
  }
}
.shepherd-meeting-port {
  /* ============ 我们的记录 · 一起旅行徽标 ============ */
}
.shepherd-meeting-port .odl-item-badge {
  display: inline-flex;
  align-self: flex-start;
  padding: 1px 8px;
  margin-top: 1px;
  font-size: 11px;
  font-weight: 700;
  color: #4f7d70;
  background: rgba(120, 160, 150, 0.16);
  border-radius: 999px;
}
.shepherd-meeting-port {
  /* ============ 音声幕历史 / 档案媒体回放 ============ */
}
.shepherd-meeting-port .offline-audio-history {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  align-items: end;
}
.shepherd-meeting-port .offline-audio-history-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(3, 9, 14, 0.62);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.shepherd-meeting-port .offline-audio-history-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 660px);
  max-height: 86vh;
  max-height: min(86dvh, 820px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(10, 18, 25, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-bottom: 0;
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -24px 64px rgba(0, 0, 0, 0.32);
}
.shepherd-meeting-port .offline-audio-history-panel > header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.shepherd-meeting-port .offline-audio-history-panel > header > div {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}
.shepherd-meeting-port .offline-audio-history-panel > header strong {
  font-size: 15px;
  font-weight: 680;
}
.shepherd-meeting-port .offline-audio-history-panel > header small,
.shepherd-meeting-port .offline-audio-history-no-voice,
.shepherd-meeting-port .offline-audio-history-empty {
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
}
.shepherd-meeting-port .offline-audio-history-panel > header button {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: inherit;
  background: rgba(255, 255, 255, 0.08);
}
.shepherd-meeting-port .offline-audio-history-panel > header .offline-audio-history-return {
  width: auto;
  min-width: 68px;
  padding: 0 12px 0 8px;
  display: inline-flex;
  gap: 4px;
  border-radius: 999px;
  font-size: 13px;
}
.shepherd-meeting-port .offline-audio-history-return svg {
  width: 17px;
  height: 17px;
}
.shepherd-meeting-port .offline-audio-history-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 16px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 11px;
}
.shepherd-meeting-port .offline-audio-history-actions button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.1);
}
.shepherd-meeting-port .offline-audio-history-actions button:disabled {
  opacity: 0.48;
}
.shepherd-meeting-port .offline-audio-history-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0 12px max(18px, var(--safe-bottom, 0px));
}
.shepherd-meeting-port .offline-audio-history-scene {
  padding: 12px 0 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}
.shepherd-meeting-port .offline-audio-history-scene-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.shepherd-meeting-port .offline-audio-history-scene-head strong {
  font-size: 13px;
}
.shepherd-meeting-port .offline-audio-history-scene-head time {
  color: rgba(255, 255, 255, 0.46);
  font-size: 11px;
}
.shepherd-meeting-port .offline-audio-history-image {
  width: 100%;
  max-height: 260px;
  display: block;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
}
.shepherd-meeting-port .offline-audio-history-image-wrap {
  position: relative;
}
.shepherd-meeting-port .offline-audio-history-image-save {
  position: absolute;
  right: 10px;
  bottom: 10px;
}
.shepherd-meeting-port .offline-audio-history-image img {
  width: 100%;
  max-height: 260px;
  display: block;
  object-fit: cover;
}
.shepherd-meeting-port .offline-audio-history-text {
  padding: 12px 2px 4px;
  font-size: 13px;
  line-height: 1.8;
}
.shepherd-meeting-port .offline-audio-history-text p {
  margin: 0 0 8px;
}
.shepherd-meeting-port .offline-audio-history-complete {
  margin-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.shepherd-meeting-port .offline-audio-history-complete summary {
  display: inline-block;
  max-width: 100%;
  padding: 8px 2px 4px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  cursor: pointer;
}
.shepherd-meeting-port .offline-audio-history-complete pre {
  margin: 4px 0 4px;
  padding: 8px 12px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.04);
  font: inherit;
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.shepherd-meeting-port .offline-audio-history-voices,
.shepherd-meeting-port .oda-round-voices {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}
.shepherd-meeting-port .offline-audio-history-voices label,
.shepherd-meeting-port .oda-round-voices .oda-voice-row {
  display: grid;
  grid-template-columns: minmax(48px, auto) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  font-size: 11px;
}
.shepherd-meeting-port .offline-audio-history-voices audio,
.shepherd-meeting-port .oda-round-voices audio {
  width: 100%;
  min-width: 0;
  height: 34px;
}
.shepherd-meeting-port .oda-round-voices .cached-audio-save {
  grid-column: 2;
  justify-self: end;
  min-height: 44px;
}
.shepherd-meeting-port .offline-audio-history-empty {
  padding: 32px 8px;
  text-align: center;
}
.shepherd-meeting-port .oda-media-summary {
  margin: -4px 0 12px;
  color: var(--text-muted, #897f78);
  font-size: 11px;
  line-height: 1.6;
}
.shepherd-meeting-port .oda-round-image {
  width: 100%;
  max-height: 360px;
  display: block;
  overflow: hidden;
  margin: 8px 0 8px;
  padding: 0;
  border: 1px solid var(--border, rgba(110, 96, 86, 0.16));
  border-radius: 14px;
  background: transparent;
}
.shepherd-meeting-port .oda-round-image img {
  width: 100%;
  max-height: 360px;
  display: block;
  object-fit: cover;
}
.shepherd-meeting-port .oda-round-media-warning {
  margin: 2px 0 8px;
  color: #a16f54;
  font-size: 11px;
}
@media (min-width: 720px) {
  .shepherd-meeting-port .offline-audio-history {
    align-items: center;
    padding: 24px;
  }
  .shepherd-meeting-port .offline-audio-history-panel {
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 28px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .shepherd-meeting-port .offline-audio-history-panel {
    scroll-behavior: auto;
  }
}
.shepherd-meeting-port {
  /* ============ 音声舞台 v2 · 场景优先的平面纸质播放器（最终覆盖层） ============ */
}
.shepherd-meeting-port .offline-session-page.offline-audio-scene {
  --oas-stage-fallback: #958f86;
  --oas-paper-rgb: 248, 246, 240;
  --oas-paper-opacity: 0.92;
  --oas-paper: rgba(var(--oas-paper-rgb), var(--oas-paper-opacity));
  --oas-paper-solid: #f8f6f0;
  --oas-ink: #292621;
  --oas-muted: #746d64;
  --oas-accent: #a57168;
  --oas-accent-foreground: #fffaf4;
  --oas-line: rgba(59, 52, 45, 0.17);
  --oas-on-stage: #fffdf8;
  --oas-choice: rgba(248, 246, 240, 0.9);
  --oas-panel: rgba(248, 246, 240, 0.95);
  --oas-menu: rgba(248, 246, 240, 0.94);
  --oas-field: rgba(255, 255, 255, 0.42);
  --oas-soft-action: rgba(255, 255, 255, 0.28);
  --oas-active: rgba(165, 113, 104, 0.09);
  --oas-hover: rgba(165, 113, 104, 0.07);
  --oas-placeholder: rgba(77, 69, 61, 0.48);
  --oas-surface-border: rgba(255, 255, 255, 0.64);
  --oas-surface-shadow: rgba(36, 29, 23, 0.13);
  --oas-font-family: "Songti SC", "Noto Serif SC", "STSong", serif;
  --oas-font-size: 17px;
  --oas-leading: 1.72;
  position: relative;
  min-height: 100%;
  height: var(--app-height, 100dvh);
  max-height: var(--app-height, 100dvh);
  overflow: hidden;
  color: var(--oas-ink);
  background: var(--oas-stage-fallback);
}
.shepherd-meeting-port .offline-session-page.offline-audio-scene[data-oas-theme=night],
.shepherd-meeting-port :root[data-color-mode=dark] .offline-session-page.offline-audio-scene[data-oas-theme=auto] {
  --oas-stage-fallback: #373432;
  --oas-paper-rgb: 30, 28, 27;
  --oas-paper-solid: #1e1c1b;
  --oas-ink: #f0ebe4;
  --oas-muted: #b9b0a6;
  --oas-accent: #d2a49c;
  --oas-accent-foreground: #211b19;
  --oas-line: rgba(240, 235, 228, 0.18);
  --oas-choice: rgba(34, 31, 30, 0.94);
  --oas-panel: rgba(30, 28, 27, 0.96);
  --oas-menu: rgba(30, 28, 27, 0.95);
  --oas-field: rgba(255, 255, 255, 0.07);
  --oas-soft-action: rgba(255, 255, 255, 0.06);
  --oas-active: rgba(210, 164, 156, 0.13);
  --oas-hover: rgba(210, 164, 156, 0.1);
  --oas-placeholder: rgba(240, 235, 228, 0.45);
  --oas-surface-border: rgba(255, 255, 255, 0.16);
  --oas-surface-shadow: rgba(0, 0, 0, 0.32);
}
.shepherd-meeting-port .offline-session-page.offline-audio-scene > .offline-audio-navbar {
  position: absolute;
  z-index: 12;
  inset: 0 0 auto;
  min-height: calc(44px + var(--safe-top, 0px));
  padding-top: var(--safe-top, 0px);
  border: 0;
  /* 普通线下壁纸会给 navbar 写 transparent !important。音声舞台必须在最终层
     重新压回可见保护带，否则浅色场景图上 iOS 的返回与菜单会一起隐身。 */
  background: linear-gradient(180deg, rgba(22, 18, 15, 0.52) 0%, rgba(22, 18, 15, 0.2) 58%, transparent 100%) !important;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.shepherd-meeting-port .offline-audio-scene > .offline-audio-navbar .navbar-title {
  max-width: min(58vw, 480px);
  overflow: hidden;
  color: var(--oas-on-stage);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.42);
  white-space: nowrap;
}
.shepherd-meeting-port .offline-audio-scene > .offline-audio-navbar .navbar-btn {
  color: var(--oas-on-stage);
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(25, 21, 18, 0.42);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
  filter: drop-shadow(0 1px 7px rgba(0, 0, 0, 0.36));
}
.shepherd-meeting-port .offline-audio-scene .offline-scroll.offline-audio-stage {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: block;
  width: 100%;
  min-height: 100%;
  padding: 0;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(20, 16, 13, 0.04) 52%, rgba(20, 16, 13, 0.2) 100%), var(--offline-audio-scene-image, linear-gradient(155deg, #c6beb3, var(--oas-stage-fallback))) center/cover no-repeat !important;
}
.shepherd-meeting-port .offline-audio-stage-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(21, 17, 14, 0.05), transparent 24%, transparent 76%, rgba(21, 17, 14, 0.05));
}
.shepherd-meeting-port .offline-audio-dialogue {
  position: absolute;
  z-index: 5;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  min-height: 174px;
  margin: 0;
  padding: 16px max(20px, var(--safe-right, 0px) + 16px) calc(10px + var(--safe-bottom, 0px)) max(20px, var(--safe-left, 0px) + 16px);
  border: 0;
  border-top: 1px solid var(--oas-surface-border);
  border-radius: 0;
  color: var(--oas-ink);
  background: var(--oas-paper);
  box-shadow: 0 -8px 28px rgba(36, 29, 23, 0.1);
  -webkit-backdrop-filter: blur(7px) saturate(0.92);
  backdrop-filter: blur(7px) saturate(0.92);
}
.shepherd-meeting-port .offline-audio-nameplate {
  position: relative;
  min-width: 0;
  height: auto;
  padding: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  color: var(--oas-accent);
  background: transparent;
  font-family: var(--oas-font-family);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.12em;
}
.shepherd-meeting-port .offline-audio-nameplate::before {
  content: "";
  width: 22px;
  height: 1px;
  flex: 0 0 auto;
  background: currentColor;
  opacity: 0.55;
}
.shepherd-meeting-port .offline-audio-nameplate span {
  transform: none;
}
.shepherd-meeting-port .offline-audio-nameplate small {
  color: var(--oas-muted);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.04em;
}
.shepherd-meeting-port .offline-audio-dialogue.is-narration .offline-audio-nameplate {
  min-width: 0;
  color: var(--oas-muted);
  background: transparent;
}
.shepherd-meeting-port .offline-audio-dialogue-copy {
  width: 100%;
  min-height: 72px;
  display: block;
  padding: 0 0 12px;
  border: 0;
  color: var(--oas-ink);
  background: transparent;
  font-family: var(--oas-font-family);
  font-size: var(--oas-font-size);
  line-height: var(--oas-leading);
  letter-spacing: 0.035em;
  text-align: left;
  text-shadow: none;
}
.shepherd-meeting-port .offline-audio-dialogue-copy > span,
.shepherd-meeting-port .offline-audio-dialogue-translation {
  display: block;
  white-space: pre-wrap;
}
.shepherd-meeting-port .offline-audio-dialogue-translation {
  margin-top: 4px;
  color: var(--oas-muted);
  font-size: 0.82em;
  line-height: 1.55;
  letter-spacing: 0.02em;
}
.shepherd-meeting-port .offline-audio-dialogue-copy:disabled {
  opacity: 1;
}
.shepherd-meeting-port .offline-audio-dialogue-controls {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  border-top: 1px solid var(--oas-line);
  padding-top: 8px;
}
.shepherd-meeting-port .offline-audio-dialogue-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 2px;
}
.shepherd-meeting-port .offline-audio-dialogue-actions button,
.shepherd-meeting-port .offline-audio-dialogue-nav button,
.shepherd-meeting-port .offline-audio-next {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  color: var(--oas-muted);
  background: transparent;
  font-size: 11px;
  letter-spacing: 0.02em;
}
.shepherd-meeting-port .offline-audio-dialogue-actions button.is-active {
  color: var(--oas-ink);
  background: var(--oas-active);
}
.shepherd-meeting-port .offline-audio-dialogue-actions [data-audio-input-toggle] {
  flex: 0 0 auto;
  color: var(--oas-accent);
  white-space: nowrap;
}
.shepherd-meeting-port .offline-audio-dialogue-actions button:disabled,
.shepherd-meeting-port .offline-audio-dialogue-nav button:disabled {
  opacity: 0.34;
}
.shepherd-meeting-port .offline-audio-dialogue-actions .svg-icon,
.shepherd-meeting-port .offline-audio-dialogue-nav .svg-icon,
.shepherd-meeting-port .offline-audio-next .svg-icon {
  width: 16px;
  height: 16px;
}
.shepherd-meeting-port .offline-audio-dialogue-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-left: auto;
}
.shepherd-meeting-port .offline-audio-progress {
  color: var(--oas-muted);
  min-width: 34px;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}
.shepherd-meeting-port .offline-audio-next {
  width: auto;
  padding: 0 4px 0 8px;
  color: var(--oas-ink);
  background: transparent;
}
.shepherd-meeting-port .offline-audio-next:disabled {
  opacity: 0.28;
}
.shepherd-meeting-port .offline-audio-prev .svg-icon {
  transform: rotate(180deg);
}
.shepherd-meeting-port .offline-session-page.offline-audio-scene > .offline-audio-menu {
  position: absolute;
  z-index: 14;
  top: calc(48px + var(--safe-top, 0px));
  right: max(12px, var(--safe-right, 0px) + 8px);
  bottom: max(10px, var(--safe-bottom, 0px));
  left: auto;
  width: min(224px, 100vw - 24px);
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 4px 12px;
  border: 1px solid var(--oas-surface-border);
  border-radius: 6px;
  background: var(--oas-menu);
  box-shadow: 0 8px 26px var(--oas-surface-shadow);
  -webkit-backdrop-filter: blur(8px) saturate(0.9);
  backdrop-filter: blur(8px) saturate(0.9);
}
.shepherd-meeting-port .offline-audio-menu[hidden],
.shepherd-meeting-port .offline-audio-input[hidden] {
  display: none !important;
}
.shepherd-meeting-port {
  /* 音声舞台不挂载正文长卷；兼容热更前已存在的旧 DOM，避免 display:flex 顶掉 hidden。 */
}
.shepherd-meeting-port .offline-audio-stage > .offline-beats,
.shepherd-meeting-port .offline-audio-stage > .offline-beats[hidden] {
  display: none !important;
}
.shepherd-meeting-port .offline-audio-menu button {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 2px;
  border: 0;
  border-bottom: 1px solid var(--oas-line);
  border-radius: 0;
  color: var(--oas-ink);
  background: transparent;
  font-size: 11px;
  text-align: left;
}
.shepherd-meeting-port .offline-audio-menu button:hover,
.shepherd-meeting-port .offline-audio-menu button:active {
  background: var(--oas-hover);
}
.shepherd-meeting-port .offline-audio-menu button:last-of-type {
  border-bottom: 0;
}
.shepherd-meeting-port .offline-audio-menu .svg-icon {
  width: 17px;
  height: 17px;
  color: var(--oas-accent);
}
.shepherd-meeting-port .offline-audio-scene > .offline-options {
  position: absolute;
  z-index: 9;
  inset: 0;
  width: auto;
  margin: 0;
  padding: calc(62px + var(--safe-top, 0px)) 18px calc(192px + var(--safe-bottom, 0px));
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(180deg, transparent 4%, rgba(23, 18, 15, 0.08) 48%, transparent 96%);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  pointer-events: none;
}
.shepherd-meeting-port .offline-audio-scene > .offline-options > * {
  pointer-events: auto;
}
.shepherd-meeting-port .offline-audio-scene > .offline-options[hidden] {
  display: none;
}
.shepherd-meeting-port .offline-audio-choices {
  width: min(520px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.shepherd-meeting-port .offline-audio-choices > span {
  margin-bottom: 2px;
  color: rgba(255, 253, 248, 0.9);
  font-family: var(--oas-font-family);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-align: center;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.62);
}
.shepherd-meeting-port .offline-audio-scene .offline-audio-choices .offline-option-chip {
  width: 89%;
  min-height: 48px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 0;
  border-left: 2px solid var(--oas-accent);
  border-radius: 2px;
  color: var(--oas-ink);
  background: var(--oas-choice);
  box-shadow: 0 2px 8px var(--oas-surface-shadow);
  -webkit-backdrop-filter: blur(5px) saturate(0.9);
  backdrop-filter: blur(5px) saturate(0.9);
  font-family: var(--oas-font-family);
  text-align: left;
}
.shepherd-meeting-port .offline-audio-scene .offline-audio-choices .offline-option-chip:nth-of-type(1) {
  width: 91%;
  margin-right: 6%;
}
.shepherd-meeting-port .offline-audio-scene .offline-audio-choices .offline-option-chip:nth-of-type(2) {
  width: 84%;
  margin-left: 8%;
}
.shepherd-meeting-port .offline-audio-scene .offline-audio-choices .offline-option-chip:nth-of-type(3) {
  width: 94%;
  margin-right: 1%;
}
.shepherd-meeting-port .offline-audio-scene .offline-audio-choices .offline-option-chip:nth-of-type(4) {
  width: 82%;
  margin-left: 5%;
}
.shepherd-meeting-port .offline-audio-scene .offline-audio-choices .offline-option-chip b {
  width: auto;
  height: auto;
  display: block;
  border: 0;
  border-radius: 0;
  color: var(--oas-accent);
  background: transparent;
  font-family: Georgia, serif;
  font-size: 13px;
  font-weight: 400;
}
.shepherd-meeting-port .offline-audio-custom-choice {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  justify-self: center;
  margin-top: 4px;
  padding: 0 8px;
  border: 0;
  border-bottom: 1px solid rgba(255, 253, 248, 0.5);
  color: var(--oas-on-stage);
  background: rgba(25, 20, 17, 0.08);
  font-size: 11px;
  text-shadow: 0 1px 7px rgba(0, 0, 0, 0.58);
}
.shepherd-meeting-port .offline-audio-input {
  position: absolute;
  z-index: 11;
  right: max(14px, var(--safe-right, 0px) + 10px);
  bottom: calc(190px + var(--safe-bottom, 0px));
  left: max(14px, var(--safe-left, 0px) + 10px);
  width: min(680px, 100% - 28px);
  margin-inline: auto;
  padding: 12px 12px 12px;
  border: 1px solid var(--oas-surface-border);
  border-radius: 6px;
  color: var(--oas-ink);
  background: var(--oas-panel);
  box-shadow: 0 7px 22px var(--oas-surface-shadow);
}
.shepherd-meeting-port .offline-audio-input > header {
  min-height: 28px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.shepherd-meeting-port .offline-audio-input > header label {
  display: block;
  margin: 0 0 8px;
  color: var(--oas-muted);
  font-size: 11px;
  letter-spacing: 0.08em;
}
.shepherd-meeting-port .offline-audio-input > header button {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  color: var(--oas-muted);
  background: transparent;
}
.shepherd-meeting-port .offline-audio-input > header .svg-icon {
  width: 15px;
  height: 15px;
}
.shepherd-meeting-port .offline-audio-input > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px 38px 42px;
  align-items: end;
  gap: 4px;
}
.shepherd-meeting-port .offline-audio-input .offline-directive {
  min-height: 68px;
  max-height: 132px;
  resize: none;
  border: 1px solid var(--oas-line);
  border-radius: 6px;
  color: var(--oas-ink);
  background: var(--oas-field);
  font-family: var(--oas-font-family);
}
.shepherd-meeting-port .offline-audio-input .offline-directive::placeholder {
  color: var(--oas-placeholder);
}
.shepherd-meeting-port .offline-audio-input .offline-expand,
.shepherd-meeting-port .offline-audio-input .offline-directive-clear,
.shepherd-meeting-port .offline-audio-input .offline-advance {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--oas-line);
  border-radius: 6px;
  color: var(--oas-ink);
  background: var(--oas-soft-action);
}
.shepherd-meeting-port .offline-audio-input .offline-advance {
  width: 42px;
  color: var(--oas-accent-foreground);
  background: var(--oas-accent);
}
.shepherd-meeting-port .offline-audio-input #offline-generation-action.offline-stop-primary {
  width: auto !important;
  min-width: 62px !important;
  padding: 0 12px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  border-color: var(--oas-line) !important;
  border-radius: 6px !important;
  background: var(--oas-accent) !important;
  color: var(--oas-accent-foreground) !important;
}
.shepherd-meeting-port .offline-audio-scene button:focus-visible,
.shepherd-meeting-port .offline-audio-scene textarea:focus-visible {
  outline: 2px solid #b77669;
  outline-offset: 2px;
}
.shepherd-meeting-port .offline-audio-scene .offline-audio-choices .offline-option-chip:focus-visible {
  outline-color: #b77669;
}
.shepherd-meeting-port .offline-audio-scene[data-audio-layout=landscape] .offline-scroll.offline-audio-stage {
  background-position: center 42% !important;
}
@media (max-width: 520px) {
  .shepherd-meeting-port .offline-audio-dialogue {
    min-height: 182px;
    padding: 16px 12px calc(8px + var(--safe-bottom, 0px));
  }
  .shepherd-meeting-port .offline-audio-dialogue-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 4px;
  }
  .shepherd-meeting-port .offline-audio-dialogue-actions,
  .shepherd-meeting-port .offline-audio-dialogue-nav {
    width: 100%;
  }
  .shepherd-meeting-port .offline-audio-dialogue-actions {
    justify-content: flex-start;
  }
  .shepherd-meeting-port .offline-audio-dialogue-nav {
    justify-content: space-between;
    margin-left: 0;
  }
  .shepherd-meeting-port {
    /* 重 roll 在右上角菜单仍有完整入口；窄屏优先保证“写回应”和播放导航常驻。 */
  }
  .shepherd-meeting-port .offline-audio-dialogue-actions [data-audio-reroll] {
    display: none;
  }
  .shepherd-meeting-port .offline-audio-dialogue-actions button,
  .shepherd-meeting-port .offline-audio-dialogue-nav button {
    gap: 4px;
    padding-inline: 4px;
    font-size: 11px;
  }
  .shepherd-meeting-port .offline-audio-dialogue-nav {
    gap: 2px;
  }
  .shepherd-meeting-port .offline-audio-scene > .offline-options {
    padding: calc(58px + var(--safe-top, 0px)) 10px calc(204px + var(--safe-bottom, 0px));
  }
  .shepherd-meeting-port .offline-audio-input {
    bottom: calc(196px + var(--safe-bottom, 0px));
  }
}
@media (orientation: landscape) and (max-height: 560px) {
  .shepherd-meeting-port .offline-audio-dialogue {
    right: max(14px, var(--safe-right, 0px) + 10px);
    bottom: max(12px, var(--safe-bottom, 0px) + 8px);
    left: max(14px, var(--safe-left, 0px) + 10px);
    width: auto;
    min-height: 0;
    max-height: calc(100% - max(72px, var(--safe-top, 0px) + 60px));
    padding: 12px 12px 8px;
    border: 1px solid var(--oas-surface-border);
    border-radius: 6px;
    box-shadow: 0 8px 28px rgba(36, 29, 23, 0.16);
    overflow: hidden;
  }
  .shepherd-meeting-port .offline-audio-nameplate {
    padding-bottom: 4px;
  }
  .shepherd-meeting-port .offline-audio-dialogue-copy {
    min-height: 0;
    max-height: min(20vh, 88px);
    padding-bottom: 8px;
    overflow-x: hidden;
    overflow-y: auto;
    font-size: var(--oas-font-size);
    line-height: 1.58;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .shepherd-meeting-port .offline-audio-dialogue-controls {
    min-height: 32px;
    flex-wrap: nowrap;
    gap: 4px;
    padding-top: 4px;
  }
  .shepherd-meeting-port .offline-audio-dialogue-actions,
  .shepherd-meeting-port .offline-audio-dialogue-nav {
    flex-wrap: nowrap;
    gap: 1px;
  }
  .shepherd-meeting-port .offline-audio-dialogue-actions button,
  .shepherd-meeting-port .offline-audio-dialogue-nav button {
    min-height: 30px;
    padding-inline: 4px;
  }
  .shepherd-meeting-port .offline-audio-scene > .offline-options {
    padding: calc(54px + var(--safe-top, 0px)) 18px calc(154px + var(--safe-bottom, 0px));
  }
  .shepherd-meeting-port .offline-audio-input {
    right: max(18px, var(--safe-right, 0px) + 12px);
    bottom: calc(164px + var(--safe-bottom, 0px));
    left: max(18px, var(--safe-left, 0px) + 12px);
    width: min(680px, 100% - 36px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .shepherd-meeting-port .offline-audio-dialogue,
  .shepherd-meeting-port .offline-audio-choices,
  .shepherd-meeting-port .offline-audio-menu {
    animation: none !important;
    transition: none !important;
  }
}
.shepherd-meeting-port {
  /* A quiet, temporary status after the current AU/convergence narration. */
}
.shepherd-meeting-port .au-session-scroll > .au-generation-status {
  margin: 8px 0 12px;
  color: var(--cv-muted, var(--os-muted, var(--text-muted)));
  font-family: inherit;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.shepherd-meeting-port .au-session-scroll > .au-generation-status[hidden] {
  display: none;
}
.shepherd-meeting-port {
  /* Loading blocks ordinary submit buttons; this control must still stop its run. */
}
.shepherd-meeting-port #offline-generation-action.offline-stop-primary:not(:disabled) {
  pointer-events: auto;
}
.shepherd-meeting-port .au-theater-page .au-beat-media-status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 12px;
  color: var(--cv-muted, var(--os-muted, var(--text-muted)));
  font-family: inherit;
  font-size: 13px;
  line-height: 1.6;
}
.shepherd-meeting-port .au-theater-page .au-beat-media-status[hidden] {
  display: none;
}
.shepherd-meeting-port .au-theater-page .au-beat-media-status > button {
  min-height: 36px;
  padding: 4px 0;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.shepherd-meeting-port .au-theater-page .au-beat-media-status > button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}
.shepherd-meeting-port .narration-search-overlay {
  position: absolute;
  inset: 0;
  z-index: 1900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, var(--safe-top, 0px)) 16px max(16px, var(--safe-bottom, 0px));
  background: rgba(0, 0, 0, 0.28);
}
.shepherd-meeting-port .narration-search-sheet {
  width: min(100%, 520px);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  padding: 16px;
  border-radius: 20px;
  background: var(--os-paper, var(--bg-sheet));
  color: var(--os-ink, var(--text));
  font-family: var(--os-sans, sans-serif);
}
.shepherd-meeting-port .narration-search-sheet header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.shepherd-meeting-port .narration-search-sheet h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
}
.shepherd-meeting-port .narration-search-sheet form {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.shepherd-meeting-port .narration-search-sheet input {
  flex: 1;
  min-width: 0;
}
.shepherd-meeting-port .narration-search-sheet [role=status] {
  margin: 12px 0;
  color: var(--os-muted, var(--text-secondary));
  font-size: 13px;
}
.shepherd-meeting-port .narration-search-results {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.shepherd-meeting-port .narration-search-result {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 12px 0;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--os-line, var(--border));
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.shepherd-meeting-port .narration-search-result strong {
  font-size: 13px;
  color: var(--os-muted, var(--text-secondary));
}
.shepherd-meeting-port .narration-search-result span {
  font-size: 15px;
  line-height: 1.6;
}
.shepherd-meeting-port .narration-search-sheet :focus-visible {
  outline: 2px solid var(--os-accent, var(--text));
  outline-offset: 2px;
}

/* original-port.css */
@layer app {
.shepherd-meeting-port {flex:1 1 auto;min-height:0;display:flex;flex-direction:column;position:relative;overflow:hidden;--safe-top:var(--airp-safe-top);--safe-bottom:var(--airp-safe-bottom);--app-height:var(--airp-app-height);--navbar-h:var(--airp-navbar-h);--ink-brown:var(--airp-text);--ink-soft:var(--airp-text-2);--accent-orange:var(--airp-accent);--border-color:var(--airp-border);--bg-card:var(--airp-surface);--font-lg:var(--airp-text-lg);--font-family:var(--airp-font);--font-sm:var(--airp-text-sm);--font-xs:var(--airp-text-xs);--font-md:var(--airp-text-md);--text:var(--airp-text);--text-secondary:var(--airp-text-2);--text-hint:var(--airp-text-3);--border:var(--airp-border);--bg-sheet:var(--airp-surface);--bg-main:var(--airp-bg);--primary:var(--airp-accent);--radius-xl:var(--airp-radius-lg);--radius-lg:var(--airp-radius-md);--radius-md:var(--airp-radius-sm);--radius-sm:var(--airp-radius-xs);--font-serif:Georgia,'Noto Serif SC',serif;--font-sans:var(--airp-font);}
.shepherd-meeting-port > .offline-page {flex:1;min-height:0;}
.shepherd-meeting-port .original-modal-host {position:absolute;inset:0;z-index:600;pointer-events:none;}
.shepherd-meeting-port .original-modal-host.active {pointer-events:auto;}
.shepherd-meeting-port .original-modal-host .modal-sheet {background:var(--airp-surface);width:100%;max-height:90%;overflow:auto;padding:16px;}
.shepherd-meeting-port .original-modal-host textarea {width:100%;}
.shepherd-meeting-port .offline-settings-sheet-panel {background:var(--airp-surface);}
.shepherd-meeting-port svg {width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:1.8;}
.shepherd-meeting-port .offline-option {border:1px solid var(--airp-border);padding:8px 12px;background:var(--airp-surface);border-radius:10px;color:inherit;}
.shepherd-meeting-port button:disabled {opacity:.45;}
}[data-os-theme~="paper"] .offline-version-pager {display:flex;align-items:center;gap:4px;flex:none;margin:0;color:var(--os-ink-3);font:11px/1.5 var(--os-sans);font-variant-numeric:tabular-nums}[data-os-theme~="paper"] .offline-version-pager button {background:none;border:0;color:inherit;font-size:15px;line-height:1;width:22px;height:22px;padding:0;border-radius:50%;display:grid;place-items:center}[data-os-theme~="paper"] .offline-version-pager button:disabled {opacity:.25}[data-os-theme~="paper"] .offline-version-pager span {min-width:2ch;text-align:center}

@layer app{.shepherd-meeting-port [data-os-theme~="paper"] .offline-settings-sheet-panel {background:var(--airp-bg);color:var(--airp-text);border-radius:28px 28px 0 0;max-height:90%;}.shepherd-meeting-port [data-os-theme~="paper"] .offline-settings-sheet-head {padding:16px 20px;border-bottom:1px solid var(--airp-border);background:var(--airp-surface);}.shepherd-meeting-port [data-os-theme~="paper"] .offline-settings-sheet-head h2 {font:600 15px/1.5 var(--airp-font)}.shepherd-meeting-port [data-os-theme~="paper"] .offline-settings-sheet-body {padding:16px 16px 24px;display:grid;gap:12px;}.shepherd-meeting-port [data-os-theme~="paper"] .scene-settings-card {border:1px solid var(--airp-border);border-radius:14px;background:var(--airp-surface);overflow:hidden;margin:0 0 12px;}.shepherd-meeting-port [data-os-theme~="paper"] .scene-settings-card>summary {padding:16px 16px;font:600 13px/1.6 var(--airp-font);cursor:pointer;}.shepherd-meeting-port [data-os-theme~="paper"] .scene-settings-content {padding:0 16px 16px;display:grid;gap:16px;}.shepherd-meeting-port [data-os-theme~="paper"] .scene-setting-field {display:grid;gap:8px;font:13px/1.6 var(--airp-font);color:var(--airp-text-2);}.shepherd-meeting-port [data-os-theme~="paper"] .scene-setting-field input {width:100%;font:13px/1.6 var(--airp-font);border:1px solid var(--airp-border);background:var(--airp-surface-2,var(--airp-surface));border-radius:10px;min-height:44px;padding:8px 8px;}.shepherd-meeting-port [data-os-theme~="paper"] .scene-setting-row {display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:44px;border-top:1px solid var(--airp-border);font:13px/1.65 var(--airp-font);}.shepherd-meeting-port [data-os-theme~="paper"] .scene-word-range {display:grid;grid-template-columns:1fr 1fr;gap:12px;}.shepherd-meeting-port [data-os-theme~="paper"] .scene-settings-card .off-seg {display:flex;flex-wrap:wrap;gap:4px;}.shepherd-meeting-port [data-os-theme~="paper"] .scene-settings-card .off-seg-btn {flex:1;white-space:normal;font:11px/1.6 var(--airp-font);padding:8px;border:1px solid var(--airp-border);border-radius:10px;background:var(--airp-surface-2,var(--airp-surface));color:var(--airp-text-2);min-height:44px;}.shepherd-meeting-port [data-os-theme~="paper"] .scene-settings-card .off-seg-btn.is-active {border-color:#a99dac;background:color-mix(in srgb,#71627b 12%,var(--airp-surface));color:var(--airp-text);}.shepherd-meeting-port [data-os-theme~="paper"] .scene-memory-note {display:grid;gap:4px;font:11px/1.7 var(--airp-font);color:var(--airp-text-3);padding:2px 4px 8px;}.shepherd-meeting-port [data-os-theme~="paper"] .scene-memory-note button {padding:8px 0;background:none;border:0;text-align:left;color:#71627b;font:inherit;}.shepherd-meeting-port [data-os-theme~="paper"] [data-native-settings-save] {border-radius:10px;padding:8px 16px;min-height:44px;font:13px/1.5 var(--airp-font);background:#71627b;border:1px solid #71627b;color:#fff;}.shepherd-meeting-port [data-os-theme~="paper"] .scene-settings-content .off-preset-actions {display:flex;flex-wrap:wrap;gap:8px;}.shepherd-meeting-port [data-os-theme~="paper"] .scene-settings-content .off-preset-actions button {font:11px/1.5 var(--airp-font);padding:8px 8px;min-height:33px;}
}

@layer app{.shepherd-meeting-port [data-os-theme~="paper"] .offline-settings-sheet-panel {display:flex;flex-direction:column;overflow:hidden;min-height:0}.shepherd-meeting-port [data-os-theme~="paper"] .offline-settings-sheet-head {flex:none}.shepherd-meeting-port [data-os-theme~="paper"] .offline-settings-sheet-body {display:block;flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain}.shepherd-meeting-port [data-os-theme~="paper"] .scene-settings-card {height:auto!important;max-height:none!important;flex-shrink:0;overflow:visible}.shepherd-meeting-port [data-os-theme~="paper"] .scene-settings-content {height:auto!important;max-height:none!important;overflow:visible}
}.scene-memory-overlay {position:absolute;inset:0;z-index:800;display:flex;align-items:flex-end}.scene-memory-backdrop {position:absolute;inset:0;background:#0005;border:0}.scene-memory-sheet {position:relative;width:100%;height:92%;display:flex;flex-direction:column;background:var(--airp-bg);border-radius:28px 28px 0 0;overflow:hidden;box-shadow:0 -8px 40px #0002;animation:memory-rise .2s ease-out}.scene-memory-handle {height:4px;width:38px;background:var(--airp-border);border-radius:6px;margin:12px auto 4px;flex:none}.scene-memory-sheet .memory-app {flex:1;min-height:0;height:auto}.scene-memory-sheet .memory-app>header {flex:none}@keyframes memory-rise{from{transform:translateY(100%)}to{transform:translateY(0)}}/* Common settings: direct choices, small help, no nested settings pages. */
.offline-page[data-os-theme~="paper"] .scene-common-field {padding:16px 0;border-bottom:1px solid var(--offline-line,#e9e4ef)}.offline-page[data-os-theme~="paper"] .scene-common-title {display:flex;align-items:center;gap:4px;font-size:15px;font-weight:600;position:relative;flex-wrap:wrap;margin-bottom:8px}.offline-page[data-os-theme~="paper"] .scene-common-title .scene-help-text {flex-basis:100%;font-weight:400}.offline-page[data-os-theme~="paper"] .scene-help {border:1px solid currentColor;background:transparent;color:var(--offline-muted,#8a7e94);width:18px;height:18px;border-radius:50%;font-size:13px;padding:0;position:relative;margin:8px 12px}.offline-page[data-os-theme~="paper"] .scene-help:before {content:'';position:absolute;inset:-12px}.offline-page[data-os-theme~="paper"] .scene-help-text,.offline-page[data-os-theme~="paper"] .scene-length-hint {font-size:13px;color:var(--offline-muted,#8a7e94);line-height:1.65;margin:8px 0}.offline-page[data-os-theme~="paper"] .scene-common-settings .off-seg {display:flex;flex-wrap:wrap;gap:8px;background:transparent;padding:0;border:0}.offline-page[data-os-theme~="paper"] .scene-common-settings .off-seg-btn {flex:0 1 auto;border:1px solid transparent;border-radius:14px;padding:8px 12px;min-height:44px;background:transparent;color:inherit;font-size:15px;white-space:normal}.offline-page[data-os-theme~="paper"] .scene-common-settings .off-seg-btn.is-active {border-color:currentColor;background:var(--offline-card,#f3eef8);color:var(--offline-accent,#79568e)}.offline-page[data-os-theme~="paper"] .scene-option-head {display:flex;align-items:center;justify-content:space-between;gap:12px}.offline-page[data-os-theme~="paper"] .scene-option-head>button {border:0;background:transparent;color:inherit;padding:8px 0;font-size:15px;min-height:44px}.offline-page[data-os-theme~="paper"] .scene-option-switch {display:grid;place-items:center;min-width:44px;min-height:44px}.offline-page[data-os-theme~="paper"] .scene-option-switch input {width:21px;height:21px;accent-color:#805da4}[data-os-theme~="paper"] .scene-sr-only {position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.offline-page/* 行动选项：折叠时输入框上方右侧小药丸；展开时纸面统一色、一次可见免滑动 */
.shepherd-meeting-port .offline-session-page[data-os-theme~="paper"] .offline-options {
  display: none;
  max-height: none;
  padding: 0;
  background: transparent;
  flex: none;
}.shepherd-meeting-port .offline-session-page[data-os-theme~="paper"] .offline-options:not([hidden]) {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  padding: 0 8px;
}.shepherd-meeting-port .offline-session-page[data-os-theme~="paper"] .offline-options-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  padding: 2px 8px;
  border: 1px solid var(--os-line);
  border-radius: 999px;
  background: var(--os-accent-soft);
  color: var(--os-accent);
  font-size: 11px;
  letter-spacing: 0.06em;
  cursor: pointer;
  line-height: 1;
}.shepherd-meeting-port .offline-session-page[data-os-theme~="paper"] .offline-options-pill span {
  font-size: 11px;
  line-height: 1;
}/* 通用轻浮起容器：任何需要与页面背景拉开层次的内容块直接套用 */
.shepherd-meeting-port .offline-session-page[data-os-theme~="paper"] .os-elevated {
  border: 1px solid var(--os-line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--os-accent) 4%, var(--os-paper));
  box-shadow: 0 1px 3px rgba(192, 90, 106, 0.05);
}.shepherd-meeting-port .offline-session-page[data-os-theme~="paper"] .offline-options-list {
  align-self: stretch;
  display: grid;
  gap: 4px;
  max-height: none;
  overflow: visible;
  padding: 8px 8px;
}.shepherd-meeting-port .offline-session-page[data-os-theme~="paper"] .offline-option {
  width: 100%;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.6;
  padding: 8px 12px;
  border: 1px solid var(--os-line);
  border-radius: 10px;
  background: var(--os-paper);
  color: var(--os-ink);
  font-size: 13px;
  flex: none;
}.shepherd-meeting-port .offline-session-page[data-os-theme~="paper"] .offline-option:active {
  background: var(--os-accent-soft);
  border-color: var(--os-accent);
}/* 预置篇幅档位时隐藏手动字数输入框（避免 display:grid 覆盖 hidden） */.scene-word-range[hidden],.offline-page .scene-word-range[hidden],[data-os-theme~="paper"] .scene-word-range[hidden]{display:none!important}/* 推进中的加载提示：线稿小狗在纸面上来回走动（生成/重 roll 复用，纯 SVG+CSS） */
[data-os-theme~="paper"] .offline-advancing {display:flex;align-items:center;gap:12px;margin:8px 12px 2px;color:var(--offline-muted,#8a7e94);font-size:13px}[data-os-theme~="paper"] .offline-advancing-text {white-space:nowrap;flex:none}/* 补存失败逃生舱：丢弃按钮 */
.offline-page[data-os-theme~="paper"] .offline-discard {color:#b3382e!important;border-color:#b3382e!important}/* 新建见面：选角色 */
[data-os-theme~="paper"] .offline-pick-list {display:grid;gap:8px;padding:16px}[data-os-theme~="paper"] .offline-pick-row {display:flex;align-items:center;gap:8px;width:100%;text-align:left;min-height:52px;padding:8px 12px;border:1px solid var(--offline-line,#e9e4ef);border-radius:14px;background:var(--offline-card,#f3eef8);color:inherit;font-size:15px}[data-os-theme~="paper"] .offline-pick-empty {padding:16px 12px;font-size:13px;color:var(--offline-muted,#8a7e94);text-align:center}/* ============================================================
   P4 · 线下见面通用皮：暖粉米纸 + 玫粉复古（全角色通用，无剧情插画）
   纯 CSS 装饰：纸纹 / 点线分隔 / 光晕，不放任何生成图片。
   ============================================================ */
.shepherd-meeting-port .offline-session-page[data-os-theme~="paper"] {
  --os-paper: #F5EBE6;
  --os-ink: #43342C;
  --os-ink-2: #9A8B80;
  --os-ink-3: rgba(67, 52, 44, 0.42);
  --os-line: rgba(192, 90, 106, 0.14);
  --os-accent: #C05A6A;
  --os-accent-soft: rgba(192, 90, 106, 0.1);
  --os-btn: #C05A6A;
  --os-btn-ink: #FFF9F4;
  --os-serif: Georgia, "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", serif;
  --os-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --os-body-size: 14px;
  --os-leading: 1.9;
  --os-measure: 36em;
  --surface: #FBF3EF;
  --surface-card: #FBF3EF;
  --bg-card: #FBF3EF;
  --shadow-paper: 0 1px 2px rgba(192, 90, 106, 0.05);
  background-image:
    repeating-linear-gradient(0deg, rgba(192, 90, 106, 0.02) 0 1px, transparent 1px 27px),
    repeating-linear-gradient(90deg, rgba(192, 90, 106, 0.015) 0 1px, transparent 1px 35px);
}.shepherd-meeting-port .offline-session-page[data-os-theme~="paper"] .navbar-title {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.05em;
}/* 顶栏收窄：低饱和纸面顶栏，不再保留大留白 */
.shepherd-meeting-port .offline-session-page[data-os-theme~="paper"].offline-page:not(.offline-audio-scene):not(.room-encounter-page) > .navbar {
  min-height: calc(44px + var(--safe-top, 0px));
  padding-top: calc(2px + var(--safe-top, 0px));
  padding-bottom: 2px;
}/* 正文：真宋体衬线散文流，14px/1.9，每段首行缩进 2 字、两端对齐；对白整句玫粉 */
.shepherd-meeting-port .offline-session-page[data-os-theme~="paper"] .offline-beat--narration p {
  text-indent: 2em;
  text-align: justify;
  letter-spacing: 0.01em;
}.shepherd-meeting-port .offline-session-page[data-os-theme~="paper"] .offline-beat--narration > p:first-of-type {
  text-indent: 2em;
}.shepherd-meeting-port .offline-session-page[data-os-theme~="paper"] .offline-beat--narration > p:first-of-type::first-letter {
  float: none;
  font-size: inherit;
  line-height: inherit;
  padding: 0;
  font-weight: inherit;
  color: inherit;
}.shepherd-meeting-port .offline-session-page[data-os-theme~="paper"] .offline-beat--narration .os-dialogue,.shepherd-meeting-port .offline-session-page[data-os-theme~="paper"] .os-beat-multiline .os-dialogue {
  color: var(--os-accent);
  font-style: normal;
}/* 行内标记：模型按酒馆习惯输出的粗体 / 斜体 / 删除线 / 分隔线 */
.shepherd-meeting-port .offline-beat--narration strong,.shepherd-meeting-port .os-beat-multiline strong {
  font-weight: 600;
}.shepherd-meeting-port .offline-beat--narration em.os-md-em,.shepherd-meeting-port .os-beat-multiline em.os-md-em {
  font-style: italic;
}/* 朱丝栏逐字节点默认把斜体压平，强调区域要显式恢复 */
.shepherd-meeting-port [data-os-theme~="dog"] em.os-md-em .os-zc {
  font-style: italic;
}.shepherd-meeting-port .offline-beat--narration del,.shepherd-meeting-port .os-beat-multiline del {
  text-decoration: line-through;
  opacity: 0.68;
}.shepherd-meeting-port .offline-beat--narration hr.os-md-rule {
  width: 38%;
  height: 0;
  margin: 1.1em auto;
  border: 0;
  border-top: 1px solid currentColor;
  opacity: 0.28;
}/* 幕头接管叙事分段标记，原先的菱形针脚让位 */
.shepherd-meeting-port .offline-session-page[data-os-theme~="paper"] .offline-beat--narration::before {
  content: none;
}/* 空状态：凋零花瓣缓缓飘落 + 两行文案（纯 CSS，无图片依赖） */
.shepherd-meeting-port [data-os-theme~="paper"] .offline-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 32px 12px 24px;
  color: var(--os-ink-2);
}.shepherd-meeting-port [data-os-theme~="paper"] .offline-petals {
  position: relative;
  width: 110px;
  height: 62px;
  margin: 2px auto 16px;
}.shepherd-meeting-port [data-os-theme~="paper"] .offline-petals i {
  position: absolute;
  top: 0;
  left: 50%;
  width: 9px;
  height: 12px;
  background: linear-gradient(150deg, #E7AFB9 0%, #C97484 100%);
  border-radius: 100% 12% 100% 12%;
  opacity: 0;
  animation: os-petal-fall 4.4s ease-in-out infinite;
}.shepherd-meeting-port [data-os-theme~="paper"] .offline-petals i:nth-child(1) { margin-left: -34px; animation-delay: 0s; }.shepherd-meeting-port [data-os-theme~="paper"] .offline-petals i:nth-child(2) { margin-left: -10px; animation-delay: 1.1s; animation-duration: 5s; }.shepherd-meeting-port [data-os-theme~="paper"] .offline-petals i:nth-child(3) { margin-left: 8px; animation-delay: 2.2s; }.shepherd-meeting-port [data-os-theme~="paper"] .offline-petals i:nth-child(4) { margin-left: 24px; animation-delay: 0.6s; animation-duration: 4.8s; }.shepherd-meeting-port [data-os-theme~="paper"] .offline-petals i:nth-child(5) { margin-left: -22px; animation-delay: 3.1s; animation-duration: 5.4s; }
@keyframes os-petal-fall {
  0%   { transform: translate3d(0, -4px, 0) rotate(0deg); opacity: 0; }
  14%  { opacity: 0.95; }
  55%  { transform: translate3d(9px, 26px, 0) rotate(150deg); }
  100% { transform: translate3d(-5px, 54px, 0) rotate(320deg); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {.shepherd-meeting-port [data-os-theme~="paper"] .offline-petals i {
    animation: none;
    opacity: 0.8;
  }
}.shepherd-meeting-port [data-os-theme~="paper"] .offline-empty-title {
  margin: 0;
  font: 600 15px/1.7 var(--os-sans);
  color: var(--os-ink);
}.shepherd-meeting-port [data-os-theme~="paper"] .offline-empty-hint {
  margin: 4px 0 0;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--os-ink-2);
}/* 补存失败逃生舱：独立于空状态的卡片条 */
.shepherd-meeting-port [data-os-theme~="paper"] .offline-rescue {
  display: block;
  margin: 4px auto 8px;
  padding: 12px 12px;
  width: 100%;
  max-width: var(--os-measure);
  background: var(--os-accent-soft);
  border: 1px solid var(--os-line);
  border-radius: 14px;
  font-size: 13px;
  color: var(--os-ink-2);
}.shepherd-meeting-port [data-os-theme~="paper"] .offline-rescue-title {
  margin: 0 0 4px;
  font-size: 13px;
  color: var(--os-ink);
}.shepherd-meeting-port [data-os-theme~="paper"] .offline-rescue-text {
  margin: 0 0 8px;
  max-height: 120px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--os-serif);
  font-size: 13px;
  line-height: 1.7;
  color: var(--os-ink-2);
}.shepherd-meeting-port [data-os-theme~="paper"] .offline-rescue-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}.shepherd-meeting-port [data-os-theme~="paper"] .offline-rescue .btn {
  min-height: 34px;
  padding: 4px 12px;
  font-size: 13px;
}.shepherd-meeting-port [data-os-theme~="paper"] .offline-rescue .offline-discard {
  color: #B3382E !important;
  border-color: #B3382E !important;
}/* 书写中：线稿小狗在纸面上来回走动（纯 SVG + CSS，无图片依赖） */
.shepherd-meeting-port [data-os-theme~="paper"] .offline-advancing {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 2px 0 8px;
  color: var(--os-ink-2);
}.shepherd-meeting-port [data-os-theme~="paper"] .offline-advancing-text {
  font: italic 13px/1.6 var(--os-serif);
  letter-spacing: 0.14em;
}.shepherd-meeting-port [data-os-theme~="paper"] .os-dog-track {
  position: relative;
  width: 148px;
  height: 40px;
  overflow: hidden;
}.shepherd-meeting-port [data-os-theme~="paper"] .os-dog-track::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 5px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(192, 90, 106, 0.3) 20% 80%, transparent);
}.shepherd-meeting-port [data-os-theme~="paper"] .os-dog-walk {
  position: absolute;
  bottom: 6px;
  left: 6px;
  animation: os-dog-go 6.5s ease-in-out infinite;
  will-change: transform;
}.shepherd-meeting-port [data-os-theme~="paper"] .os-dog {
  display: block;
  width: 40px;
  height: auto;
  fill: none;
  stroke: var(--os-accent, #C05A6A);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: os-dog-bob 0.3s ease-in-out infinite alternate;
}.shepherd-meeting-port [data-os-theme~="paper"] .os-dog-body,.shepherd-meeting-port [data-os-theme~="paper"] .os-dog-face,.shepherd-meeting-port [data-os-theme~="paper"] .os-dog-snout {
  fill: var(--surface, #FBF3EF);
}.shepherd-meeting-port [data-os-theme~="paper"] .os-dog-ear {
  fill: rgba(192, 90, 106, 0.16);
  stroke: none;
}.shepherd-meeting-port [data-os-theme~="paper"] .os-dog-nose,.shepherd-meeting-port [data-os-theme~="paper"] .os-dog-eye {
  fill: var(--os-accent, #C05A6A);
  stroke: none;
}.shepherd-meeting-port [data-os-theme~="paper"] .os-dog-tail {
  transform-box: fill-box;
  transform-origin: 100% 100%;
  animation: os-dog-tail 0.5s ease-in-out infinite alternate;
}.shepherd-meeting-port [data-os-theme~="paper"] .os-dog-leg {
  transform-box: fill-box;
  transform-origin: 50% 0%;
  animation: os-dog-leg 0.3s ease-in-out infinite alternate;
}.shepherd-meeting-port [data-os-theme~="paper"] .os-dog-leg--2,.shepherd-meeting-port [data-os-theme~="paper"] .os-dog-leg--3 {
  animation-delay: -0.15s;
}
@keyframes os-dog-go {
  0%   { transform: translateX(0); }
  42%  { transform: translateX(102px); }
  50%  { transform: translateX(102px) scaleX(-1); }
  92%  { transform: translateX(0) scaleX(-1); }
  100% { transform: translateX(0); }
}
@keyframes os-dog-bob {
  from { transform: translateY(0); }
  to   { transform: translateY(-1.4px); }
}
@keyframes os-dog-leg {
  from { transform: rotate(17deg); }
  to   { transform: rotate(-17deg); }
}
@keyframes os-dog-tail {
  from { transform: rotate(-9deg); }
  to   { transform: rotate(13deg); }
}
@media (prefers-reduced-motion: reduce) {.shepherd-meeting-port [data-os-theme~="paper"] .os-dog-walk,.shepherd-meeting-port [data-os-theme~="paper"] .os-dog,.shepherd-meeting-port [data-os-theme~="paper"] .os-dog-tail,.shepherd-meeting-port [data-os-theme~="paper"] .os-dog-leg {
    animation: none;
  }
}/* 底部输入：更矮更精致的米白胶囊 + 玫粉圆钮 */
.shepherd-meeting-port .offline-session-page[data-os-theme~="paper"] .offline-bar {
  gap: 8px;
  padding: 4px 8px calc(6px + var(--safe-bottom));
}.shepherd-meeting-port .offline-session-page[data-os-theme~="paper"] .offline-bar .offline-plus {
  width: 30px;
  min-width: 30px;
  height: 30px;
  border-radius: 50%;
  color: var(--os-accent);
}.shepherd-meeting-port .offline-session-page[data-os-theme~="paper"] .offline-bar .offline-input-wrap {
  min-height: 28px;
  border-radius: 20px;
  border: 1px solid rgba(192, 90, 106, 0.28);
  background: var(--surface);
  box-shadow: 0 2px 12px rgba(192, 90, 106, 0.06);
}.shepherd-meeting-port .offline-session-page[data-os-theme~="paper"] .offline-bar .offline-input-wrap:focus-within {
  border-color: var(--os-accent);
  box-shadow: 0 2px 12px rgba(192, 90, 106, 0.14);
}.shepherd-meeting-port .offline-session-page[data-os-theme~="paper"] .offline-bar .offline-directive {
  min-height: 28px;
  padding: 4px 54px 4px 12px;
  font-size: 13px;
  line-height: 1.45;
}.shepherd-meeting-port .offline-session-page[data-os-theme~="paper"] .offline-bar .offline-expand,.shepherd-meeting-port .offline-session-page[data-os-theme~="paper"] .offline-bar .offline-directive-clear {
  width: 22px;
  height: 22px;
  right: 4px;
  bottom: auto;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 50%;
}.shepherd-meeting-port .offline-session-page[data-os-theme~="paper"] .offline-bar .offline-directive-clear {
  right: 30px;
}.shepherd-meeting-port .offline-session-page[data-os-theme~="paper"] .offline-bar .offline-advance {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  border-radius: 50%;
}/* 顶图：绘本横幅插画（生图 webp，对称树+小狗），通用氛围，不绑定任何角色 */
.shepherd-meeting-port .offline-session-page[data-os-theme~="paper"] .os-theater-top {
  width: 100%;
  max-width: var(--os-measure);
  margin: 0 auto 4px;
}.shepherd-meeting-port .offline-session-page[data-os-theme~="paper"] .os-theater-top .os-theater-art {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(192, 90, 106, 0.06);
  background: var(--surface);
}/* 幕头：小号罗马数字 SCENE Ⅰ，两侧发丝线 */
.shepherd-meeting-port .offline-session-page[data-os-theme~="paper"] .os-scene-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 4px 0 12px;
}.shepherd-meeting-port .offline-session-page[data-os-theme~="paper"] .os-scene-head::before,.shepherd-meeting-port .offline-session-page[data-os-theme~="paper"] .os-scene-head::after {
  content: "";
  height: 1px;
  width: 38px;
}.shepherd-meeting-port .offline-session-page[data-os-theme~="paper"] .os-scene-head::before {
  background: linear-gradient(90deg, transparent, var(--os-line));
}.shepherd-meeting-port .offline-session-page[data-os-theme~="paper"] .os-scene-head::after {
  background: linear-gradient(90deg, var(--os-line), transparent);
}.shepherd-meeting-port .offline-session-page[data-os-theme~="paper"] .os-scene-no {
  font-family: var(--os-sans);
  font-size: 11px;
  letter-spacing: 0.24em;
  color: var(--os-accent);
  white-space: nowrap;
}/* 用户输入：右对齐一行「你：『…』」 */
.shepherd-meeting-port .offline-session-page[data-os-theme~="paper"] p.os-you-line {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--os-ink-2);
  text-align: right;
  white-space: pre-wrap;
  word-break: break-word;
}.shepherd-meeting-port .offline-session-page[data-os-theme~="paper"] .os-you-tag {
  font-style: normal;
  color: var(--os-accent);
}/* 页脚小标题：左《本楼小标题》 */
.shepherd-meeting-port .offline-session-page[data-os-theme~="paper"] .os-beat-book {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--os-ink-3);
}
/* ============================================================
   P5 · 狗皮肤（dog）：共享米纸玫粉结构，叠加豆沙主色 + 朱丝栏
   ============================================================ */
.shepherd-meeting-port .offline-session-page[data-os-theme~="dog"] {
  --os-paper: #F5F0E8;
  --os-accent: #B8787A;
  --os-btn: #B8787A;
  --os-accent-soft: rgba(184, 120, 122, 0.1);
  --os-line: rgba(184, 120, 122, 0.16);
  background-image:
    repeating-linear-gradient(0deg, rgba(184, 120, 122, 0.02) 0 1px, transparent 1px 27px),
    repeating-linear-gradient(90deg, rgba(184, 120, 122, 0.015) 0 1px, transparent 1px 35px);
}
/* 正文双色：正文深棕、对白豆沙（对白色随 --os-accent 联动） */
.shepherd-meeting-port .offline-session-page[data-os-theme~="dog"] .offline-beat--narration p {
  color: var(--os-ink);
}
/* 朱丝栏：逐字短衬线，一字一栏、两端留空、与字保持间距 */
.shepherd-meeting-port [data-os-theme~="dog"] .os-zc {
  position: relative;
  font-style: normal;
}
.shepherd-meeting-port [data-os-theme~="dog"] .os-zc::after {
  content: "";
  position: absolute;
  left: 0.1em;
  right: 0.1em;
  bottom: 0.03em;
  height: 1px;
  border-radius: 1px;
  background: rgba(139, 0, 0, 0.45);
}
.shepherd-meeting-port [data-os-theme~="dog"] .narration-translate-btn .os-zc::after,
.shepherd-meeting-port [data-os-theme~="dog"] .narration-translation .os-zc::after {
  display: none;
}/* 新建见面：选择角色卡开场白（按角色分组，紧凑，与表单控件一致） */
.offline-page[data-os-theme~="paper"] .off-greeting-picker {display:grid;gap:12px;margin-top:8px}.offline-page[data-os-theme~="paper"] .off-greeting-picker[hidden] {display:none}.offline-page[data-os-theme~="paper"] .off-greeting-group {display:grid;gap:8px}.offline-page[data-os-theme~="paper"] .off-greeting-group-head {font:600 13px/1.6 var(--airp-font);color:var(--offline-muted,#8a7e94);letter-spacing:.04em}.offline-page[data-os-theme~="paper"] .off-greeting-item {width:100%;text-align:left;white-space:pre-wrap;overflow-wrap:anywhere;font:13px/1.7 var(--airp-font);padding:8px 12px;border:1px solid var(--offline-line,#e9e4ef);border-radius:10px;background:var(--offline-card,#f3eef8);color:inherit;max-height:120px;overflow-y:auto}.offline-page[data-os-theme~="paper"] .off-greeting-item.is-active {border-color:currentColor;color:var(--offline-accent,#79568e)}.offline-page[data-os-theme~="paper"] .off-greeting-empty {margin:0;font:13px/1.6 var(--airp-font);color:var(--offline-muted,#8a7e94)}

/* scene.css */
@layer app {
  /* ── 见面列表 ────────────────────────────────────────────────────────── */
  .airp-scene-list__rows {
    display: flex;
    flex-direction: column;
    padding: var(--airp-space-2) var(--airp-space-3) var(--airp-space-5);
  }

  .airp-scene-list__badge {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: var(--airp-radius-sm);
    background: var(--airp-accent-soft);
    color: var(--airp-accent-strong);
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    line-height: 1.2;
  }

  /* ── 见面会话页 ──────────────────────────────────────────────────────── */
  /*
   * 这一页的排版目标是**小说**，不是聊天。
   *
   * 所以：段落首行缩进两格（中文正文的排法）、行高接近 1.9、段间距比行距大一点点。
   * 用气泡排版会让"他收回脚，单膝压上床垫……"这种描写碎成一截一截 ——
   * 参考实现的 `.offline-beat--narration p` 用的就是 `text-indent: 2em` + `line-height: 1.92`。
   */
  .airp-scene-room {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
  }

  .airp-scene-room__floors {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: var(--airp-space-3) var(--airp-space-3) var(--airp-space-2);
    display: flex;
    flex-direction: column;
    gap: var(--airp-space-4);
  }

  .airp-scene-floor {
    display: flex;
    flex-direction: column;
    gap: var(--airp-space-1);
  }

  .airp-scene-floor__name {
    font-size: var(--airp-text-xs);
    font-weight: 700;
    color: var(--airp-accent-strong);
    letter-spacing: 0.02em;
  }

  .airp-scene-floor__body {
    display: flex;
    flex-direction: column;
    gap: var(--airp-space-3);
  }

  .airp-scene-floor__body p,
  .airp-scene-floor__text p {
    margin: 0 0 var(--airp-space-3);
    font-size: var(--airp-text-md);
    line-height: 1.92;
    text-indent: 2em;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  .airp-scene-floor__body p:last-child,
  .airp-scene-floor__text p:last-child {
    margin-bottom: 0;
  }

  .airp-scene-floor__foot {
    display: flex;
    align-items: center;
    gap: var(--airp-space-3);
    margin-top: var(--airp-space-1);
  }

  .airp-scene-floor__time {
    font-size: var(--airp-text-xs);
    color: var(--airp-text-3);
  }

  /*
   * 每一楼的操作按钮。
   *
   * 参考实现把十几个操作收进一个底部弹层（`offline-beat-action-sheet`），手机上那是对的。
   * 这里先只挂最常用的一个：重 roll —— 它是"这一楼我不满意"的第一反应，
   * 而其余操作（编辑/删除/收藏）在它旁边排一行就够，不需要弹层。
   */
  .airp-scene-act {
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid var(--airp-border);
    background: var(--airp-surface-2);
    color: var(--airp-text-2);
    font: inherit;
    font-size: var(--airp-text-xs);
  }

  .airp-scene-act:active {
    background: var(--airp-surface-3);
  }

  /* 用户写的一句：右对齐便签，标着「你的方向」。 */
  .airp-scene-direction {
    align-self: flex-end;
    max-width: 86%;
    padding: var(--airp-space-2) var(--airp-space-3);
    border-radius: 6px 14px 14px 14px;
    background: var(--airp-accent-soft);
    border: 1px solid var(--airp-border);
    /* 参考实现给用户的便签加了 ±0.6deg 的旋转，让它看起来像夹在书里的一张纸条。
     * 幅度很小：再大一点就开始像排版事故。 */
    transform: rotate(0.6deg);
  }

  .airp-scene-direction__label {
    font-size: 11px;
    color: var(--airp-text-3);
    margin-bottom: 2px;
  }

  .airp-scene-direction__text p {
    margin: 0;
    font-size: var(--airp-text-sm);
    line-height: 1.7;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  .airp-scene-direction__time {
    margin-top: 2px;
    font-size: 11px;
    color: var(--airp-text-3);
    text-align: right;
  }

  .airp-scene-note {
    align-self: center;
    font-size: var(--airp-text-xs);
    color: var(--airp-text-3);
    text-align: center;
  }

  .airp-scene-cast {
    font-size: var(--airp-text-xs);
    color: var(--airp-text-3);
  }

  /* ── 输入区 ──────────────────────────────────────────────────────────── */
  .airp-scene-composer {
    flex: 0 0 auto;
    display: flex;
    align-items: flex-end;
    gap: var(--airp-space-2);
    padding: var(--airp-space-2) var(--airp-space-3);
    padding-bottom: calc(var(--airp-space-2) + var(--airp-safe-bottom, 0px));
    border-top: 1px solid var(--airp-border);
    background: var(--airp-surface);
    /* Shell contracts to the visible viewport on keyboard open; never shift
     * just the input a second time. */
  }

  .airp-scene-composer__input {
    flex: 1 1 auto;
    min-height: 44px;
    max-height: 30vh;
    padding: 8px 12px;
    border-radius: var(--airp-radius-md);
    border: 1px solid var(--airp-border);
    background: var(--airp-surface-2);
    color: var(--airp-text);
    font: inherit;
    font-size: var(--airp-text-md);
    line-height: 1.5;
    resize: none;
  }

  .airp-scene-composer__input:focus {
    outline: none;
    border-color: var(--airp-accent);
  }

  .airp-scene-empty {
    padding: var(--airp-space-6) var(--airp-space-4);
    text-align: center;
    color: var(--airp-text-3);
    font-size: var(--airp-text-sm);
    line-height: 1.7;
  }

  /* ── 约 TA 线下（表单） ──────────────────────────────────────────────── */
  .airp-scene-start {
    display: flex;
    flex-direction: column;
    gap: var(--airp-space-4);
    padding: var(--airp-space-3) var(--airp-space-3) var(--airp-space-6);
  }

  /*
   * 模式是**两个大按钮**而不是下拉框。
   *
   * 两个选项、各有各的一句说明，用下拉框会把那句说明藏起来 —— 而"约会探索/支持多人"
   * 与"旁白与对白/单角色"正是用户做决定时需要读的东西。
   */
  .airp-scene-start__modes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--airp-space-2);
  }

  .airp-scene-start__mode {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: var(--airp-space-3);
    border-radius: var(--airp-radius-md);
    border: 1px solid var(--airp-border);
    background: var(--airp-surface-2);
    color: var(--airp-text);
    font: inherit;
    text-align: left;
  }

  .airp-scene-start__mode.is-on {
    border-color: var(--airp-accent);
    background: var(--airp-accent-soft);
  }

  .airp-scene-start__mode-title {
    font-size: var(--airp-text-sm);
    font-weight: 700;
  }

  .airp-scene-start__mode-hint {
    font-size: var(--airp-text-xs);
    color: var(--airp-text-3);
    line-height: 1.5;
  }

  .airp-scene-start__problem {
    padding: var(--airp-space-2) var(--airp-space-3);
    border-radius: var(--airp-radius-sm);
    background: var(--airp-danger-soft, var(--airp-surface-2));
    color: var(--airp-danger, var(--airp-text));
    font-size: var(--airp-text-sm);
  }

  .airp-scene-start__actions {
    display: flex;
    flex-direction: column;
    gap: var(--airp-space-2);
  }

  .airp-scene-start__note {
    margin: 0;
    font-size: var(--airp-text-xs);
    color: var(--airp-text-3);
    line-height: 1.7;
  }
}

@layer app {
  html[data-keyboard='open'] .airp-scene-composer {
    padding-bottom: var(--airp-space-2);
  }
}
/* Native frame for the extracted offline narrative controls. */
.airp-meeting-settings,.airp-floor-tools{border:0;margin:0;padding:12px;display:grid;gap:8px}
.airp-meeting-settings label{display:grid;gap:4px;font-size:15px}
.airp-meeting-settings input,.airp-meeting-settings select,.airp-meeting-settings textarea,.airp-floor-tools textarea,.airp-floor-tools select{width:100%;box-sizing:border-box;padding:8px;border:1px solid #d9d7d1;border-radius:10px;background:var(--airp-surface,#fff);color:inherit;font:inherit}
.airp-meeting-settings input[type=checkbox]{width:auto}
.airp-floor-tools textarea{min-height:120px}.airp-floor-tools small{display:block}
.offline-beat-actions,.airp-scene-choices{display:flex;flex-wrap:wrap;gap:8px;padding:8px}
.offline-beat-actions button,.airp-scene-choices button{border:1px solid #d9d7d1;background:var(--airp-surface,#fff);color:inherit;padding:8px 12px;border-radius:10px}
.airp-scene-current{font-size:15px;padding:8px;border-bottom:1px solid #ddd}

/* settings.css */
@layer app {
  .airp-settings {
    padding-bottom: var(--airp-space-6);
  }

  /*
   * 下拉选择器。
   *
   * 项目里没有 Select 原语，设置页一律用原生 <select>（这是既有做法）。但原生箭头在
   * 44px 高的输入域里位置不好看，所以这里只做一件事：拿掉原生箭头，自己放一个和输入域
   * 同高的 chevron，并对齐右侧内边距，避免箭头压在文字上。
   */
  .airp-select {
    position: relative;
    display: block;
  }

  .airp-select > select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 38px;
  }

  .airp-select > svg {
    position: absolute;
    top: 50%;
    right: var(--airp-space-3);
    transform: translateY(-50%);
    color: var(--airp-text-3);
    pointer-events: none;
  }

  /*
   * 「拉取模型」的结果。
   *
   * 必须紧挨着按钮显示，而且要能看清多行 —— 失败时要带一句"很可能是跨域"，
   * 那是用户唯一能拿到的线索。用 `pre` 保留换行。
   */
  .airp-model-result {
    margin: var(--airp-space-2) 0 0;
    padding: var(--airp-space-3);
    border: 1px solid var(--airp-border);
    border-radius: var(--airp-radius-sm);
    background: var(--airp-surface-2);
    color: var(--airp-text-2);
    font-family: inherit;
    font-size: var(--airp-text-sm);
    line-height: 1.7;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  /* 模型列表：拉回来可能几十条，限制高度自己滚，避免把页面的其它设置推走。 */
  .airp-model-picker {
    display: flex;
    flex-direction: column;
    max-height: 46vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid var(--airp-border);
    border-radius: var(--airp-radius-sm);
  }

  .airp-dropzone {
    display: grid;
    place-items: center;
    gap: var(--airp-space-2);
    margin: var(--airp-space-3) var(--airp-space-4);
    padding: var(--airp-space-6) var(--airp-space-4);
    border: 1.5px dashed var(--airp-border-strong);
    border-radius: var(--airp-radius-lg);
    background: var(--airp-surface-2);
    color: var(--airp-text-2);
    text-align: center;
  }

  .airp-dropzone__hint {
    font-size: var(--airp-text-xs);
    color: var(--airp-text-3);
    line-height: 1.6;
    max-width: 34ch;
  }

  .airp-importcard {
    margin: var(--airp-space-3) var(--airp-space-4);
    padding: var(--airp-space-3);
    border-radius: var(--airp-radius-md);
    background: var(--airp-surface-2);
    border: 1px solid var(--airp-border);
    font-size: var(--airp-text-xs);
    line-height: 1.6;
    color: var(--airp-text-2);
  }
}

@layer app {
  .airp-prompt-block {
    border-top: 1px solid var(--airp-border);
    background: var(--airp-surface-1);
  }

  .airp-prompt-block:first-child {
    border-top: 0;
  }

  .airp-prompt-block > summary {
    display: grid;
    gap: 4px;
    padding: var(--airp-space-3) var(--airp-space-4);
    cursor: pointer;
    list-style: none;
  }

  .airp-prompt-block > summary::-webkit-details-marker {
    display: none;
  }

  .airp-prompt-block__title {
    font-size: var(--airp-text-sm);
    font-weight: 650;
    color: var(--airp-text-1);
  }

  .airp-prompt-block__meta {
    font-size: var(--airp-text-xs);
    color: var(--airp-text-3);
    line-height: 1.5;
    overflow-wrap: anywhere;
  }

  .airp-prompt-block__meta-details {
    margin: 0 var(--airp-space-4) var(--airp-space-3);
    color: var(--airp-text-3);
    font-size: var(--airp-text-xs);
  }

  .airp-dev-code-wrap {
    padding: var(--airp-space-3) var(--airp-space-4) var(--airp-space-4);
  }

  .airp-dev-pre {
    margin: 0;
    padding: var(--airp-space-3);
    max-height: 52vh;
    overflow: auto;
    border: 1px solid var(--airp-border);
    border-radius: var(--airp-radius-sm);
    background: var(--airp-surface-2);
    color: var(--airp-text-1);
    font: 13px/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  .airp-dev-pre--small {
    margin-top: var(--airp-space-2);
    max-height: 28vh;
    font-size: 11px;
  }


}

/* worldbook.css */
.airp-me { display: grid; gap: var(--airp-space-4); }

@layer app {
  /* The wallpaper preview is capped in height on purpose: a full-bleed portrait
   * photo would push the controls that matter below the fold. */
  .airp-wallpaperpreview {
    display: grid;
    place-items: center;
    margin: 0 var(--airp-space-4) var(--airp-space-3);
    border: 1px solid var(--airp-border);
    border-radius: var(--airp-radius-lg);
    background: var(--airp-surface-2);
    overflow: hidden;
  }

  .airp-wallpaperpreview .airp-assetimage {
    width: 100%;
    max-height: 180px;
    object-fit: cover;
    border-radius: 0;
  }

  /* ── 世界书 ─────────────────────────────────────────────────────────── */

  /*「常开」那一行：说明在左、开关在右，整行可点。开关单独放一行会让人以为
   * 它只作用于下面那个输入框。 */
  .airp-lore-form__switch {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--airp-space-3);
    padding: var(--airp-space-2) 0;
    font-size: var(--airp-text-sm);
    color: var(--airp-text-2);
  }

  .airp-lore-form {
    display: flex;
    flex-direction: column;
    gap: var(--airp-space-2);
  }

  .airp-lore-form__actions {
    display: flex;
    flex-direction: column;
    gap: var(--airp-space-2);
  }

  /* 「想挂到别处？」这一句是有用的：挂靠不在这个页面里，不说清用户会在条目页里
   * 到处找不到"这条为什么不生效"。 */
  .airp-lore-tip {
    margin: var(--airp-space-4) var(--airp-space-4) var(--airp-space-6);
    padding: var(--airp-space-3);
    border-radius: var(--airp-radius-sm);
    background: var(--airp-surface-2);
    color: var(--airp-text-3);
    font-size: var(--airp-text-xs);
    line-height: 1.7;
  }

  /* ── 人设 ───────────────────────────────────────────────────────────── */

  /*
   * 「实际会发出去的内容」那个预览框。
   *
   * 用 `pre` 是要保留换行与缩进 —— 发给模型的就是这么几行，排版被浏览器折掉之后
   * 用户就看不出"我写的正文是单独一行"这件事了。
   */
  .airp-persona-preview {
    margin: 0 var(--airp-space-4);
    padding: var(--airp-space-3);
    border: 1px solid var(--airp-border);
    border-radius: var(--airp-radius-sm);
    background: var(--airp-surface-2);
    color: var(--airp-text-2);
    font-family: inherit;
    font-size: var(--airp-text-sm);
    line-height: 1.7;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
}

@layer app{.worldbook-app{height:100%;min-height:0;display:flex;flex-direction:column}.worldbook-app .airp-screen{flex:1;min-height:0}.worldbook-app .airp-section{border-radius:14px;margin:12px;border:1px solid var(--airp-border);box-shadow:none}.worldbook-app .airp-section__head{padding:12px 16px}.worldbook-app .airp-section__title{font-size:13px}.worldbook-app .airp-btn,.worldbook-app input,.worldbook-app textarea{font-size:13px}.worldbook-app .airp-lore-tip{font-size:13px;line-height:1.7}.worldbook-app .airp-screen__title{font-size:17px}}

/* character-studio.css */
.character-studio{color-scheme:light;height:100%;min-height:0;display:flex;flex-direction:column;color:#302d3d;--airp-bg:#f7f5fa;--airp-surface:#fff;--airp-surface-2:#f7f3fb;--airp-text:#302d3d;--airp-text-1:#302d3d;--airp-text-2:#504559;--airp-text-3:#756c80;--airp-divider:#e5deec}
.character-studio .airp-screen{background:#f7f5fa;color:#302d3d}.character-studio .airp-screen__header{background:linear-gradient(120deg,#f1e9fb,#fff7f3);color:#302d3d;border-color:#e5deec}
.character-studio .cs-content{padding:16px;max-width:650px;width:100%;margin:0 auto;font:15px/1.7 system-ui,-apple-system,"PingFang SC",sans-serif}
.character-studio button:where(:not(.airp-iconbtn,.airp-switchbtn,.wb-entry-open,.wb-group-row,.wb-text-action)),.character-studio input,.character-studio textarea{font:inherit}.character-studio button:where(:not(.airp-iconbtn,.airp-switchbtn,.wb-entry-open,.wb-group-row,.wb-text-action)){min-height:44px;padding:8px 12px;border:1px solid #dacde8;background:#fff;color:#65448a;border-radius:10px;cursor:pointer}.character-studio button:where(:not(.airp-iconbtn,.airp-switchbtn,.wb-entry-open,.wb-group-row,.wb-text-action)):disabled{opacity:.5;cursor:default}.character-studio button:where(:not(.airp-iconbtn,.airp-switchbtn,.wb-entry-open,.wb-group-row,.wb-text-action)):hover:not(:disabled){background:#f3edf9}.character-studio .cs-primary{background:#73529b;color:#fff;border-color:#73529b}
.character-studio .cs-identity{background:#fff;border:1px solid #e5deec;border-radius:14px;padding:16px;display:flex;align-items:flex-end;gap:12px;margin-bottom:12px;flex-wrap:wrap}.character-studio .cs-identity .cs-field{flex:1;min-width:130px;margin:0}
.character-studio .cs-fold{background:#fff;border:1px solid #e5deec;border-radius:14px;overflow:hidden;margin-bottom:12px}.character-studio .cs-fold>summary{list-style:none;display:flex;align-items:center;justify-content:space-between;padding:16px 16px;min-height:74px;cursor:pointer}.character-studio .cs-fold>summary::-webkit-details-marker{display:none}.character-studio .cs-fold>summary:after{content:'＋';font-size:20px;color:#80659a}.character-studio .cs-fold[open]>summary:after{content:'−'}.character-studio .cs-fold[open]>summary{background:#faf7fd;border-bottom:1px solid #eee6f4}.character-studio .cs-fold summary strong{display:block;font-size:15px;font-weight:500}.character-studio .cs-fold summary small{display:block;font-size:13px;color:#756c80;margin-top:4px}.character-studio .cs-fold-body{padding:4px 16px 16px}
.character-studio .cs-field{display:block;margin:12px 0}.character-studio .cs-field>span{display:block;margin-bottom:8px;font-size:13px;color:#6d617b}.character-studio .cs-field input,.character-studio .cs-field textarea{width:100%;box-sizing:border-box;background:#faf9fc;border:1px solid #ded6e8;border-radius:10px;color:#35303f;font-size:15px;line-height:1.85;padding:12px 12px;resize:vertical}.character-studio textarea{min-height:155px}.character-studio textarea.cs-profile{min-height:330px}.character-studio .cs-helper{background:#f8f4fc;padding:0 12px;border:1px solid #e7ddef;border-radius:10px;margin-top:12px}.character-studio .cs-helper>summary{padding:12px 0;color:#65458b;cursor:pointer}.character-studio .cs-categories{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.character-studio .cs-categories button{font-size:13px;padding:8px 2px}.character-studio .cs-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.character-studio .cs-helper .cs-actions{margin-bottom:12px}.character-studio .cs-save>button{flex:1;min-width:140px}.character-studio .cs-book{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:12px 0;border-bottom:1px solid #e5deec;flex-wrap:wrap}.character-studio .cs-book label{display:flex;align-items:center;gap:8px;min-height:44px}.character-studio .cs-book small{display:block;font-size:13px;color:#756c80}.character-studio input[type=checkbox]{width:20px;height:20px;accent-color:#73529b}.character-studio .cs-link{margin-top:12px}.character-studio .cs-hint,.character-studio .cs-inspect p{font-size:13px;color:#756c80}.character-studio .cs-inspect{padding:16px;background:#fff;border:1px solid #e5deec;border-radius:14px;margin-top:12px}.character-studio pre{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;color:#35303f}.character-studio .cs-error{padding:20px;color:#a33547}.character-studio .cs-greeting{padding-bottom:12px;border-bottom:1px solid #e5deec;margin-bottom:12px}
.character-studio .airp-screen{height:100%;min-height:0}.character-studio .airp-screen__body{display:flex;flex-direction:column}.character-studio .cs-content{flex:1}.character-studio .cs-tabs{display:flex;gap:4px;padding:4px;background:#ece5f3;border-radius:14px;margin-bottom:16px}.character-studio .cs-tabs button{flex:1;min-width:0;border:0;padding:8px 4px;background:transparent}.character-studio .cs-tabs button[aria-selected=true]{background:#fff;color:#65448a;box-shadow:0 2px 6px #65448a12}.character-studio [hidden]{display:none!important}.character-studio .cs-greeting-fold{background:#fff;border:1px solid #e5deec;border-radius:14px;margin:12px 0;padding:0 12px}.character-studio .cs-greeting-fold summary{padding:12px 0;cursor:pointer}.character-studio .cs-greeting-fold summary>span{display:inline-flex;justify-content:space-between;width:calc(100% - 22px)}.character-studio .cs-greeting-fold small{font-size:13px;color:#756c80}.character-studio .cs-greeting-fold summary p{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;color:#756c80;margin:4px 0 0}.character-studio .cs-greeting-fold>button{margin-bottom:12px}.character-studio .cs-greeting-fold textarea{min-height:260px}.character-studio .cs-savebar{position:sticky;bottom:0;margin-top:auto;padding:12px 16px calc(12px + var(--airp-safe-bottom,0px));background:#fff;border-top:1px solid #e5deec;display:flex;gap:8px;align-items:center;z-index:5}.character-studio .cs-savebar .cs-primary{flex:1}.character-studio .cs-field select{width:100%;padding:12px;border:1px solid #ded6e8;border-radius:10px;background:#faf9fc;color:#35303f;font:inherit;font-size:15px}.character-studio .cs-field textarea::placeholder,.character-studio .cs-field input::placeholder{color:#91869c;opacity:1}.character-studio .cs-ack{margin:16px 0;font-size:13px;overflow-wrap:anywhere}.character-studio .cs-ack summary{padding:12px 0;cursor:pointer}.character-studio .cs-ack pre{font-size:13px}.character-studio .cs-longtext{white-space:pre-wrap;overflow-wrap:anywhere}.character-studio .cs-ack a{color:#73529b}.character-studio .cs-groups .cs-book{align-items:flex-start}.character-studio .cs-groups .cs-book label{flex:1;min-width:130px}.character-studio .cs-groups .cs-book span{overflow-wrap:anywhere}.character-studio .cs-content h3{font-size:15px;font-weight:500}.character-studio .cs-content h4{font-size:15px;font-weight:500}
.character-studio .cs-list-tags{display:flex;gap:4px;flex-wrap:wrap;margin-top:4px}.character-studio .cs-list-tags>span{display:inline-block;background:#eee7f5;color:#756185;border-radius:6px;padding:1px 4px;font-size:11px}.character-studio .airp-charlist__tagline{white-space:normal}
/* 音色行：做成「长得像输入框、整行可点」的行，点击开口层填 voice_id。 */
.character-studio .cs-voice{display:block;width:100%;text-align:left;padding:12px;background:#fdfbff;border-color:#e5ddea;color:#35303f;font-size:15px;line-height:1.85;font-weight:400}.character-studio .cs-voice[data-empty=true]{color:#91869c}

.character-studio.cs-modal{height:auto;display:block}.character-studio.cs-modal .cs-content{max-width:100%;box-sizing:border-box}

/* Header icons keep a clear glyph and a generous invisible touch target. */
.character-studio .airp-screen__header .airp-iconbtn{width:44px;height:44px;min-width:44px;min-height:44px;padding:0;border:0;border-radius:50%;background:transparent;box-shadow:none;display:inline-grid;place-items:center;color:#786386;flex:0 0 44px}.character-studio .airp-screen__header .airp-iconbtn svg{width:21px;height:21px;min-width:21px;flex-shrink:0}.character-studio .airp-screen__header .airp-iconbtn:hover{background:#ece4f3}.character-studio .airp-screen__header .airp-screen__actions>button:not(.airp-iconbtn){min-height:36px;padding:4px 8px;border:0;background:transparent;box-shadow:none;font-size:15px;color:#7c5d95}.character-studio .airp-screen__header{align-items:center;padding-left:8px;padding-right:12px}.character-studio .airp-screen__title{font-size:17px;font-weight:500}.character-studio .airp-screen__headtext{padding-bottom:0}.character-studio .airp-screen__actions{padding-bottom:0}.character-studio .cs-content{padding:16px}.character-studio .cs-savebar .cs-primary{min-height:44px;font-size:15px;border-radius:14px;background:#805da4;border-color:#805da4}.character-studio .cs-field input,.character-studio .cs-field textarea{border-color:#e5ddea;background:#fdfbff}.character-studio .cs-inspect{border-color:#e9e2ef;box-shadow:none}.character-studio .cs-tabs{background:#eee8f5}.character-studio .cs-tabs button{font-size:15px}.character-studio .airp-switchbtn{padding:0!important;border:0!important;background:transparent!important;min-height:44px;min-width:44px;box-shadow:none}

/* desktop.css */
@layer app {
.beauty-launcher{color-scheme:only light;display:flex;flex-direction:column;flex:1;min-height:0;overflow-y:auto;padding:24px 24px calc(var(--airp-safe-bottom) + 12px);background-size:cover;background-position:center;color:#81748c;--desktop-accent:#a18ac1}
.beauty-desktop-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-auto-rows:80px;gap:20px 12px;flex:none}
.beauty-desktop-item{position:relative;min-width:0;user-select:none;touch-action:pan-y}.beauty-desktop-item:has([style*="translate"]){z-index:10}.is-editing .beauty-desktop-item{touch-action:none;outline:1px dashed #b5a2cf99;outline-offset:4px;border-radius:20px}
.beauty-app-button{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:8px;padding:2px 0 0;border:0;background:none;color:inherit}
.beauty-app-tile{width:54px;height:54px;min-width:54px;min-height:54px;flex:0 0 54px;aspect-ratio:1;display:grid;place-items:center;border-radius:14px;background:#fffdfd;box-shadow:0 3px 5px #aea2bc25;overflow:hidden;color:var(--desktop-accent)}
.beauty-app-tile svg{width:36px;height:36px;filter:drop-shadow(0 2px 1px #9680ae20)}.beauty-app-tile img{width:100%;height:100%;object-fit:cover}.beauty-app-label{font-size:11px;line-height:14px;color:#9383a5;flex:none}
.beauty-widget-stack{height:100%;display:flex;flex-direction:column;align-items:center;gap:8px}.beauty-widget-stack small{font-size:11px;line-height:13px;letter-spacing:1px;color:#ada1bd;flex:none}.beauty-photo{width:100%;flex:1;min-height:0;background:#c6bad6;background-size:cover;background-position:center;overflow:hidden}
.beauty-clock{height:100%;background:#c6bad6;background-size:cover;background-position:center;display:flex;align-items:center;justify-content:center;overflow:hidden;container-type:inline-size}.beauty-clock-panel{width:86%;height:76%;display:flex;flex-direction:column;align-items:center;justify-content:center;border-radius:20px;border:1px solid #ffffff36;background:#eee6ff20;backdrop-filter:blur(3px)}.beauty-clock-time{font-family:Georgia,'Times New Roman',serif;font-size:clamp(32px,20cqw,74px);font-weight:400;line-height:1.1;font-variant-numeric:tabular-nums;color:var(--desktop-clock-color,#e5d9fa)}.beauty-clock-date{font-size:11px;letter-spacing:2px;color:#f2eaf9b8;margin-top:4px}
.beauty-camera{position:relative;width:min(100%,145px);height:calc(100% - 23px);max-height:140px;border-radius:20px;border:2px solid #c4c0cb;background:linear-gradient(140deg,#fafafa,#bcbac6 65%,#e2e0e8);box-shadow:inset 0 0 0 3px #f1f0f4,0 3px 5px #9d98a423;padding:24px 32px 12px 8px;margin:auto}.beauty-camera>span{position:absolute;top:9px;left:12px;font-size:7px;letter-spacing:1px}.beauty-camera-screen{height:100%;background-size:cover;background-position:center;border:3px solid #bcb8c5;border-radius:10px;box-shadow:0 0 0 2px #eeecf2}.beauty-camera-lens{position:absolute;right:8px;top:45%;width:23px;height:23px;border:3px solid #c5c1ce;border-radius:50%;box-shadow:0 0 0 2px #f5f3fa;background:radial-gradient(circle,#a7a1b3 15%,#e9e6ef 18%,#c5c0d0 48%,#f4f2f9 55%)}
.beauty-decor{display:flex;flex-direction:column;align-items:center;gap:8px;color:var(--desktop-accent);font-size:11px;padding-top:8px}.beauty-page-decoration{color:#b9a6d1;font-size:13px;text-align:center;margin:16px 0 12px}.beauty-desktop-dock{margin-top:auto;display:flex;align-items:center;justify-content:space-around;border-radius:28px;padding:12px 16px;background:#ffffff80;border:1px solid #ffffffb0;box-shadow:0 2px 5px #c1bccd30}.beauty-desktop-dock button{background:none;padding:0;border:0}.beauty-desktop-dock .beauty-app-label{display:none}.beauty-home-indicator{width:95px;height:4px;border-radius:10px;background:#c0bdc8;margin:16px auto 0;flex:none}.beauty-edit-tools{position:sticky;top:-24px;z-index:20;display:flex;gap:8px;background:#f2edf9ee;padding:8px;margin:-10px 0 16px;border-radius:14px}.beauty-edit-tools button{background:#e5dcec;color:#8b729e;border:0;border-radius:14px;padding:8px;font-size:11px}.beauty-remove{position:absolute;z-index:5;top:-7px;left:-6px;border-radius:50%;width:23px;height:23px;background:white;border:0;color:#8c739f;font-size:20px;line-height:20px;box-shadow:0 2px 8px #6a557333}
}
@layer app {
/* One viewport contains one page. Page height comes from the existing viewport adapter. */
.beauty-launcher{overflow:hidden;padding:calc(var(--airp-safe-top) + 12px) max(18px,var(--airp-safe-right)) calc(var(--airp-safe-bottom) + 8px) max(18px,var(--airp-safe-left));touch-action:pan-y}
.beauty-page-viewport{flex:1 1 0;min-height:0;position:relative}
.beauty-desktop-grid{height:100%;width:100%;grid-template-rows:repeat(6,minmax(0,1fr));grid-auto-rows:0;gap:clamp(5px,calc(var(--airp-app-height) * .02),20px) clamp(8px,3vw,14px);}
.beauty-desktop-item{min-height:0;max-height:100%}.beauty-desktop-item.is-dragging{z-index:30;filter:drop-shadow(0 4px 8px #8d75ab44)}
.beauty-app-button{gap:4px;padding:1px 0 0}.beauty-app-tile{width:var(--desktop-icon-size,54px);height:var(--desktop-icon-size,54px);min-width:0;min-height:0;flex:0 0 var(--desktop-icon-size,54px)}.beauty-app-tile svg{width:70%;height:70%}.beauty-app-label{line-height:12px}
.beauty-app-tile.is-custom{background:transparent;box-shadow:none;border:0;border-radius:0;overflow:visible}.beauty-app-tile.is-custom img{object-fit:contain;filter:none}
.beauty-desktop-dock{flex:none;margin:0;padding:8px 12px}.beauty-desktop-dock .beauty-app-tile{--desktop-icon-size:clamp(32px,calc(var(--airp-app-height) * .063),52px)}
.beauty-home-indicator{height:3px;margin:8px auto 0}.beauty-page-navigation{display:flex;align-items:center;justify-content:center;gap:4px;min-height:30px;flex:none;margin:4px 0}.beauty-page-navigation>button{color:#a18abb;width:26px;height:26px;border:0;font-size:20px;display:grid;place-items:center}.beauty-page-navigation>button:disabled{opacity:.25}.beauty-page-navigation>.beauty-page-dot{position:relative;width:20px;height:26px;font-size:0}.beauty-page-dot:after{content:'';width:5px;height:5px;border-radius:6px;background:#d0c1df}.beauty-page-dot[aria-current=page]:after{width:14px;background:#a18abb}
.beauty-edit-tools{position:relative;top:auto;flex:none;z-index:35;margin:0 0 8px;padding:4px}.beauty-edit-tools button{padding:4px 8px}
.beauty-clock{container-type:size}.beauty-clock-time{font-size:clamp(18px,min(20cqw,42cqh),74px)}.beauty-clock-date{margin-top:4px}
.is-compact .beauty-app-label,.is-compact .beauty-widget-stack small{display:none}.is-compact .beauty-widget-stack{gap:0}.is-compact .beauty-camera{padding:12px 20px 4px;max-height:100%;height:100%;margin:0;border-radius:14px}.is-compact .beauty-camera>span{font-size:5px;top:5px;left:8px}.is-compact .beauty-camera-lens{width:13px;height:13px;right:5px}.is-compact .beauty-decor{padding:0;gap:1px}.is-compact .beauty-decor svg{width:24px;height:24px}
}
@layer app {
/* Clip only the built-in reference art, independent of thumbnail aspect ratio. */
.beauty-clock,.beauty-photo,.beauty-camera-screen{position:relative;overflow:hidden}.beauty-builtin-art{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.beauty-clock-panel{position:relative;z-index:1}
}
@layer app {
.beauty-photo img{width:100%;height:100%;display:block;position:absolute;inset:0;object-position:center}.beauty-photo.is-transparent{background:transparent!important;border:0!important;box-shadow:none!important;border-radius:0!important}
.beauty-page-viewport{overflow:hidden;touch-action:pan-y}.beauty-page-track{height:100%;position:relative;will-change:transform;transition:transform 280ms cubic-bezier(.22,.7,.25,1)}.beauty-page-track.is-swiping{transition:none}.beauty-desktop-grid{position:absolute;top:0}.beauty-desktop-item.is-page-hidden{visibility:hidden;pointer-events:none}
@media(prefers-reduced-motion:reduce){.beauty-page-track{transition-duration:1ms}}
}
@layer app {
.beauty-clock-date{color:var(--desktop-date-color,#a18ac1)}.beauty-roman{height:100%;width:100%;display:grid;place-items:center;background:transparent}.beauty-roman svg{height:100%;width:100%;max-width:100%;max-height:100%;overflow:visible}.beauty-roman text{font:20px Georgia,'Times New Roman',serif;letter-spacing:-1px}
.beauty-calendar{position:relative;width:100%;height:100%;overflow:hidden;background:transparent;container-type:size}.beauty-calendar-background{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center}.beauty-calendar-content{position:relative;margin-left:49%;width:47%;height:100%;padding:4% 2%;display:flex;flex-direction:column;justify-content:center;box-sizing:border-box;font-family:Arial,sans-serif}.beauty-calendar-month{font-size:clamp(8px,min(4.6cqw,8cqh),17px);font-weight:600;text-align:center;margin-bottom:4%}.beauty-calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));grid-auto-rows:minmax(0,1fr);gap:2px;height:80%;max-height:80%;font-size:clamp(6px,min(3.2cqw,6.5cqh),14px)}.beauty-calendar-grid span{display:grid;place-items:center;min-width:0;min-height:0;border:1px solid transparent;border-radius:6px}.beauty-calendar-weekday{opacity:.75;font-size:.8em}.beauty-calendar-grid .is-today{font-weight:700}
}

.desktop-loading{display:grid;place-items:center;min-height:70vh;color:#9b88ac;font-size:13px}

/* image-crop.css */
/*
 * 「传图 + 裁剪」共用小部件的配色。
 *
 * 中性深色底，不引用任何一方的主题变量，所以同一套皮肤在角色编辑页（紫色）和
 * 发红包页（微信绿/红）里都成立。
 */
.airp-crop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-sizing: border-box;
  padding: calc(var(--airp-safe-top, 0px) + 10px) 12px calc(var(--airp-safe-bottom, 0px) + 12px);
  background: #17181b;
  color: #f4f2ef;
  overscroll-behavior: none;
}

.airp-crop__bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.airp-crop__title {
  flex: 1 1 auto;
  min-width: 0;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.airp-crop__cancel,
.airp-crop__done {
  flex: 0 0 auto;
  min-width: 44px;
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: #f4f2ef;
  font: inherit;
  font-size: 15px;
  cursor: pointer;
}

.airp-crop__cancel {
  text-align: left;
  color: #c9c6c1;
}

.airp-crop__done {
  text-align: right;
  font-weight: 600;
}

.airp-crop__help {
  flex: 0 0 auto;
  margin: 0;
  text-align: center;
  font-size: 13px;
  color: #a7a39d;
}

.airp-crop__stage {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  background: #0d0e10;
  touch-action: none;
  cursor: grab;
}

.airp-crop__stage:active {
  cursor: grabbing;
}

.airp-crop__canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.airp-crop__grid {
  position: absolute;
  pointer-events: none;
  border: 1px solid #fff;
  box-shadow: 0 0 0 500px rgba(12, 12, 14, 0.55);
  background:
    linear-gradient(to right, transparent 33.1%, rgba(255, 255, 255, 0.32) 33.1%, rgba(255, 255, 255, 0.32) 33.5%, transparent 33.5%, transparent 66.4%, rgba(255, 255, 255, 0.32) 66.4%, rgba(255, 255, 255, 0.32) 66.8%, transparent 66.8%),
    linear-gradient(to bottom, transparent 33.1%, rgba(255, 255, 255, 0.32) 33.1%, rgba(255, 255, 255, 0.32) 33.5%, transparent 33.5%, transparent 66.4%, rgba(255, 255, 255, 0.32) 66.4%, rgba(255, 255, 255, 0.32) 66.8%, transparent 66.8%);
}

.airp-crop__grid--round {
  border-radius: 50%;
  background: none;
}

.airp-crop__tools {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.airp-crop__tools button {
  min-width: 44px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #45464a;
  border-radius: 10px;
  background: transparent;
  color: #f0eeea;
  font: inherit;
  font-size: 17px;
  cursor: pointer;
}

.airp-crop__tools .airp-crop__reset {
  font-size: 13px;
}

/* shell.css */
@layer app {
  /* ── Screen frame: shell-owned chrome ─────────────────────────────────────
   * Every app renders inside this. Apps do not build their own navigation or
   * safe-area handling; that is the shell's job and the reason the product can
   * feel like one app instead of thirty-four. */

  .airp-shell {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(var(--airp-readable-max), 100vw);
    /* The viewport layer owns this size. It uses the visible keyboard-free
     * height while typing, so the list and input stay in one flex layout. */
    height: var(--airp-app-height);
    background: var(--airp-bg);
    overflow: hidden;
  }

  .airp-screen {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
  }

  .airp-screen__header {
    flex: 0 0 auto;
    display: flex;
    align-items: flex-end;
    gap: var(--airp-space-2);
    min-height: calc(var(--airp-navbar-h) + var(--airp-safe-top));
    padding: calc(var(--airp-safe-top) + var(--airp-space-2)) var(--airp-space-3) var(--airp-space-2);
    background: var(--airp-surface-glass);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--airp-divider);
    position: relative;
    z-index: 20;
  }

  .airp-screen__headtext {
    flex: 1 1 auto;
    min-width: 0;
    padding-bottom: 4px;
  }

  .airp-screen__title {
    font-size: var(--airp-text-lg);
    font-weight: 700;
    letter-spacing: -0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .airp-screen__subtitle {
    margin-top: 1px;
    font-size: var(--airp-text-xs);
    color: var(--airp-text-3);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .airp-screen__actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: var(--airp-space-1);
    padding-bottom: 1px;
  }

  .airp-screen__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    /* Bottom inset so content is never trapped under the home indicator. */
    padding-bottom: var(--airp-safe-bottom);
  }

  .airp-screen__body--flat {
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .airp-screen__content {
    padding: 0 var(--airp-space-4);
  }

  /* ── Launcher ──────────────────────────────────────────────────────────── */

  .airp-launcher {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    padding: calc(var(--airp-safe-top) + var(--airp-space-2)) var(--airp-space-5) 0;
    background:
      radial-gradient(120% 70% at 50% -10%, var(--airp-accent-soft) 0%, transparent 62%),
      var(--airp-bg);
  }

  .airp-statusbar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 22px;
    font-size: var(--airp-text-xs);
    font-weight: 600;
    color: var(--airp-text-2);
    letter-spacing: 0.02em;
  }

  .airp-statusbar__right {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--airp-text-3);
  }

  .airp-launcher__greeting {
    margin: var(--airp-space-5) 0 var(--airp-space-6);
  }

  .airp-launcher__greeting-line {
    font-size: var(--airp-text-2xl);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.25;
  }

  .airp-launcher__greeting-sub {
    margin-top: 4px;
    font-size: var(--airp-text-sm);
    color: var(--airp-text-3);
  }

  .airp-appgrid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--airp-space-5) var(--airp-space-3);
    align-content: start;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    padding-bottom: var(--airp-space-6);
  }

  .airp-appicon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: none;
    border: 0;
    padding: 0;
    color: var(--airp-text);
  }

  .airp-appicon__tile {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 14px;
    background: var(--airp-surface-3);
    border: 1px solid var(--airp-border);
    box-shadow: var(--airp-shadow-1);
    transition: transform var(--airp-dur-fast) var(--airp-ease);
  }

  .airp-appicon:active .airp-appicon__tile {
    transform: scale(0.93);
  }

  .airp-appicon__tile--accent {
    background: linear-gradient(150deg, var(--airp-accent) 0%, var(--airp-accent-strong) 100%);
    color: var(--airp-accent-ink);
    border-color: transparent;
    box-shadow: var(--airp-shadow-accent);
  }

  .airp-appicon__tile--attention {
    background: linear-gradient(150deg, var(--airp-attention) 0%, #f0c49a 100%);
    color: #3a2413;
    border-color: transparent;
  }

  .airp-appicon__tile--success {
    background: linear-gradient(150deg, var(--airp-success) 0%, #7fe0b8 100%);
    color: #0d2a20;
    border-color: transparent;
  }

  .airp-appicon__label {
    font-size: var(--airp-text-2xs);
    font-weight: 600;
    color: var(--airp-text-2);
    max-width: 76px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
  }

  .airp-appicon__badge {
    position: absolute;
    top: -4px;
    right: -4px;
  }

  .airp-appicon__tilewrap {
    position: relative;
  }

  .airp-launcher__dock {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--airp-space-4);
    margin: var(--airp-space-4) 0 calc(var(--airp-safe-bottom) + var(--airp-space-4));
    padding: var(--airp-space-3);
    border-radius: var(--airp-radius-xl);
    background: var(--airp-surface-glass);
    border: 1px solid var(--airp-border);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }

  /* ── Diagnostics ───────────────────────────────────────────────────────── */

  .airp-diag__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--airp-space-3);
    padding: 8px var(--airp-space-4);
    border-bottom: 1px solid var(--airp-divider);
    font-size: var(--airp-text-sm);
  }

  .airp-diag__key {
    color: var(--airp-text-3);
    flex: 0 0 auto;
  }

  .airp-diag__value {
    color: var(--airp-text);
    text-align: right;
    word-break: break-word;
    font-family: var(--airp-font-mono);
    font-size: var(--airp-text-xs);
  }

  .airp-diag__log {
    margin: var(--airp-space-3) var(--airp-space-4);
    padding: var(--airp-space-3);
    max-height: 40dvh;
    overflow: auto;
    border-radius: var(--airp-radius-md);
    background: var(--airp-bg-deep);
    border: 1px solid var(--airp-border);
    font-family: var(--airp-font-mono);
    font-size: 11px;
    line-height: 1.5;
    -webkit-user-select: text;
    user-select: text;
  }

  .airp-diag__logline {
    white-space: pre-wrap;
    word-break: break-all;
    color: var(--airp-text-2);
  }

  .airp-diag__logline--error {
    color: var(--airp-danger);
  }

  .airp-diag__logline--warn {
    color: var(--airp-warn);
  }

  .airp-diag__sectiontitle {
    padding: var(--airp-space-4) var(--airp-space-4) var(--airp-space-2);
    color: var(--airp-text-3);
    font-size: var(--airp-text-xs);
    font-weight: 600;
    letter-spacing: 0.04em;
  }

  /* ── Blocking screens (schema mismatch, safe mode) ─────────────────────── */

  .airp-blocker {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--airp-space-4);
    flex: 1 1 auto;
    padding: calc(var(--airp-safe-top) + var(--airp-space-6)) var(--airp-space-6)
      calc(var(--airp-safe-bottom) + var(--airp-space-6));
    text-align: left;
  }

  .airp-blocker__title {
    font-size: var(--airp-text-xl);
    font-weight: 700;
  }

  .airp-blocker__text {
    font-size: var(--airp-text-sm);
    color: var(--airp-text-2);
    line-height: 1.65;
  }
}


@layer shell {
  .airp-log-toolbar {
    display: grid;
    gap: var(--airp-space-2);
    padding: var(--airp-space-3) var(--airp-space-4);
  }

  .airp-log-list {
    display: grid;
  }

  .airp-log-entry {
    display: grid;
    gap: 4px;
    padding: var(--airp-space-3) var(--airp-space-4);
    border-top: 1px solid var(--airp-border);
  }

  .airp-log-entry:first-child {
    border-top: 0;
  }

  .airp-log-entry__head {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--airp-text-3);
    font-size: var(--airp-text-xs);
  }

  .airp-log-entry__level {
    font-weight: 700;
    text-transform: uppercase;
  }

  .airp-log-entry--error .airp-log-entry__level {
    color: var(--airp-danger);
  }

  .airp-log-entry--warn .airp-log-entry__level {
    color: var(--airp-warning, #9a6b14);
  }

  .airp-log-entry__msg {
    color: var(--airp-text-1);
    font-size: var(--airp-text-sm);
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
}
@layer app {
  /* Mobile browsers and native WebViews fill their available width. */
  @media (max-width: 767px) { .airp-shell { width: 100%; } }
  .airp-shell.airp-shell-native { width: 100%; }
}

/* worldbook-editor.css */
/* Shared by the character picker and the worldbook app: one group, one entry list. */
.wb-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 12px}.wb-toolbar h3{margin:0}.wb-toolbar-actions{display:flex;gap:4px;flex-wrap:wrap;justify-content:flex-end}
.character-studio .wb-text-action{border:0;background:transparent;color:#73529b;padding:8px;min-height:40px;border-radius:10px;font-size:15px;white-space:nowrap}.character-studio .wb-text-action:hover{background:#eee8f5}
.wb-group-list{display:grid;gap:8px}.character-studio .wb-group-container{border:1px solid #e6ddf0;background:#faf6fd;border-radius:14px;padding:4px 8px 8px;min-width:0}.character-studio .wb-group-row{display:flex;align-items:center;gap:4px;border:0;background:transparent;color:#3a3044;padding:0;border-radius:10px;min-height:44px;box-shadow:none}.character-studio .wb-group-open{flex:1;min-width:0;display:flex;align-items:center;gap:8px;text-align:left;border:0;background:transparent;color:inherit;padding:2px 0;font:inherit;border-radius:10px}.character-studio .wb-group-open:hover{background:#f1e9fa}.character-studio .wb-iconbtn{display:grid;place-items:center;width:32px;height:32px;border:0;border-radius:10px;background:transparent;color:#8b6ca3;padding:0;flex-shrink:0}.character-studio .wb-iconbtn:hover{background:#eee6f7}.wb-group-mark{width:34px;height:34px;display:grid;place-items:center;background:#f1ebf7;border-radius:10px;color:#9273ac;flex-shrink:0}.wb-grow{flex:1;min-width:0}.wb-group-title-line{display:flex;align-items:center;gap:4px;min-width:0}.wb-group-title-line strong{flex:0 1 auto;min-width:0}.wb-group-chevron{flex:0 0 auto;color:#bcaacd;transition:transform var(--airp-dur,.16s) ease}.character-studio .wb-group-open[aria-expanded='false'] .wb-group-chevron{transform:rotate(-90deg);color:#8b6ca3}.wb-group-row strong{display:block;font-size:15px;font-weight:600;color:#5d4676;overflow-wrap:anywhere}.wb-group-row small,.wb-pick-row small{display:block;margin-top:2px;font-size:13px;color:#887990}
.wb-empty{padding:32px 12px;text-align:center;color:#81718b;font-size:15px}.wb-empty p{font-size:13px;color:#9a8ba3}.wb-sheet{padding:4px 16px 16px;color:#3a3044}.wb-pick-row{display:flex;align-items:center;gap:12px;min-height:52px;border-bottom:1px solid #eee8f3;padding:8px 0}.wb-pick-row strong{font-size:15px;font-weight:500}.wb-pick-row input{width:19px;height:19px;accent-color:#805da4;flex-shrink:0}.wb-pick-row:has(input:disabled){opacity:.75}
.character-studio .wb-content{padding-top:12px}.wb-entry{border:1px solid #e7dfed;background:#fff;border-radius:14px;margin-bottom:8px;overflow:hidden}.wb-entry-head{display:flex;align-items:flex-start;gap:8px;padding:4px 8px 4px 4px}.character-studio .wb-entry-open{flex:1;min-width:0;text-align:left;border:0;background:transparent;border-radius:10px;padding:8px 8px 8px;color:#3b3145}.character-studio .wb-entry-open:hover{background:#fcfaff}.wb-entry-open strong{display:block;font-size:15px;font-weight:500;overflow-wrap:anywhere}.wb-entry-trigger{display:block;color:#8b6ca3;font-size:13px;margin-top:4px;overflow-wrap:anywhere}.wb-entry-preview{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;color:#8e8197;font-size:13px;line-height:1.6;margin-top:4px;white-space:pre-wrap}.wb-entry-head .airp-switchbtn{margin:4px 0 0;flex:0 0 auto;--airp-switch-bleed:calc((20px - var(--airp-tap-min)) / 2)}.wb-entry-head .airp-switch{width:34px;height:20px}.wb-entry-head .airp-switch::after{top:2px;left:2px;width:16px;height:16px}.wb-entry-head .airp-switch[data-on='true']::after{transform:translateX(14px)}.wb-entry.is-open .wb-entry-head{border-bottom:1px solid #eee8f4}.wb-entry-editor{padding:2px 12px 12px}.character-studio .wb-entry-editor .cs-field>span{color:#776783;font-size:13px}.character-studio .wb-entry-editor input,.character-studio .wb-entry-editor textarea{background:#fdfbff;border-color:#e7e0ec;border-radius:10px;padding:8px 12px}.character-studio .wb-entry-editor textarea{min-height:190px;line-height:1.8}.wb-trigger{border:0;padding:0;margin:12px 0 0;display:flex;gap:8px 24px;flex-wrap:wrap}.wb-trigger legend{font-size:13px;color:#776783;margin-bottom:4px}.wb-trigger label{display:flex;align-items:center;gap:8px;min-height:32px;font-size:15px}.character-studio .wb-trigger input[type=radio]{width:17px;height:17px;accent-color:#805da4;margin:0;padding:0}.wb-editor-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:12px}.character-studio .wb-editor-actions button{min-height:38px;padding:8px 12px;font-size:13px;border:0;background:#f0eaf6}.character-studio .wb-editor-actions .cs-primary{background:#805da4;color:#fff}.character-studio .wb-editor-actions .wb-delete{margin-left:auto;background:transparent;color:#a26476}.wb-new-title{padding:16px 16px 0}.wb-menu-row{display:flex;width:100%;align-items:center;justify-content:space-between;gap:12px;min-height:56px;font:inherit;border:0;border-bottom:1px solid #eee8f3;background:transparent;color:#55415f;text-align:left;padding:8px 0}
@media(max-width:360px){.wb-toolbar{align-items:flex-start;gap:4px}.wb-toolbar-actions{gap:0}.character-studio .wb-text-action{font-size:13px;padding:8px 4px}.wb-entry-editor{padding-inline:12px}.wb-entry-head{gap:0}.character-studio .wb-group-row{gap:4px}}
.wb-group-container{min-width:0}.wb-inline{padding:0}.wb-head-actions{display:flex;align-items:center;flex-wrap:wrap;gap:2px}.character-studio .wb-head-actions .wb-text-action{min-height:32px;padding:0 8px;font-size:13px}.character-studio .wb-head-actions .wb-mount-toggle{gap:4px}.character-studio .wb-inline .cs-content{padding:0}.wb-inline .wb-entry{margin-top:4px}.wb-group-container .wb-entry:last-child{margin-bottom:0}.wb-group-container>[hidden]{display:none!important}.character-studio .wb-mount-toggle{display:inline-flex;align-items:center;gap:4px}.wb-mount-tip{font-size:13px;line-height:1.65;color:#81718b;margin:0 0 8px}

/* color-picker.css */
@layer components {
.airp-color-control{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;font-size:13px}.airp-color-trigger{display:flex;align-items:center;gap:8px;border:1px solid #e6dded;border-radius:14px;background:#fcfaff;color:#776582;padding:8px 8px;font:13px ui-monospace,monospace}.airp-color-trigger i{width:26px;height:26px;border:1px solid #bcb0c34a;border-radius:10px;flex:none}.airp-sheet:has(.airp-color-picker){color-scheme:only light;background:#fffafd;color:#342842;--airp-text:#342842;--airp-text-2:#776982;--airp-text-3:#8e819a;--airp-border:#e9e1f1;--airp-accent:#9876c2;--airp-accent-soft:#eee5f8}.airp-sheet:has(.airp-color-picker) .airp-btn--primary{background:#9876c2;color:white}.airp-sheet:has(.airp-color-picker) .airp-btn--ghost{color:#776982}.airp-color-picker{padding:4px 16px 12px}.airp-color-plane{height:145px;position:relative;background-image:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,transparent);border-radius:14px;touch-action:none;cursor:crosshair}.airp-color-plane i{position:absolute;width:16px;height:16px;border:2px solid #fff;border-radius:50%;box-shadow:0 0 0 1px #0005;transform:translate(-50%,-50%);pointer-events:none}.airp-color-slider,.airp-color-fine label{display:flex;flex-direction:column;gap:4px;font-size:11px;color:#776982;margin:12px 0 0}.airp-color-picker input[type=range]{width:100%;accent-color:#9876c2;min-height:24px}.airp-color-slider input{appearance:none;border-radius:10px;height:12px;min-height:12px!important;background:linear-gradient(to right,red,#ff0,#0f0,#0ff,#00f,#f0f,red)}.airp-color-slider input::-webkit-slider-thumb{appearance:none;width:22px;height:22px;border:3px solid white;border-radius:50%;background:#9876c2;box-shadow:0 1px 4px #0003}.airp-color-fine{display:grid;grid-template-columns:1fr 1fr;gap:16px}.airp-color-swatches{display:grid;grid-template-columns:repeat(6,1fr);gap:8px;margin:16px 0}.airp-color-swatches button{width:100%;height:32px;border:1px solid #9782aa33;border-radius:10px}.airp-color-swatches button[aria-pressed=true]{outline:2px solid #9876c2;outline-offset:2px}.airp-color-hex{display:flex;align-items:center;gap:12px}.airp-color-hex>i{width:44px;height:44px;border:1px solid #9782aa44;border-radius:14px}.airp-color-hex label{display:flex;flex:1;min-width:0;flex-direction:column;gap:4px;font-size:11px;color:#776982}.airp-color-hex input{width:100%;box-sizing:border-box;background:#fff;border:1px solid #e5dbea;border-radius:10px;padding:8px;color:#342842;font:15px ui-monospace,monospace}.airp-color-picker p{font-size:11px;color:#b34d65}
}

/* primitives.css */
/**
 * Primitive-local styles.
 *
 * Only what global.css does not already provide: the classes below either fill
 * a gap (a part that had no rule yet) or override a global default for a
 * specific primitive, and every value comes from tokens.css. Nothing here
 * restates an existing global rule.
 *
 * The layer order is re-declared so this file also renders correctly when it is
 * loaded on its own (a standalone preview), not only after tokens.css.
 */
@layer reset, base, components, app, overrides;

@layer components {
  /* ── Button ──────────────────────────────────────────────── */
  .airp-btn__label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* ── Avatar ──────────────────────────────────────────────── */
  /* Container tint only: the foreground is a token too, so both colour modes
   * stay legible without a second stylesheet. */
  .airp-avatar--t1 {
    background: var(--airp-accent-soft);
    color: var(--airp-accent-strong);
  }

  .airp-avatar--t2 {
    background: var(--airp-attention-soft);
    color: var(--airp-attention);
  }

  .airp-avatar--t3 {
    background: var(--airp-surface-3);
    color: var(--airp-text);
  }

  .airp-avatar--t4 {
    background: var(--airp-surface-3);
    color: var(--airp-success);
  }

  .airp-avatar__initials {
    line-height: 1;
    letter-spacing: 0.02em;
  }

  /* ── Asset image ─────────────────────────────────────────── */
  /* The three states share a box so a sticker does not resize when its bytes
   * arrive, and so a missing asset is a labelled placeholder rather than a hole
   * in the layout. */
  .airp-assetimage {
    display: block;
    border-radius: var(--airp-radius-md);
    overflow: hidden;
  }

  .airp-assetimage--loading {
    background: var(--airp-surface-3);
    animation: airp-assetimage-pulse 1.2s var(--airp-ease) infinite;
  }

  .airp-assetimage--missing {
    display: grid;
    place-items: center;
    padding: var(--airp-space-1);
    background: var(--airp-surface-3);
    color: var(--airp-text-3);
    font-size: var(--airp-text-2xs);
    text-align: center;
    word-break: break-all;
  }

  @keyframes airp-assetimage-pulse {
    0%,
    100% {
      opacity: 1;
    }
    50% {
      opacity: 0.55;
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .airp-assetimage--loading {
      animation: none;
    }
  }

  /* ── List row ────────────────────────────────────────────── */
  /* ListRow renders spans so it can live inside a <button>; global.css gives
   * them block/flex behaviour that only applies once they are actually boxes. */
  .airp-row__lead {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
  }

  .airp-row__body,
  .airp-row__title,
  .airp-row__sub {
    display: block;
  }

  /* ── Section ─────────────────────────────────────────────── */
  .airp-section__action {
    display: flex;
    align-items: center;
    gap: var(--airp-space-2);
  }

  /* ── Text area ───────────────────────────────────────────── */
  /* A composer has to be able to start at one line; the 96px floor of
   * .airp-field__control--area is for prose fields. */
  .airp-textarea {
    min-height: var(--airp-tap-min);
    line-height: 1.5;
    overflow-y: hidden;
  }

  /* ── Switch ──────────────────────────────────────────────── */
  /* The pill is 30px tall, under the tap minimum. This wrapper grows the hit
   * area to --airp-tap-min and pulls the extra height back out of the layout
   * with a negative margin, so a row containing a switch does not grow. */
  .airp-switchbtn {
    --airp-switch-bleed: calc((30px - var(--airp-tap-min)) / 2);
    display: inline-grid;
    place-items: center;
    min-width: var(--airp-tap-min);
    min-height: var(--airp-tap-min);
    margin: var(--airp-switch-bleed) 0;
    border-radius: var(--airp-radius-full);
  }

  /* ── Chips ───────────────────────────────────────────────── */
  .airp-chip__label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* 44px hit box again, pulled back to roughly the chip's own height so the row
   * keeps its size. Chips are the most mis-tapped control in a chat product. */
  .airp-chip__remove {
    --airp-chip-hit: calc((var(--airp-tap-min) - 16px) / 2);
    display: inline-grid;
    place-items: center;
    width: var(--airp-tap-min);
    height: var(--airp-tap-min);
    padding: var(--airp-chip-hit);
    margin: calc(-1 * var(--airp-chip-hit)) calc(-1 * var(--airp-space-2)) calc(-1 * var(--airp-chip-hit))
      calc(-1 * var(--airp-space-1));
    border-radius: var(--airp-radius-full);
    color: inherit;
    opacity: 0.7;
  }

  .airp-chip__remove:active {
    opacity: 1;
    background: var(--airp-surface-2);
  }

  .airp-chiprow {
    display: flex;
    align-items: center;
    gap: var(--airp-space-2);
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding: var(--airp-space-1) var(--airp-space-4);
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scroll-padding-inline: var(--airp-space-4);
  }

  .airp-chiprow > * {
    flex: 0 0 auto;
  }

  .airp-chiprow--wrap {
    flex-wrap: wrap;
    overflow-x: visible;
  }

  /* ── Sheet ───────────────────────────────────────────────── */
  /* The shell itself contracts to the visible keyboard-free area. A sheet
   * is already inside that area: raising it a second time creates a gap. */
  .airp-sheet {
    bottom: 0;
  }

  .airp-sheet__footer {
    flex: 0 0 auto;
    display: flex;
    gap: var(--airp-space-2);
    padding: var(--airp-space-3) var(--airp-space-4);
    border-top: 1px solid var(--airp-divider);
  }

  .airp-sheet__footer > * {
    flex: 1 1 auto;
  }

  /* ── Action sheet ────────────────────────────────────────── */
  .airp-actions__item {
    width: 100%;
  }

  .airp-actions__label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* The action list owns its insets; cancelling the sheet body's keeps the rows
   * full-width, which is what makes them thumb-reachable. */
  .airp-sheet__body > .airp-actions {
    margin: 0 calc(-1 * var(--airp-space-4)) calc(-1 * var(--airp-space-4));
  }

  /* ── Confirm sheet ───────────────────────────────────────── */
  .airp-confirm__message {
    font-size: var(--airp-text-md);
    line-height: 1.55;
    color: var(--airp-text-2);
  }

  /* ── Prompt sheet ────────────────────────────────────────── */
  /* The rule the value must satisfy sits above the field it applies to, and is
   * dimmer than the value itself so it reads as guidance, not as content. */
  .airp-prompt__description {
    margin-bottom: var(--airp-space-3);
    font-size: var(--airp-text-sm);
    line-height: 1.5;
    color: var(--airp-text-3);
  }

  /* ── Segmented ───────────────────────────────────────────── */
  .airp-segmented {
    display: flex;
    gap: var(--airp-space-1);
    padding: 4px;
    border: 1px solid var(--airp-border);
    border-radius: var(--airp-radius-md);
    background: var(--airp-surface-2);
  }

  .airp-segmented__item {
    flex: 1 1 0;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* Segments never shrink below the tap minimum, even at 3-4 options. */
    min-height: var(--airp-tap-min);
    padding: 0 var(--airp-space-3);
    border-radius: calc(var(--airp-radius-md) - 3px);
    font-size: var(--airp-text-sm);
    font-weight: 600;
    color: var(--airp-text-2);
    transition: background var(--airp-dur-fast) var(--airp-ease),
      color var(--airp-dur-fast) var(--airp-ease);
  }

  .airp-segmented__item[aria-checked='true'] {
    background: var(--airp-surface);
    color: var(--airp-text);
    box-shadow: var(--airp-shadow-1);
  }

  .airp-segmented__label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* ── Scroll area ─────────────────────────────────────────── */
  .airp-scroll {
    flex: 1 1 auto;
    /* Without this a flex child refuses to shrink and never scrolls. */
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  /* ── Theater (楼层内嵌互动界面) ─────────────────────────────
   * The frame is the product's only executing surface; these rules only size it.
   * `contain` is not decoration: without it, a runaway animation inside the
   * sandbox can force layout on the whole conversation. */
  .airp-theater {
    align-self: stretch;
    margin-top: var(--airp-space-2);
    border: 1px solid var(--airp-border);
    border-radius: var(--airp-radius-md);
    background: var(--airp-surface-2);
    overflow: hidden;
    contain: layout paint;
  }

  .airp-theater__head {
    display: flex;
    align-items: center;
    gap: var(--airp-space-2);
    width: 100%;
    padding: var(--airp-space-2) var(--airp-space-3);
    background: none;
    border: 0;
    color: var(--airp-text-2);
    font: inherit;
    font-size: 13px;
    text-align: left;
  }

  .airp-theater__head:active {
    background: var(--airp-surface-3);
  }

  .airp-theater__title {
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
  }

  .airp-theater__chevron {
    flex: 0 0 auto;
    opacity: 0.7;
  }

  .airp-theater__body {
    /* No padding: the frame brings its own, and a doubled inset makes a
     * full-bleed panel look like it has a broken border. */
    padding: 0;
  }

  .airp-theater__frame {
    display: block;
    width: 100%;
    border: 0;
    /* The height is set inline from the sandbox's own report. */
    background: transparent;
  }

  .airp-theater__collapsed {
    padding: 0 var(--airp-space-3) var(--airp-space-2);
    font-size: 11px;
    color: var(--airp-text-3);
  }

  /* ── Offline trace (线下痕迹) ─────────────────────────────── */
  .airp-trace {
    border: 1px solid var(--airp-border);
    border-radius: var(--airp-radius-md);
    background: var(--airp-surface-2);
    overflow: hidden;
  }

  .airp-trace__head {
    display: flex;
    align-items: center;
    gap: var(--airp-space-2);
    width: 100%;
    padding: var(--airp-space-2) var(--airp-space-3);
    background: none;
    border: 0;
    color: var(--airp-text);
    font: inherit;
    font-size: 13px;
    text-align: left;
  }

  .airp-trace__head:active {
    background: var(--airp-surface-3);
  }

  .airp-trace__badge {
    flex: 0 0 auto;
    padding: 1px 4px;
    border-radius: var(--airp-radius-sm);
    background: var(--airp-accent-soft);
    color: var(--airp-accent-strong);
    font-size: 11px;
    font-weight: 700;
  }

  .airp-trace__title {
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
  }

  .airp-trace__when {
    flex: 0 0 auto;
    font-size: 11px;
    color: var(--airp-text-3);
  }

  .airp-trace__chevron {
    flex: 0 0 auto;
    color: var(--airp-text-3);
  }

  .airp-trace__sub {
    display: flex;
    flex-wrap: wrap;
    gap: var(--airp-space-2);
    padding: 0 var(--airp-space-3) var(--airp-space-2);
    font-size: 11px;
    color: var(--airp-text-3);
  }

  .airp-trace__dot::before {
    content: '·';
    margin-right: var(--airp-space-1);
  }

  .airp-trace__body {
    padding: 0 var(--airp-space-3) var(--airp-space-3);
    border-top: 1px solid var(--airp-border);
  }

  .airp-trace__summary {
    margin: var(--airp-space-2) 0 0;
    font-size: 13px;
    line-height: 1.6;
    color: var(--airp-text-2);
  }

  .airp-trace__facts {
    margin: var(--airp-space-2) 0 0;
    padding-left: 1.1em;
    font-size: 13px;
    line-height: 1.7;
    color: var(--airp-text-2);
  }

  .airp-trace__empty {
    margin: var(--airp-space-2) 0 0;
    font-size: 13px;
    color: var(--airp-text-3);
  }
}
