/* ============================================
  SHADOW SYSTEM
   ============================================ */

   :root {
    /* ==========================================
       BOX SHADOW VARIABLES
       ========================================== */
    
    /* Subtle shadows for UI elements */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.07);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 6px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Custom extended shadows */
    --shadow-3xl: 0 35px 60px -15px rgba(0, 0, 0, 0.3);
    --shadow-4xl: 0 45px 80px -20px rgba(0, 0, 0, 0.35);
    
    /* Special shadows */
    --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05);
    --shadow-none: 0 0 #0000;
    
    /* ==========================================
       DROP SHADOW VARIABLES (for images/icons)
       ========================================== */
    
    /* Warm-tinted drop shadows (brand-specific) */
    --drop-shadow-sm: drop-shadow(0 2px 4px rgba(60, 46, 3, 0.2));
    --drop-shadow-md: drop-shadow(0 6px 12px rgba(60, 46, 3, 0.3));
    --drop-shadow-lg: drop-shadow(0 15px 15px rgba(60, 46, 3, 0.5));
    --drop-shadow-xl: drop-shadow(0 25px 25px rgba(60, 46, 3, 0.4));
    --drop-shadow-2xl: drop-shadow(0 25px 25px rgba(60, 46, 3, 0.63));
    
    /* Neutral drop shadows (for general use) */
    --drop-shadow-neutral-sm: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    --drop-shadow-neutral-md: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.15));
    --drop-shadow-neutral-lg: drop-shadow(0 15px 15px rgba(0, 0, 0, 0.2));
    --drop-shadow-neutral-xl: drop-shadow(0 25px 25px rgba(0, 0, 0, 0.25));
    
    /* ==========================================
       HOVER STATE SHADOWS
       ========================================== */
    
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.13);
    --shadow-hover-strong: 0 8px 24px rgba(0, 0, 0, 0.18);
  }
  
  /* ==========================================
     TAILWIND SHADOW UTILITY OVERRIDES
     ========================================== */
  
  .shadow-xs {
    box-shadow: var(--shadow-xs);
  }
  
  .shadow-sm {
    box-shadow: var(--shadow-sm);
  }
  
  .shadow {
    box-shadow: var(--shadow);
  }
  
  .shadow-md {
    box-shadow: var(--shadow-md);
  }
  
  .shadow-lg {
    box-shadow: var(--shadow-lg);
  }
  
  .shadow-xl {
    box-shadow: var(--shadow-xl);
  }
  
  .shadow-2xl {
    box-shadow: var(--shadow-2xl);
  }
  
  .shadow-3xl {
    box-shadow: var(--shadow-3xl);
  }
  
  .shadow-4xl {
    box-shadow: var(--shadow-4xl);
  }
  
  .shadow-inner {
    box-shadow: var(--shadow-inner);
  }
  
  .shadow-none {
    box-shadow: var(--shadow-none);
  }
  
  /* ==========================================
     DROP SHADOW UTILITY CLASSES
     ========================================== */
  
  /* Warm-tinted drop shadows (brand colors) */
  .drop-shadow-sm {
    filter: var(--drop-shadow-sm);
  }
  
  .drop-shadow-md {
    filter: var(--drop-shadow-md);
  }
  
  .drop-shadow-lg {
    filter: var(--drop-shadow-lg);
  }
  
  .drop-shadow-xl {
    filter: var(--drop-shadow-xl);
  }
  
  .drop-shadow-2xl {
    filter: var(--drop-shadow-2xl);
  }
  
  /* Neutral drop shadows */
  .drop-shadow-neutral-sm {
    filter: var(--drop-shadow-neutral-sm);
  }
  
  .drop-shadow-neutral-md {
    filter: var(--drop-shadow-neutral-md);
  }
  
  .drop-shadow-neutral-lg {
    filter: var(--drop-shadow-neutral-lg);
  }
  
  .drop-shadow-neutral-xl {
    filter: var(--drop-shadow-neutral-xl);
  }
  
  .drop-shadow-none {
    filter: drop-shadow(0 0 #0000);
  }
  
  /* ==========================================
     HOVER STATE UTILITIES
     ========================================== */
  
  .hover\:shadow-hover:hover {
    box-shadow: var(--shadow-hover);
  }
  
  .hover\:shadow-hover-strong:hover {
    box-shadow: var(--shadow-hover-strong);
  }
  
  .hover\:shadow-lg:hover {
    box-shadow: var(--shadow-lg);
  }
  
  .hover\:shadow-xl:hover {
    box-shadow: var(--shadow-xl);
  }
  
  /* ==========================================
     SPECIALIZED SHADOW PATTERNS
     ========================================== */
  
  /* Icon/Image shadow (from design) */
  .shadow-icon {
    filter: drop-shadow(0 25px 25px rgba(60, 46, 3, 0.63));
  }
  
  /* Desktop image shadow */
  .shadow-image-desktop {
    filter: drop-shadow(0 25px 25px rgba(60, 46, 3, 0.63));
  }
  
  /* Mobile image shadow */
  .shadow-image-mobile {
    filter: drop-shadow(0 15px 15px rgba(60, 46, 3, 0.5));
  }
  
  /* Card/Button shadow */
  .shadow-card {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
  }
  
  .shadow-card-hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.13);
  }
  
  /* Badge/Pill shadow */
  .shadow-badge {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  }
  
  /* ==========================================
     RENDERING OPTIMIZATIONS
     ========================================== */
  
  /* Apply to elements using drop-shadow to prevent rendering issues */
  .optimize-shadow {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
  }
  
  
  /* ==========================================
     END OF SHADOW SYSTEM
     ========================================== */
/* ==========================================
   FIXELTEXT FONT FAMILY - FORCEFUL VERSION
   ========================================== */

   @font-face {
    font-family: 'FixelText';
    src: url(/assets/FixelText-Light-2aca4af0f911dcb1f539bbedf4809bdeed1fb220c4256d4559693be148bdae87.woff2) format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
  }

  @font-face {
    font-family: 'FixelText';
    src: url(/assets/FixelText-Regular-66039fd0688fd50e702eaf5b2cb1ab065312674a70055a8d3e59a39830a40d3e.woff2) format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
  }

  @font-face {
    font-family: 'FixelText';
    src: url(/assets/FixelText-Medium-8b9431da206f95b48a4e105093933a63e7ac2a798836df1024a5b3fc63b0571c.woff2) format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
  }

  @font-face {
    font-family: 'FixelText';
    src: url(/assets/FixelText-SemiBold-36864e8d81dc615a1e2c7c6745c4561da31796a246bd7717d17e2b4b04641d60.woff2) format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
  }

  @font-face {
    font-family: 'FixelText';
    src: url(/assets/FixelText-Bold-a264e2e63d3047dac4cede0cd56a0a01ada4f55e104d21e201b0e3b57fb1d440.woff2) format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
  }

  /* ==========================================
     CSS CUSTOM PROPERTIES
     ========================================== */

  :root {
    --font-primary: 'FixelText', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-prose: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;

    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
  }

  /* ==========================================
     FORCEFUL APPLICATION - OVERRIDE EVERYTHING
     ========================================== */

  body {
    font-family: var(--font-primary) !important;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  /* Force on all common elements */
  h1, h2, h3, h4, h5, h6,
  p, a, button, input, textarea, select,
  label, span, div, nav, header, footer,
  table, th, td, li, ul, ol,
  section, article, aside, main {
    font-family: var(--font-primary) !important;
  }

  /* Force on all headings */
  h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary) !important;
    font-weight: 600 !important;
  }

  /* Force on form elements */
  input, textarea, select, button {
    font-family: var(--font-primary) !important;
  }

  /* ==========================================
     PROSE EXCEPTION - RICH TEXT EDITOR ONLY
     ========================================== */

  .prose,
  .prose * {
    font-family: var(--font-prose) !important;
  }

  .prose p,
  .prose h1,
  .prose h2,
  .prose h3,
  .prose h4,
  .prose h5,
  .prose h6,
  .prose blockquote,
  .prose li,
  .prose td,
  .prose th,
  .prose a,
  .prose strong,
  .prose em {
    font-family: var(--font-prose) !important;
  }

  /* ==========================================
     UTILITY CLASSES
     ========================================== */

  .font-light { font-weight: 300 !important; }
  .font-regular { font-weight: 400 !important; }
  .font-medium { font-weight: 500 !important; }
  .font-semibold { font-weight: 600 !important; }
  .font-bold { font-weight: 700 !important; }

  .font-primary {
    font-family: var(--font-primary) !important;
  }

  .font-prose {
    font-family: var(--font-prose) !important;
  }
/* ============================================
  BASE COLOR SYSTEM
   ============================================
   CSS custom properties for consistent color usage
   across the application
   ============================================ */

   :root {
    /* ==========================================
       PRIMARY COLORS - Main Actions & Buttons
       ========================================== */
    --primary: #171717;
    --primary-hover: #262626;
    --primary-active: #404040;
    
    /* ==========================================
       SECONDARY COLORS - Brand Gold
       ========================================== */
    --brand-gold: #d6b72f;
    --brand-gold-light: #E4DAAA;
    --brand-gold-dark: #6c5c1c;
    
    /* ==========================================
       ACCENT COLORS - Blue (Interactive States)
       ========================================== */
    --accent-blue: #3B82F6;
    --accent-blue-hover: #2563EB;
    --accent-blue-light: #60A5FA;
    
    /* Additional Accent Colors */
    --accent-amber: #F59E0B;
    --accent-amber-light: #FCD34D;
    
    --accent-green: #10B981;
    --accent-green-light: #34D399;
    
    --accent-red: #EF4444;
    --accent-red-light: #F87171;
    
    --accent-purple: #8B5CF6;
    --accent-purple-light: #A78BFA;
    
    /* ==========================================
       NEUTRAL GRAYS
       ========================================== */
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    
    /* ==========================================
       BACKGROUND COLORS
       ========================================== */
    --bg-base: #f2f2f2;
    --bg-white: #ffffff;
    --bg-surface: rgba(255, 255, 255, 0.9);
    --bg-surface-hover: rgba(255, 255, 255, 0.95);
    --bg-overlay: rgba(0, 0, 0, 0.4);
    
    /* Gray Backgrounds */
    --bg-gray-50: #F9FAFB;
    --bg-gray-100: #F3F4F6;
    --bg-gray-200: #E5E7EB;
    
    /* Accent Backgrounds (Light Tints) */
    --bg-blue-50: rgba(59, 130, 246, 0.05);
    --bg-blue-100: rgba(59, 130, 246, 0.1);
    --bg-gold-50: rgba(214, 183, 47, 0.05);
    --bg-gold-100: rgba(214, 183, 47, 0.1);
    
    /* ==========================================
       BORDER COLORS
       ========================================== */
    --border-light: rgba(229, 231, 235, 0.6);
    --border-default: #D1D5DB;
    --border-gray-200: #E5E7EB;
    --border-gray-300: #D1D5DB;
    --border-focus: var(--accent-blue);
    
    /* ==========================================
       TEXT COLORS
       ========================================== */
    --text-primary: #111827;
    --text-secondary: #6B7280;
    --text-tertiary: #9CA3AF;
    --text-disabled: #D1D5DB;
    --text-inverse: #ffffff;
    
    /* ==========================================
       SHADOW COLORS
       ========================================== */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-custom: 0 12px 32px rgba(0, 0, 0, 0.02), 0 0 0 1px rgba(0, 0, 0, 0.05);
    
    /* ==========================================
       STATE COLORS
       ========================================== */
    --state-success: #10B981;
    --state-warning: #F59E0B;
    --state-error: #EF4444;
    --state-info: #3B82F6;
    
    /* State Backgrounds */
    --state-success-bg: #D1FAE5;
    --state-warning-bg: #FEF3C7;
    --state-error-bg: #FEE2E2;
    --state-info-bg: #DBEAFE;
    
    /* ==========================================
       INTERACTIVE STATES
       ========================================== */
    --hover-overlay: rgba(0, 0, 0, 0.05);
    --active-overlay: rgba(0, 0, 0, 0.1);
    --focus-ring: rgba(59, 130, 246, 0.2);
    --focus-ring-gold: rgba(214, 183, 47, 0.2);
  }
  
  /* ==========================================
     UTILITY CLASSES
     ========================================== */
  .bg-primary { background-color: var(--primary); }
  .bg-brand-gold { background-color: var(--brand-gold); }
  .bg-accent-blue { background-color: var(--accent-blue); }
  
  .text-primary { color: var(--text-primary); }
  .text-secondary { color: var(--text-secondary); }
  .text-brand-gold { color: var(--brand-gold); }
  
  .border-default { border-color: var(--border-default); }
  .border-light { border-color: var(--border-light); }
  
  /* ==========================================
     END OF COLOR SYSTEM
     ========================================== */
/* Move design tokens — the one source of truth for the Nov 2026 redesign.
 * Transcribed from docs/design/redesign-2026-11/move.css (signed off).
 * Light values on :root, dark values on html.dark (existing theme toggle).
 * Component classes live in move/components.css, scoped under `.move`.
 */
:root {
  --paper: #FBFBFA;
  --surface: #FFFFFF;
  --raise: #FFFFFF;
  --fill: #F4F3EF;
  --fill-2: #ECEAE4;
  --ink: #1F1F1F;
  --ink2: #37352F;
  --mute: #787774;
  --mute2: #9B9A97;
  --hair: rgba(55, 53, 47, 0.09);
  --divider: rgba(55, 53, 47, 0.08);
  /* primary button is gray/ink (PR 909) — never violet/indigo */
  --btn: #171717;
  --btn-press: #2A2A2A;
  --btn-ink: #FBFBFA;
  --btn2: #F4F3EF;
  --btn2-ink: #37352F;
  --gold: #B89A23;
  --gold-soft: #E4DAAA;
  --gold-soft-ink: #4A3F10;
  --gold-hi: #D6B72F;
  --success: #2F9D5C;
  --success-fill: #E3F4EA;
  --danger: #D94F4A;
  --danger-fill: #F8E4E3;
  --warning: #D9730D;
  --warning-fill: #FFF6E5;
  --info: #2383E2;
  --info-fill: #E8F0FE;
  --overlay: rgba(31, 31, 31, 0.4);
  --press: rgba(0, 25, 53, 0.04);
  --bar: rgba(251, 251, 250, 0.78);
  --sh-card: 0 1px 2px rgba(0, 25, 53, 0.04);
  --sh-raised: 0 2px 8px rgba(0, 25, 53, 0.08);
  --sh-sheet: 0 -8px 32px rgba(0, 25, 53, 0.16);
  --r-sheet: 26px;
  --r-tile: 18px;
  --r-card: 16px;
  --r-input: 12px;
  --r-icon: 10px;
  --r-pill: 999px;
  --font-move: "FixelText", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, system-ui, sans-serif;
  /* object colors (user-chosen; the only saturated color in chrome) */
  --obj-blue: #3B82F6;
  --obj-green: #10B981;
  --obj-amber: #F59E0B;
  --obj-red: #EF4444;
  --obj-purple: #8B5CF6;
  --obj-teal: #14B8A6;
}

html.dark {
  --paper: #191919;
  --surface: #1C1C1E;
  --raise: #232326;
  --fill: #2A2A2E;
  --fill-2: #33333A;
  --ink: rgba(255, 255, 255, 0.86);
  --ink2: rgba(255, 255, 255, 0.72);
  --mute: #9B9A97;
  --mute2: #75746F;
  --hair: rgba(255, 255, 255, 0.1);
  --divider: rgba(255, 255, 255, 0.08);
  --btn: rgba(255, 255, 255, 0.92);
  --btn-press: rgba(255, 255, 255, 0.78);
  --btn-ink: #191919;
  --btn2: #35353C;
  --btn2-ink: rgba(255, 255, 255, 0.86);
  --gold: #CDB352;
  --gold-soft: rgba(214, 183, 47, 0.22);
  --gold-soft-ink: #E6CF72;
  --gold-hi: #D6B72F;
  --success: #45BDA9;
  --success-fill: rgba(69, 189, 169, 0.14);
  --danger: #F07A7A;
  --danger-fill: rgba(240, 122, 122, 0.14);
  --warning: #E89B52;
  --warning-fill: rgba(232, 155, 82, 0.14);
  --info: #5BA8F5;
  --info-fill: rgba(91, 168, 245, 0.14);
  --overlay: rgba(0, 0, 0, 0.55);
  --press: rgba(255, 255, 255, 0.07);
  --bar: rgba(25, 25, 25, 0.78);
  --sh-card: 0 1px 2px rgba(0, 0, 0, 0.4);
  --sh-raised: 0 2px 8px rgba(0, 0, 0, 0.45);
  --sh-sheet: 0 -8px 32px rgba(0, 0, 0, 0.6);
}
/* Move design-system components (Nov 2026 redesign).
 * Class names follow docs/design/redesign-2026-11/move.css verbatim, scoped
 * under `.move` because daisyUI already defines .btn/.card/.badge globally.
 * Wrap a redesigned region (or the page body) in class="move" to opt in.
 * Tokens come from move/tokens.css; light + dark both work via vars.
 */

.move {
  font-family: var(--font-move);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

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

/* Component display rules must never defeat the hidden attribute. */
.move [hidden] { display: none !important; }

/* ---- icons: one set, 24px grid, 1.8 stroke, rounded ---- */
.move svg.i {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.move svg.i.s20 { width: 20px; height: 20px; }
.move svg.i.s18 { width: 18px; height: 18px; }
.move svg.i.s16 { width: 16px; height: 16px; }

/* ---- type scale (one scale, both platforms) ---- */
.move .t-display { font-size: 32px; line-height: 38px; font-weight: 700; letter-spacing: -0.8px; }
.move .t-title { font-size: 24px; line-height: 30px; font-weight: 700; letter-spacing: -0.4px; }
.move .t-title-s { font-size: 20px; line-height: 26px; font-weight: 700; letter-spacing: -0.3px; }
.move .t-heading { font-size: 17px; line-height: 22px; font-weight: 600; letter-spacing: -0.2px; }
.move .t-body { font-size: 16px; line-height: 24px; }
.move .t-callout { font-size: 15px; line-height: 20px; font-weight: 600; }
.move .t-meta { font-size: 13px; line-height: 18px; color: var(--mute); }
.move .t-label { font-size: 13px; line-height: 16px; font-weight: 600; }
.move .t-section {
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--mute);
}

/* ---- chips (selectable) ---- */
.move .chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--r-pill);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--hair);
  color: var(--ink2);
  background: transparent;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  transition: background 150ms ease-out, box-shadow 150ms ease-out, color 150ms ease-out;
}
.move .chip.on { background: var(--fill); box-shadow: inset 0 0 0 1.5px var(--ink); color: var(--ink); }
.move .chip.going.on { background: var(--success-fill); box-shadow: inset 0 0 0 1.5px var(--success); color: var(--success); }
.move .chip:focus-visible { outline: 2px solid var(--info); outline-offset: 2px; }

/* ---- pills (static status) ---- */
.move .pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 600;
  background: var(--fill);
  color: var(--ink2);
  white-space: nowrap;
}
.move .pill.gold { background: var(--gold-soft); color: var(--gold-soft-ink); }
.move .pill.ok { background: var(--success-fill); color: var(--success); }
.move .pill.warn { background: var(--warning-fill); color: var(--warning); }
.move .pill.info { background: var(--info-fill); color: var(--info); }

.move .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }

/* ---- avatars ---- */
.move .av {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  flex: none;
  background: var(--mute2);
  object-fit: cover;
  overflow: hidden;
}
.move .av.s28 { width: 28px; height: 28px; font-size: 11px; }
.move .av.s24 { width: 24px; height: 24px; font-size: 10px; box-shadow: 0 0 0 2px var(--surface); }
.move .stack { display: flex; }
.move .stack .av { margin-left: -7px; }
.move .stack .av:first-child { margin-left: 0; }

/* ---- surfaces ---- */
.move .card { display: block; background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-card), inset 0 0 0 1px var(--hair); }
.move .tile { width: 32px; height: 32px; border-radius: var(--r-icon); display: flex; align-items: center; justify-content: center; flex: none; }
.move .hr { height: 1px; background: var(--divider); }
.move .hr.inset { margin-left: 48px; }

/* ---- layout helpers ---- */
.move .row { display: flex; align-items: center; gap: 12px; }
.move .grow { flex: 1; min-width: 0; }
.move .ell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.move .src { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--mute); }

/* ---- icon button + badge ---- */
.move .ibtn {
  position: relative;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  border-radius: 50%;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.move .ibtn:active { background: var(--press); }
.move .badge {
  border: 0;
  position: absolute;
  top: 6px;
  right: 5px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--gold-hi);
  color: #1C1910;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px var(--paper);
}
.move .badge:empty { display: none; }
.move .badge.hidden { display: none; }

/* ---- segmented control ---- */
.move .seg { display: flex; background: var(--fill); border-radius: 10px; padding: 3px; height: 40px; }
.move .seg > * {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--mute);
  border-radius: 8px;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-decoration: none;
}
.move .seg > .on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 25, 53, 0.12), 0 0 0 0.5px var(--hair); }
html.dark .move .seg > .on { background: #3A3A40; }

/* ---- checkbox ---- */
.move .cb {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  box-shadow: inset 0 0 0 1.8px var(--mute2);
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: transparent;
  transition: background 150ms ease-out, box-shadow 150ms ease-out;
}
.move .cb.done { background: var(--success); box-shadow: none; color: #fff; }

/* ---- cover images ---- */
.move .cover { border-radius: 12px; position: relative; overflow: hidden; }
.move .cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.5)); }
.move .cover > * { position: relative; z-index: 1; }

/* ---- inputs ---- */
.move .input {
  display: block;
  width: 100%;
  height: 52px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--r-input);
  background: var(--fill);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}
.move .input::placeholder { color: var(--mute2); }
.move .input:focus { outline: 2px solid var(--info); outline-offset: -1px; }
.move .input.sm { height: 40px; font-size: 15px; }
.move textarea.input { height: auto; min-height: 52px; padding: 13px 14px; resize: vertical; }
.move .field-label { display: block; font-size: 13px; line-height: 16px; font-weight: 600; color: var(--ink2); margin: 0 2px 6px; }

/* ---- toggle ---- */
.move .tog { width: 51px; height: 31px; border-radius: 16px; background: var(--fill-2); position: relative; flex: none; border: 0; padding: 0; cursor: pointer; transition: background 150ms ease-out; }
.move .tog i { position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); transition: left 150ms ease-out; }
.move .tog.on { background: var(--success); }
.move .tog.on i { left: 22px; }

/* ---- empty states ---- */
.move .empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 40px 24px; gap: 6px; }
.move .empty .tile { width: 48px; height: 48px; border-radius: var(--r-tile); background: var(--fill); color: var(--mute); margin-bottom: 6px; }
.move .empty .t-heading { color: var(--ink); }
.move .empty .t-meta { max-width: 320px; }

/* ---- skeletons: shaped like the cards they replace, no spinners ---- */
.move .skel {
  position: relative;
  overflow: hidden;
  background: var(--fill);
  border-radius: var(--r-card);
}
.move .skel::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, var(--press), transparent);
  animation: move-shimmer 1.4s ease-out infinite;
}
.move .skel.line { height: 14px; border-radius: 7px; }
.move .skel.line.w40 { width: 40%; }
.move .skel.line.w60 { width: 60%; }
.move .skel.line.w80 { width: 80%; }
.move .skel.av { width: 40px; height: 40px; border-radius: 50%; }
.move .skel.block { height: 112px; }
@keyframes move-shimmer {
  100% { transform: translateX(100%); }
}
@media (prefers-reduced-motion: reduce) {
  .move .skel::after { animation: none; }
}
/* The Home feed (Dave's simplify direction): the original dashboard
 * sidebar beside one feed column (shared/_dash_sidebar_menu, wrapper in
 * home_feed/show), the original home-chip tab bar, a week-strip mini
 * calendar that expands to a month picker, and timeline rows matching the
 * mobile app. Tokens from move/tokens.css; components from
 * move/components.css.
 */

/* ---- page layout: sidebar (from main) + one feed column ---- */
.move.hfeed {
  min-height: 100vh;
  /* Sit on the app's own canvas like every other page (no paper repaint). */
  background: transparent;
  /* Clear the fixed nav island — 0 inside the layout's .mv-content hook,
     which pays the band plus --mv-content-top for every page. */
  padding-top: var(--mv-page-nav-pad, var(--mv-nav-offset, 46px));
}
.move.hfeed .hfeed-center {
  width: 100%;
  max-width: 64rem; /* main's max-w-5xl content column */
  min-width: 0;
  margin: 0 auto;
  padding: 0 0 120px;
}
.move .pad16 { padding: 16px; }
.move .mt8 { margin-top: 8px; }

/* ---- greeting header (above the tabs) ---- */
.move .hfeed-greet { padding: 8px 2px 18px; }
.move .hfeed-greet__title { margin: 0; font-size: 28px; line-height: 34px; font-weight: 700; letter-spacing: -0.6px; color: var(--ink); }
.move .hfeed-greet__meta { margin: 4px 0 0; font-size: 14px; line-height: 20px; color: var(--mute); }

/* ---- day brief under the greeting (DayBrief; home_feed/_day_brief) ----
 * Calm, Notion-like: a hairline-ruled block, no card chrome, ink + gray
 * only. Links are inline ink with a soft underline. */
.move .dbrief { margin: -6px 2px 20px; padding: 12px 0 14px; border-top: 1px solid var(--divider); border-bottom: 1px solid var(--divider); }
.move .dbrief.is-collapsed { padding-bottom: 10px; }
.move .dbrief.is-dismissed { border: 0; padding: 0; margin: -10px 2px 14px; }
.move .dbrief__head { display: flex; align-items: center; gap: 8px; min-height: 24px; }
.move .dbrief__label { flex: 1; min-width: 0; font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--mute); }
.move .dbrief__tools { display: flex; gap: 2px; }
.move .dbrief__tools form { display: inline-flex; margin: 0; }
.move .dbrief__tool, .move .dbrief__restore {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; background: transparent; color: var(--mute); cursor: pointer; font: inherit;
}
.move .dbrief__tool { width: 28px; height: 28px; border-radius: 8px; }
.move .dbrief__tool:hover, .move .dbrief__restore:hover { background: var(--press); color: var(--ink); }
.move .dbrief__tool:focus-visible, .move .dbrief__restore:focus-visible, .move .dbrief__send:focus-visible { outline: 2px solid var(--hair); outline-offset: 1px; }
.move .dbrief__restore { padding: 4px 8px 4px 4px; border-radius: 8px; font-size: 13px; line-height: 18px; }
.move .dbrief__panel { margin-top: 6px; }
.move .dbrief__body { display: block; }
.move .dbrief__text { margin: 0; max-width: 46rem; font-size: 15px; line-height: 24px; color: var(--ink); text-wrap: pretty; }
.move .dbrief__text.is-quiet, .move .dbrief__text.is-fallback { color: var(--mute); }
.move .dbrief-link { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--hair); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.move .dbrief-link:hover { text-decoration-color: currentColor; }

.move .dbrief__shimmer { display: grid; gap: 9px; padding: 4px 0; max-width: 46rem; }
.move .dbrief__shimmer span {
  display: block; height: 12px; border-radius: 6px;
  background: linear-gradient(90deg, var(--fill) 0%, var(--hair) 50%, var(--fill) 100%);
  background-size: 200% 100%; animation: dbrief-shimmer 1.4s ease-in-out infinite;
}
.move .dbrief__shimmer span:nth-child(2) { width: 88%; }
.move .dbrief__shimmer span:nth-child(3) { width: 56%; }
.move .dbrief__shimmer.is-short span:nth-child(2) { width: 60%; }
@keyframes dbrief-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .move .dbrief__shimmer span { animation: none; } }

.move .dbrief__thread { display: grid; gap: 10px; }
.move .dbrief__thread:not(:empty) { margin-top: 12px; }
.move .dbrief__turn { display: grid; gap: 6px; }
.move .dbrief__q { justify-self: end; max-width: 85%; margin: 0; padding: 6px 12px; border-radius: 14px; background: var(--fill); font-size: 14px; line-height: 20px; color: var(--ink); overflow-wrap: anywhere; }
.move .dbrief__a { max-width: 46rem; }
.move .dbrief__a p { margin: 0; font-size: 14px; line-height: 22px; color: var(--ink); }
.move .dbrief__a.is-error p, .move .dbrief__a.is-limited p { color: var(--mute); }

.move .dbrief__ask { position: relative; display: flex; align-items: center; margin-top: 12px; max-width: 46rem; }
.move .dbrief__input {
  flex: 1; min-width: 0; height: 38px; padding: 0 44px 0 14px; border: 1px solid var(--hair); border-radius: var(--r-input);
  background: transparent; font: inherit; font-size: 14px; color: var(--ink);
}
.move .dbrief__input::placeholder { color: var(--mute2, var(--mute)); }
.move .dbrief__input:focus { outline: none; border-color: var(--mute); background: var(--surface); }
.move .dbrief__send {
  position: absolute; right: 5px; top: 5px; width: 28px; height: 28px; border: 0; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--btn); color: var(--btn-ink); cursor: pointer;
}
.move .dbrief__send:hover { background: var(--btn-press); }
@media (max-width: 480px) {
  .move .dbrief { margin-top: -8px; }
  .move .dbrief__text { font-size: 14px; line-height: 22px; }
}

/* ---- composer + feed chips ---- */
.move .hfeed-composer { padding: 18px 20px; margin-bottom: 18px; }
.move .hfeed-composer__input {
  display: block; width: 100%; min-height: 44px; max-height: 240px; resize: none;
  padding: 11px 16px; border: 0; border-radius: 22px; background: var(--fill);
  font: inherit; font-size: 15px; line-height: 22px; color: var(--ink);
}
.move .hfeed-composer__input::placeholder { color: var(--mute2); }
.move .hfeed-composer__input:focus { outline: 2px solid var(--hair); outline-offset: 0; }
.move .hfeed-composer__bar { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.move .hfeed-composer__space select { border: 0; background: transparent; font: inherit; color: inherit; padding: 0 2px; max-width: 160px; cursor: pointer; }
.move .hfeed-composer__previews { display: flex; gap: 6px; margin-top: 8px; }
.move .hfeed-composer__previews:empty { display: none; }
.move .hfeed-composer__previews img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--r-input); }
.move .hfeed-chips { display: flex; gap: 8px; margin: 0 0 16px; overflow-x: auto; scrollbar-width: none; }
.move .hfeed-chips .chip { flex: none; }
.move .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ---- tab bar: Dave's original home-chip style, tokenized ---- */
.move .home-tab-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 0 22px;
  border-bottom: 1px solid var(--divider);
  overflow-x: auto;
}
.move .hfeed-search {
  margin-left: auto; flex: none; display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 14px; border-radius: var(--r-pill);
  box-shadow: inset 0 0 0 1px var(--hair); color: var(--ink2);
  font-size: 14px; font-weight: 600; text-decoration: none; background: var(--surface);
}
.move .hfeed-search:hover { color: var(--ink); text-decoration: none; }
@media (max-width: 480px) { .move .hfeed-search span { display: none; } .move .hfeed-search { padding: 0 10px; } }
.move .home-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  min-height: 44px;
  min-width: 44px;
  font-size: 15px;
  font-weight: 500;
  color: var(--mute);
  background: transparent;
  border: 0;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  /* Never squeezed: the label's overflow:hidden (for the reveal animation)
     drops its min-content width to 0, so a shrinking chip clipped the active
     label ("Overviev" at 390px). The bar scrolls instead if it ever has to. */
  flex-shrink: 0;
  transition: color 0.15s, background 0.15s;
}
.move .home-chip:hover { background: var(--press); color: var(--ink); text-decoration: none; }
.move .home-chip:focus-visible { outline: 2px solid var(--info); outline-offset: 2px; }
.move .home-chip.is-active { color: var(--ink); background: var(--press); }
.move .home-chip svg { color: var(--mute); transition: color 0.15s; flex-shrink: 0; }
.move .home-chip.is-active svg { color: var(--ink); }
.move .home-chip.is-active::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: -1px;
  height: 3px;
  background: var(--gold-hi);
}
.move .home-chip-label {
  display: inline-block;
  max-width: 0;
  margin-left: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: max-width 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              margin-left 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.25s ease;
}
.move .home-chip.is-active .home-chip-label { max-width: 160px; margin-left: 8px; opacity: 1; }
@media (hover: hover) {
  .move .home-chip:hover .home-chip-label { max-width: 160px; margin-left: 8px; opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .move .home-chip-label { transition: none; }
}
/* Phones: a little less side padding so five chips, the active label and
   the search button fit the row without scrolling (still 44px targets). */
@media (max-width: 480px) {
  .move .home-tab-bar { gap: 2px; }
  .move .home-chip { padding: 10px 11px; }
  .move .home-chip.is-active::after { left: 11px; right: 11px; }
}

/* ---- mini calendar: week strip + expanding month ---- */
.move .minical { padding: 2px 0 8px; }
.move .striphead { display: flex; justify-content: space-between; align-items: flex-end; padding: 4px 4px 8px; }
.move .ibtn.s32 { width: 32px; height: 32px; }
.move .ibtn.s36 { width: 36px; height: 36px; border-radius: var(--r-icon); background: var(--fill); }
.move .days { display: flex; justify-content: space-between; }
.move .day { width: 44px; height: 54px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; text-decoration: none; }
.move .day .dow { font-size: 11px; font-weight: 600; color: var(--mute); letter-spacing: 0.3px; }
.move .day .dom { font-size: 16px; font-weight: 600; color: var(--ink); }
.move .day .dd { display: flex; gap: 2px; height: 4px; }
.move .day .dd i { width: 4px; height: 4px; border-radius: 50%; background: var(--mute2); }
.move .day.on { background: var(--btn); }
.move .day.on .dow, .move .day.on .dom { color: var(--btn-ink); }
.move .day.on .dd i { background: var(--gold-hi); }

.move .minical-month {
  overflow: hidden;
  height: 0;
  opacity: 0;
  transform-origin: top center;
  transform: translateY(-8px) scaleY(0.96);
  /* Springs out of the day strip (~420ms); height eases, the rise overshoots. */
  transition: height 420ms cubic-bezier(0.2, 0.8, 0.2, 1),
              opacity 300ms ease,
              transform 420ms cubic-bezier(0.34, 1.36, 0.64, 1);
}
.move .minical-month.is-open { height: auto; opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .move .minical-month { transition: none; transform: none; }
}

/* main's scrolling day strip, polished for Home: sits in the page flow (not
   sticky), on the page's own canvas, scrollbar hidden. */
.move .hfeed-daystrip { position: static; background: transparent; box-shadow: none; padding: 0 0 6px; display: flex; }
.move .hfeed-daystrip__scroll { scrollbar-width: none; }
.move .hfeed-daystrip__scroll::-webkit-scrollbar { display: none; }
.move .hfeed-daystrip .timeline-day-strip__week { border-bottom-color: var(--divider); }
.move .mini-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-top: 6px; font-size: 13px; text-align: center; }
.move .mini-cal > * { height: 36px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 50%; color: var(--ink2); position: relative; text-decoration: none; }
.move .mini-cal a:hover { background: var(--fill); }
.move .mini-cal i { position: absolute; bottom: 3px; width: 4px; height: 4px; border-radius: 50%; background: var(--gold); }
.move .mini-cal .mh { font-size: 11px; font-weight: 600; color: var(--mute); height: 24px; }
.move .mini-cal .mo { color: var(--mute2); opacity: 0.6; }
.move .mini-cal .on { background: var(--btn); color: var(--btn-ink); font-weight: 700; width: 36px; margin: 0 auto; }

/* ---- sections ---- */
.move .brief { padding: 14px 16px; margin: 6px 0 18px; }
.move .allday { display: flex; align-items: center; gap: 10px; margin: 2px 2px 12px; flex-wrap: wrap; }
.move .allday-emoji::before { content: attr(data-emoji); }
.move .allday-emoji { font-size: 13px; line-height: 1; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.move .fsec { margin-bottom: 22px; }
.move .sechead { display: flex; justify-content: space-between; align-items: center; padding: 0 4px 8px; }
.move .list { overflow: hidden; }
.move .li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 52px; }
.move .li.tp { align-items: flex-start; }
.move .li.done .t-body { color: var(--mute2); text-decoration: line-through; }

/* ---- agenda timeline (mobile app parity) ---- */
.move .agenda .slot { display: flex; gap: 10px; margin-bottom: 10px; }
/* Finished rows fade, never hide (EventRow.FINISHED_DIM in the app). */
.move .agenda .slot.is-finished { opacity: 0.65; }
.move .time { width: 44px; flex: none; font-size: 13px; font-weight: 600; color: var(--ink2); padding-top: 12px; text-align: right; line-height: 14px; }
.move .time small { display: block; font-size: 10px; color: var(--mute); font-weight: 600; }
.move .ev { padding: 12px 14px; position: relative; overflow: hidden; }
.move .ev::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--c, var(--obj-blue)); }
.move .now { display: flex; align-items: center; gap: 6px; margin: -2px 0 8px 14px; color: var(--danger); font-size: 11px; font-weight: 700; }
.move .now i { flex: 1; height: 1.5px; background: var(--danger); position: relative; }
.move .now i::before { content: ""; position: absolute; left: -3px; top: -3px; width: 7px; height: 7px; border-radius: 50%; background: var(--danger); }
.move .rsvp { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

/* Day grid (round 3 §2): all 24 hours, plans in their hour, open slots that
   open the create bubble at that time, and the red now line. */
.move .daygrid .hrow { display: flex; gap: 10px; padding: 3px 0; border-top: 1px solid var(--divider); }
.move .daygrid .hrow:first-child { border-top: 0; }
.move .daygrid .hrow .time { padding-top: 11px; }
.move .daygrid .hrow.is-past .time { color: var(--mute2); }
.move .daygrid .hrow.is-now .time { color: var(--danger); }
.move .daygrid .hcol { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; padding: 3px 0; }
.move .daygrid .slot { margin-bottom: 0; }
.move .daygrid .now { margin: 0 0 0 -4px; }
.move .daygrid #scroll-to-now { scroll-margin-top: calc(var(--mv-nav-offset, 0px) + 16px); }
.move .openslot {
  display: flex; align-items: center; gap: 6px; width: 100%; min-height: 40px; padding: 0 12px;
  border: 0; border-radius: var(--r-input); background: transparent; cursor: pointer;
  font: inherit; font-size: 13px; font-weight: 600; text-align: left; color: var(--mute);
  transition: background 150ms ease-out;
}
.move .openslot > * { opacity: 0; transition: opacity 150ms ease-out; }
.move .openslot:hover, .move .openslot:focus-visible { background: var(--fill); }
.move .openslot:hover > *, .move .openslot:focus-visible > * { opacity: 1; }
.move .openslot:focus-visible { outline: 2px solid var(--info); outline-offset: -2px; }
.move .openslot:active { background: var(--press); }
.move .openslot.is-static { cursor: default; }
.move .daygrid .hrow.has-items .openslot { min-height: 30px; }
/* Touch: no hover to reveal the hint, so a faint plus is always there and
   the target is at least 44px. */
@media (hover: none) {
  .move .openslot { min-height: 44px; }
  .move .daygrid .hrow.has-items .openslot { min-height: 40px; }
  .move .openslot > svg { opacity: 0.55; }
}
.move .rsvp form { display: inline-flex; }

/* Event row: 56px cover thumb (photo or colour swatch), title, meta,
   optional space chip, chevron — the app's EventRow. */
.move .evrow { overflow: hidden; }
.move .evrow-main { padding: 10px 12px; text-decoration: none; color: inherit; }
.move .evrow-main:hover { background: var(--press); }
.move .evrow-thumb { width: 56px; height: 56px; border-radius: var(--r-input); object-fit: cover; flex: none; background: var(--fill); }
/* Emoji tiles on timeline rows (BRIEF-accent-emoji §3; AccentHelper
   #item_emoji_tile): calendar items lead with a 36px tile beside the colour
   bar, events without a cover get a 56px tile in the thumb's place, and the
   ticket stub leads with a 36px tile. */
.move .tix .tix-emoji { align-self: center; margin-left: 14px; }
.move .tix .tix-emoji + .tixl { padding-left: 12px; }
.move .evrow-chev { color: var(--mute2); flex: none; }
.move .evrow-foot { padding: 0 12px 12px 80px; }
.move .evrow-foot .rsvp { margin-top: 0; }

/* ---- ticket ---- */
.move .tix { display: flex; background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-card), inset 0 0 0 1px var(--hair); position: relative; overflow: hidden; }
.move .tixl { flex: 1; min-width: 0; padding: 12px 14px; }
.move .tixr { width: 76px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border-left: 1.5px dashed var(--hair); background: var(--fill); text-decoration: none; color: var(--ink); }
.move .qr { width: 40px; height: 40px; border-radius: 10px; background: var(--surface); display: flex; align-items: center; justify-content: center; color: var(--ink); }
.move .tix::before, .move .tix::after { content: ""; position: absolute; right: 68px; width: 16px; height: 16px; border-radius: 50%; background: var(--paper); }
.move .tix::before { top: -8px; }
.move .tix::after { bottom: -8px; }

/* ---- Following: X-style social cards ---- */
/* Feed: the cards sit in one calm surface with soft hairline separators. */
.move .hfeed-social { margin: 0; overflow: hidden; }
.move .hfeed-social .post { padding: 18px 20px; border-bottom-color: var(--divider); }
.move .hfeed-social .post:last-child { border-bottom: 0; }
.move .post { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--divider); }
.move .pb { flex: 1; min-width: 0; }
.move .ph { display: flex; align-items: baseline; gap: 6px; font-size: 15px; }
.move .ph b { font-weight: 600; }
.move .phm { margin-left: auto; color: var(--mute); flex: none; }
.move .act { display: flex; align-items: center; gap: 4px; margin: 0 0 4px; flex-wrap: wrap; }
.move .post .t-body { font-size: 15px; line-height: 21px; }
.move .emb { margin-top: 12px; overflow: hidden; }
/* Event card in the feed (round 3 §3): compact and X-like. A head row
   (date badge, title, meta, save), then the cover INSIDE the content column
   (rounded, 16:9, height-capped), then a compact RSVP row. The card itself
   is capped so nothing reads as a full-bleed hero on desktop. */
.move .evcard, .move .pmedia { max-width: 520px; }
.move .evcard__body { padding: 10px 12px; }
.move .evcard__headrow { display: flex; align-items: center; gap: 6px; }
.move .evcard__head { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; text-decoration: none; color: inherit; }
.move .evcard__head:hover .evcard__title { text-decoration: underline; }
.move .evcard__text { display: flex; flex-direction: column; min-width: 0; }
/* A plan (calendar item) in the feed: the same compact card, all one link. */
.move .feed-plan { display: block; color: inherit; text-decoration: none; }
.move .feed-plan:hover .evcard__title { text-decoration: underline; }
.move .feed-plan:focus-visible { outline: 2px solid var(--hair); outline-offset: 2px; }
.move .evcard__title { font-size: 15px; line-height: 20px; }
.move .evcard__meta { font-size: 13px; line-height: 18px; }
.move .evcard .evcard__date { width: 38px; height: 42px; border-radius: 9px; }
.move .evcard .evcard__date small { font-size: 9px; }
.move .evcard .evcard__date b { font-size: 16px; margin-top: 1px; }
.move .evcard__cover {
  display: block; position: relative; margin-top: 10px; overflow: hidden;
  border-radius: 14px; aspect-ratio: 16 / 9; max-height: 280px; width: 100%;
  background: var(--fill); box-shadow: inset 0 0 0 1px var(--hair);
}
.move .evcard__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.move .evcard__foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.move .evcard__foot > :first-child { margin-top: 0; }
.move .evcard__foot .rsvp { gap: 6px; }
.move .evcard__foot .chip { height: 28px; padding: 0 10px; font-size: 12.5px; gap: 4px; }
.move .evcard__foot .chip .i { width: 14px; height: 14px; }
.move .evcard__save { width: 32px; height: 32px; color: var(--mute); flex: none; }
.move .evcard__save.is-saved { color: var(--ink); }

/* Post media in the feed: one rounded block, 1 / 2 / 3 / 4-up. */
.move .pmedia {
  display: grid; gap: 2px; margin-top: 10px; overflow: hidden; border-radius: 14px;
  aspect-ratio: 16 / 9; max-height: 292px; width: 100%;
  background: var(--fill); box-shadow: inset 0 0 0 1px var(--hair);
  grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr;
}
.move .pmedia--n1 { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.move .pmedia--n2 { grid-template-rows: 1fr; }
.move .pmedia--n3 > :first-child { grid-row: span 2; }
.move .pmedia__tile { position: relative; display: block; min-width: 0; min-height: 0; overflow: hidden; background: var(--fill); }
.move .pmedia__tile img, .move .pmedia__tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.move .pmedia__tile--video { background: #000; }
.move .pmedia--n1 .pmedia__tile--video video { object-fit: contain; }
.move .pmedia__more {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.45); color: #fff; font-size: 20px; font-weight: 700;
}
@media (max-width: 480px) {
  .move .evcard__body { padding: 10px; }
  .move .evcard__cover, .move .pmedia { border-radius: 12px; }
  .move .evcard__foot .chip { height: 32px; }
}
.move .date { background: var(--fill); color: var(--ink); border-radius: 10px; width: 44px; height: 48px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; flex: none; }
.move .date small { font-size: 10px; font-weight: 700; color: var(--danger); }
.move .date b { font-size: 19px; }

/* ---- My stuff ---- */
.move .dig { padding: 14px; margin-bottom: 10px; }
.move .digh { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.move .dl { font-size: 14px; line-height: 20px; color: var(--ink2); padding: 6px 0; border-top: 1px solid var(--divider); }

/* Phones: one-line composer placeholder, tighter card padding. */
.move .hfeed-composer__input::placeholder { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 480px) {
  .move .hfeed-composer { padding: 14px; }
  .move .hfeed-social .post { padding: 14px; }
  .move .hfeed-greet__title { font-size: 24px; line-height: 30px; }
}

/* ---- Timeline "Your day" card → next plan (next-slot controller) ---- */
.move button.brief { display: block; width: 100%; text-align: left; font: inherit; color: inherit; border: 0; cursor: pointer; }
.move .brief--jump:hover { background: var(--fill); }
.move .brief--jump:focus-visible { outline: 2px solid var(--info); outline-offset: 2px; }
.move .brief__jump { color: var(--mute2); flex: none; }
.move .slot:focus { outline: none; }
.move .slot.is-highlighted > .card, .move .slot.is-highlighted > .tix { animation: slot-flash 1.6s ease-out; }
@keyframes slot-flash {
  0%, 35% { box-shadow: var(--sh-card), inset 0 0 0 2px var(--gold-hi); background: var(--gold-soft); }
  100% { box-shadow: var(--sh-card), inset 0 0 0 1px var(--hair); }
}
@media (prefers-reduced-motion: reduce) {
  .move .slot.is-highlighted > .card, .move .slot.is-highlighted > .tix { animation: none; box-shadow: var(--sh-card), inset 0 0 0 2px var(--gold-hi); }
}
/* Create sheet + one-screen event composer (Nov 2026 redesign). */

/* ---- Composer ---- */
.move.composer-page {
  min-height: 100vh;
  background: var(--paper);
  /* 0 inside the layout's .mv-content hook (it pays the island's band). */
  padding-top: var(--mv-page-nav-pad, calc(var(--mv-nav-offset, 64px) - 8px));
}
.move .composer { max-width: 560px; margin: 0 auto; padding: 0 16px 24px; }
.move .composer .mnav {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--divider);
}
.move .composer .glass {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.32);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.move .composer .sw { display: flex; gap: 10px; margin: 12px 2px 4px; }
.move .composer .sw i { width: 24px; height: 24px; border-radius: 50%; display: block; }
.move .composer .sw i.on,
.move .composer .sw input:checked + i { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ink); }
.move .composer .ttl-input {
  width: 100%;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 26px;
  line-height: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--ink);
  margin: 10px 0 2px;
  outline: none;
}
.move .composer .cap-input {
  width: 100%;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 16px;
  line-height: 23px;
  color: var(--ink2);
  margin: 0 0 4px;
  outline: none;
}
.move .composer .ttl-input::placeholder { color: var(--mute2); }
.move .composer .cap-input::placeholder { color: var(--mute2); }
.move .composer .morerow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 10px 14px;
  border: 0;
  border-radius: var(--r-input);
  box-shadow: inset 0 0 0 1px var(--hair);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.move .composer input[type='checkbox'] { width: 18px; height: 18px; accent-color: var(--btn); }
/*
 * Space show (web) — main's layout (origin/main groups/show,
 * _space_cover_header, _group_show_left, _space_tabs), set in the Move
 * tokens: a full-bleed cinematic cover with the identity on it; below, a
 * sticky collapsible left rail flat on the gray surface beside a lifted tab
 * sheet that tucks up over the cover. Everything is scoped under .spx-page so
 * the shared tab bodies (mobile/space_tab, also used by the native app) only
 * change look on this page. Colours come from move/tokens.css; the Space's
 * own colour arrives as --sp-theme (and --sp-theme-ink for text on it).
 */

.spx-page {
  /* Main's Space surface: a slightly deeper gray than --paper so the white
     sheet lifts off it (main used #f1f1f5 / #191919; this is the neutral,
     Notion-gray equivalent). The layout hands this canvas to the root
     (layouts/application: html:not(.dark):has(.spx-page)). */
  --spx-bg: #F2F2F0;
  --spx-rail: 320px;
  --spx-sheet-max: 1024px;
  --spx-sheet-shadow: 0 -8px 28px rgba(15, 20, 25, 0.10);
  position: relative;
  min-height: 100dvh;
  background: var(--spx-bg);
  color: var(--ink);
  font-family: var(--font-move);
  /* fonts.css sets .prose to --font-prose (a serif) with !important; posts
     are set in the UI face here, so retarget the variable. */
  --font-prose: var(--font-move);
}
html.dark .spx-page {
  --spx-bg: #191919;
  --spx-sheet-shadow: 0 -8px 28px rgba(0, 0, 0, 0.45);
}

/* Main's ambient Space-colour glow: two soft blobs of the Space's colour
   behind the surface, as on main's Space and calendar shows. */
.spx-glow {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.spx-glow::before,
.spx-glow::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
}
.spx-glow::before {
  top: 260px;
  left: -160px;
  width: 620px;
  height: 460px;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--sp-theme) 24%, transparent), transparent 76%);
}
.spx-glow::after {
  top: 720px;
  right: -160px;
  width: 720px;
  height: 540px;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--sp-theme) 16%, transparent), transparent 76%);
}
html.dark .spx-glow::before,
html.dark .spx-glow::after { opacity: 0.32; }

/* ── Admin draft / archived banner (groups/shared/_group_page_alert) ──
   Renders just before .spx-page, outside it, on the same canvas. The cover
   runs up under the floating nav island; the banner must not, so it pays
   the nav band plus the shared --mv-content-top gap (16px >= 768, 12px
   below, 0 once the reader hides the nav) — the same first-line gap as the
   forms under .mv-content. The cover after it no longer sits under the
   island, so it stops paying the band (its own breathing room stays). */
.spx-alert {
  background: #F2F2F0;
  padding-top: calc(var(--mv-nav-offset, 0px) + var(--mv-content-top, 0px));
  transition: padding-top .42s cubic-bezier(0.32, 0.72, 0, 1);
}
html.dark .spx-alert { background: #191919; }
@media (prefers-reduced-motion: reduce) {
  .spx-alert { transition: none; }
}
.spx-alert ~ .spx-page .spx-cover__inner { padding-top: 28px; }
.spx-alert ~ .spx-page .spx-cover__actions { top: 12px; }

/* ── Cover header (main's _space_cover_header) ──────────────────────── */

.spx-cover {
  position: relative;
  overflow: hidden;
  background-color: var(--sp-theme);
  background-size: cover;
  background-position: center;
}
.spx-cover--plain {
  background-image: linear-gradient(160deg, var(--sp-theme) 0%, var(--sp-theme) 45%, rgba(0, 0, 0, 0.55) 130%);
}
.spx-cover__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.42) 0%, rgba(0, 0, 0, 0.14) 32%, rgba(0, 0, 0, 0.72) 100%);
  pointer-events: none;
}
.spx-cover__inner {
  position: relative;
  max-width: var(--spx-sheet-max);
  margin: 0 auto;
  /* Clears the floating app bar; the sheet tucks 20px up over the bottom. */
  padding: calc(var(--mv-nav-offset, 0px) + 28px) 24px 48px;
  color: #fff;
}
.spx-cover__actions {
  position: absolute;
  top: calc(var(--mv-nav-offset, 0px) + 12px);
  right: 16px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
}
.spx-icon-btn {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: var(--r-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.12s ease;
}
.spx-icon-btn:hover { background: rgba(0, 0, 0, 0.4); }
.spx-icon-btn:active { transform: scale(0.92); }
/* The "Space info" opener only exists where the sidebar is a drawer. */
.spx-info-btn { display: none; }

.spx-id {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.spx-avatar {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--sp-theme);
  background-size: cover;
  background-position: center;
  color: var(--sp-theme-ink);
  font-size: 26px;
  font-weight: 700;
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.32), 0 10px 24px -8px rgba(0, 0, 0, 0.45);
}
.spx-id__text { flex: 1 1 auto; min-width: 0; padding-top: 2px; }
.spx-title {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
  overflow-wrap: anywhere;
}
.spx-meta {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.72);
}
.spx-handle { color: inherit; text-decoration: none; }
.spx-handle:hover { color: #fff; }
.spx-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}
.spx-blurb { margin-top: 12px; max-width: 760px; }
.spx-blurb p { margin: 0; font-size: 13.5px; line-height: 1.5; color: rgba(255, 255, 255, 0.82); }
.spx-blurb__more {
  margin-left: 4px;
  border: 0;
  padding: 0;
  background: none;
  color: rgba(255, 255, 255, 0.92);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.spx-stats-row {
  margin-top: 20px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 20px;
}
.spx-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}
.spx-stat svg { width: 18px; height: 18px; color: rgba(255, 255, 255, 0.8); }
.spx-stat__label { font-weight: 500; color: rgba(255, 255, 255, 0.7); }
.spx-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
/* button_to wraps its button in a form — keep it inline in the row. */
.spx-actions form { display: inline-flex; margin: 0; }
/* Main's white Join pill on the cover (ink text, never a violet default). */
.spx-join {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 20px 0 16px;
  border: 0;
  border-radius: var(--r-pill);
  background: #fff;
  color: #1F1F1F;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 8px 22px -8px rgba(0, 0, 0, 0.5);
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}
.spx-join svg { width: 16px; height: 16px; }
.spx-join:hover { box-shadow: 0 10px 26px -8px rgba(0, 0, 0, 0.6); }
.spx-join:active { transform: scale(0.97); }
/* Main's frosted Admin / Member chip (also the "Joined" chip after a join). */
.spx-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.2);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
}
.spx-chip svg { width: 14px; height: 14px; }
.spx-report { margin-top: 16px; display: flex; justify-content: flex-end; }

/* ── Layout: left rail + tab sheet ──────────────────────────────────── */

.spx-layout { position: relative; }
.spx-main-col { min-width: 0; }

@media (min-width: 1024px) {
  .spx-layout { display: flex; align-items: flex-start; }
  .spx-main-col { flex: 1 1 auto; }
}

/* ── Tab sheet (main's _space_tabs) ─────────────────────────────────── */

/* The sheet is positioned (no z-index, so no stacking context that would
   trap the composer) and later in the source, so it paints over the cover
   it tucks under. It runs on past the fold with no bottom edge. */
.spx-sheet {
  position: relative;
  max-width: var(--spx-sheet-max);
  min-height: 100dvh;
  margin: -20px auto 0;
  padding-bottom: 96px;
  border-radius: 26px 26px 0 0;
  background: var(--surface);
  box-shadow: var(--spx-sheet-shadow);
}

.spx-tabs {
  position: sticky;
  top: var(--mv-nav-offset, 0px);
  z-index: 25;
  transition: top 0.3s ease;
  border-radius: 26px 26px 0 0;
  border-bottom: 1px solid var(--hair);
  background: color-mix(in srgb, var(--surface) 95%, transparent);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
/* While the floating bar is tucked away the pinned chrome closes the gap. */
html.mv-nav-hidden .spx-tabs { top: 0; }
.spx-tabs__row {
  position: relative;
  display: flex;
  gap: 4px;
  padding: 0 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.spx-tabs__row::-webkit-scrollbar { display: none; }
/* Main's segmented tabs: emoji + label, 14px semibold, padded hit areas, a
   2.5px Space-colour underline that springs between them. */
.spx-tab {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 48px;
  padding: 14px 14px;
  border: 0;
  background: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--mute);
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.15s ease;
}
.spx-tab:hover { color: var(--ink2); }
.spx-tab:focus-visible { outline: 2px solid var(--sp-theme); outline-offset: -4px; border-radius: 10px; }
.spx-tab__emoji { font-size: 15px; line-height: 1; }
/* mobile-segmented-tabs toggles these two utility classes on the active and
   idle tab; map them onto the theme tokens so dark mode reads correctly. */
.spx-page .spx-tab.text-\[\#37352F\] { color: var(--ink); }
.spx-page .spx-tab.text-\[\#787774\] { color: var(--mute); }
.spx-tabs__indicator {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2.5px;
  border-radius: 2px;
  background: var(--sp-theme);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.spx-main { min-width: 0; }

/* Inline composer at the top of the Posts tab (the FAB covers small screens). */
.spx-composer {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--hair);
}
/* Only while the Posts tab is the active one. */
.spx-page:has(.spx-tab[data-space-tab-key="feed"].text-\[\#37352F\]) .spx-composer { display: flex; }
.spx-composer__field {
  flex: 1 1 auto;
  min-width: 0;
  height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--fill);
  color: var(--mute);
  font: inherit;
  font-size: 15px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: text;
}
.spx-composer__field:hover { background: var(--fill-2); }

.spx-panels { min-height: 240px; }

/* Tab bodies: shared markup, page-scoped look. */
.spx-page [id^="space_post_"] { border-color: var(--hair); padding: 16px 20px; }
.spx-page [id^="space_post_"] .prose,
.spx-page [id^="space_post_"] [data-post-body-media-target="body"] { color: var(--ink); }
.spx-page [id^="space_post_"] .text-\[\#37352F\] { color: var(--ink); }
.spx-page #space_posts > [id^="space_post_"]:last-of-type { border-bottom: 0; }

.spx-pinned {
  padding: 16px 20px;
  border-bottom: 1px solid var(--hair);
  background: color-mix(in srgb, var(--gold-soft) 22%, var(--surface));
}
.spx-pinned__badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: var(--r-pill);
  background: var(--gold-soft);
  color: var(--gold-soft-ink);
  font-size: 12px;
  font-weight: 600;
}
.spx-pinned__title { font-size: 15px; font-weight: 600; color: var(--ink); }
.spx-pinned__body { margin-top: 2px; font-size: 15px; line-height: 1.5; color: var(--ink2); }
.spx-pinned__meta { font-size: 13px; color: var(--mute2); }

.spx-page .space-file-card {
  border: 0;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--hair);
  max-width: none;
}
.spx-page .space-file-card:hover { box-shadow: inset 0 0 0 1px var(--hair), var(--sh-raised); }

/* Rail / composer buttons are the shared .mv-btn (move/buttons.css). */

/* ── Left rail (main's _group_show_left sidebar) ────────────────────── */

.spx-side { min-width: 0; padding: 6px 12px 32px; }
.spx-side__head { display: none; }
.spx-side__bar { display: none; }
.spx-compact { display: none; }

/* Main's sidebar section vocabulary, on tokens: emoji-led 11px caps label,
   a quiet hover pill on the head and a chevron that turns as it opens. The
   gspace-* rules inside groups/_group_show_left read these too. */
.spx-page .gspace-side {
  --gs-ink: var(--ink);
  --gs-mute: var(--mute);
  --gs-card: var(--surface);
  --gs-divider: var(--hair);
  --gs-soft: var(--press);
  height: auto;
}
.spx-manage { margin: 0 -12px; }
.spx-manage .gspace-side > .px-3 { padding-top: 0; padding-bottom: 0; }

.spx-sect { margin-top: 2px; }
.spx-sect + .spx-sect { margin-top: 8px; }
.spx-sect__h { margin: 0; font-size: inherit; font-weight: inherit; }
.spx-sect__row { display: flex; align-items: center; gap: 8px; }
.spx-sect__row .spx-sect__head { flex: 1 1 auto; min-width: 0; }
.spx-sect__head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.15s ease;
}
.spx-sect__head:hover { background: var(--press); }
.spx-sect__head:focus-visible { outline: 2px solid var(--sp-theme); outline-offset: 0; }
.spx-cap {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
}
.spx-cap__emoji { font-size: 13px; letter-spacing: 0; }
.spx-sect__chev,
.spx-disclosure__chev {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  color: var(--mute2);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.spx-sect.is-collapsed .spx-sect__chev { transform: rotate(-90deg); }
.spx-sect__body { padding: 2px 0 8px; }
.spx-sect__body[hidden] { display: none; }
.spx-sect__link {
  flex: 0 0 auto;
  padding: 4px 8px;
  border: 0;
  border-radius: 8px;
  background: none;
  font-size: 12px;
  font-weight: 600;
  color: var(--mute);
  cursor: pointer;
}
.spx-sect__link:hover { color: var(--ink2); background: var(--press); }

/* About disclosure — collapsed by default (space_about_controller). */
.spx-about-card .spx-disclosure__chev { transform: rotate(-90deg); }
.spx-about-card.is-open .spx-disclosure__chev { transform: none; }
.spx-about { margin: 0; font-size: 14px; line-height: 1.55; color: var(--ink2); overflow-wrap: anywhere; }
.spx-about-preview {
  margin: 0;
  padding: 0 8px;
  max-height: 1.6em;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}
.spx-about-card.is-open .spx-about-preview { max-height: 0; opacity: 0; }
.spx-collapse {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 0.34s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s ease;
}
.spx-about-card.is-open .spx-collapse { grid-template-rows: 1fr; opacity: 1; }
.spx-collapse__inner { min-height: 0; overflow: hidden; }
.spx-collapse__inner .spx-about { padding: 2px 8px 8px; }
.spx-about-card.is-instant *,
.spx-about-card.is-instant { transition: none !important; }

.spx-small { margin: 10px 0 0; padding: 0 8px; font-size: 12.5px; color: var(--mute); }
.spx-small a { color: inherit; }
.spx-small a:hover { color: var(--ink2); }

.spx-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px;
  border-radius: 11px;
  color: inherit;
  text-decoration: none;
  transition: background-color 0.15s ease;
}
.spx-row:hover { background: var(--press); }
.spx-date {
  flex: 0 0 auto;
  width: 38px;
  height: 42px;
  border-radius: var(--r-icon);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--sp-theme) 14%, var(--surface));
  line-height: 1;
}
.spx-date__mon { font-size: 10px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--mute); }
.spx-date__day { margin-top: 3px; font-size: 16px; font-weight: 700; color: var(--ink); }
.spx-row__text { flex: 1 1 auto; min-width: 0; }
.spx-row__title { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spx-row__sub { display: block; margin-top: 2px; font-size: 12px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spx-going {
  flex: 0 0 auto;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  background: var(--success-fill);
  color: var(--success);
  font-size: 11.5px;
  font-weight: 600;
}
.spx-members { display: flex; flex-wrap: wrap; padding: 2px 8px 0 14px; }
.spx-members > * { margin-left: -6px; border-radius: var(--r-pill); box-shadow: 0 0 0 2px var(--spx-bg); }

.spx-side-toggle { position: absolute; opacity: 0; pointer-events: none; }
.spx-side-backdrop { display: none; }
.spx-side-reveal { display: none; }

/* Desktop: the rail is a sticky, collapsible column (main's lg:w-80). */
@media (min-width: 1024px) {
  .spx-side {
    flex: 0 0 auto;
    width: var(--spx-rail);
    position: sticky;
    top: var(--mv-nav-offset, 0px);
    max-height: calc(100vh - var(--mv-nav-offset, 0px));
    overflow-y: auto;
    scrollbar-width: thin;
    transition: width 0.32s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.22s ease, padding 0.32s ease, top 0.3s ease;
  }
  html.mv-nav-hidden .spx-side { top: 0; max-height: 100vh; }
  .space-sidebar-collapsed > .spx-side { width: 0; padding-left: 0; padding-right: 0; opacity: 0; overflow: hidden; pointer-events: none; }

  .spx-side__bar { display: flex; justify-content: flex-end; padding: 6px 0 2px; }
  .spx-side__hide {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border: 0;
    border-radius: 8px;
    background: none;
    font-size: 12px;
    font-weight: 500;
    color: var(--mute);
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
  }
  .spx-side__hide svg { width: 14px; height: 14px; }
  .spx-side__hide:hover { color: var(--ink2); background: var(--press); }

  /* Main's compact identity: slides in once the cover has scrolled away. */
  .spx-compact {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 4px;
    max-height: 0;
    opacity: 0;
    transform: translateY(-10px);
    overflow: hidden;
    pointer-events: none;
    border-bottom: 1px solid transparent;
    transition: opacity 0.35s ease, transform 0.35s ease, max-height 0.4s ease, padding 0.4s ease, margin 0.4s ease;
  }
  .spx-page.space-header-compact .spx-compact {
    max-height: 120px;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    padding: 8px 0 12px;
    margin-bottom: 8px;
    border-bottom-color: var(--hair);
  }
  .spx-compact__mark {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--sp-theme);
    background-size: cover;
    background-position: center;
    color: var(--sp-theme-ink);
    font-size: 16px;
    font-weight: 700;
    box-shadow: 0 8px 22px -10px var(--sp-theme), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  }
  .spx-compact__text { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
  .spx-compact__name { font-size: 14px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; }
  .spx-compact__meta { display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--mute); white-space: nowrap; overflow: hidden; }
  .spx-compact .spx-pill { padding: 2px 7px; font-size: 10px; }
  .spx-compact .spx-pill--private { background: rgba(184, 154, 35, 0.16); color: #8a7318; }
  .spx-compact .spx-pill--public { background: rgba(52, 199, 89, 0.16); color: #1f7a3d; }
  html.dark .spx-compact .spx-pill--private { color: #e6cf72; }
  html.dark .spx-compact .spx-pill--public { color: #4ade80; }

  /* Main's floating "show sidebar" nub, only while the rail is hidden. */
  .space-sidebar-collapsed > .spx-side-reveal {
    display: inline-flex;
    position: fixed;
    top: 50%;
    left: 8px;
    transform: translateY(-50%);
    z-index: 40;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 52px;
    border: 0;
    border-radius: var(--r-pill);
    color: var(--ink2);
    background: color-mix(in srgb, var(--surface) 86%, transparent);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    box-shadow: 0 6px 18px -8px rgba(15, 23, 42, 0.45), inset 0 0 0 1px var(--hair);
    cursor: pointer;
    transition: transform 0.2s ease;
  }
  .space-sidebar-collapsed > .spx-side-reveal svg { width: 16px; height: 16px; }
  .space-sidebar-collapsed > .spx-side-reveal:hover { transform: translateY(-50%) translateX(1px); }

  /* The floating compose button is for small screens; desktop has the bar. */
  .spx-page .spx-fab { display: none; }
}

/* ── Below 1024px: the rail is a right-hand drawer ──────────────────── */

@media (max-width: 1023px) {
  .spx-info-btn { display: inline-flex; }

  /* `transform: none` when open so anything positioned inside it still
     resolves against the viewport. */
  .spx-side {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 160;
    width: min(380px, 92vw);
    padding: 16px;
    overflow-y: auto;
    background: var(--paper);
    box-shadow: -12px 0 40px rgba(0, 25, 53, 0.18);
    transform: translateX(105%);
    visibility: hidden;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0.28s;
  }
  .spx-page:has(.spx-side-toggle:checked) .spx-side {
    transform: none;
    visibility: visible;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s;
  }
  .spx-side__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
  }
  .spx-side__head strong { font-size: 17px; font-weight: 600; color: var(--ink); }
  .spx-side__head label { color: var(--ink2); background: var(--fill); }
  .spx-manage { margin: 0 -16px; padding: 0 4px; }
  .spx-members > * { box-shadow: 0 0 0 2px var(--paper); }
  .spx-page:has(.spx-side-toggle:checked) .spx-side-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 155;
    background: var(--overlay);
  }
}

@media (max-width: 767px) {
  .spx-cover__inner { padding: calc(var(--mv-nav-offset, 0px) + 52px) 16px 40px; }
  .spx-alert ~ .spx-page .spx-cover__inner { padding-top: 52px; }
  .spx-title { font-size: 21px; }
  .spx-tab { padding: 14px 12px; }
  .spx-tabs__row { gap: 2px; }
  .spx-composer { padding: 12px 16px; }
  .spx-page [id^="space_post_"],
  .spx-pinned { padding: 14px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .spx-disclosure__chev,
  .spx-sect__chev,
  .spx-about-preview,
  .spx-collapse,
  .spx-tabs__indicator,
  .spx-side,
  .spx-compact { transition: none; }
}

/* The tools' DaisyUI modals carry a <label class="modal-backdrop"> that this
   DaisyUI version doesn't style, so it rendered as a stray "Close" item next
   to the dialog. Make it the full-screen click-outside-to-close layer. */
.spx-page .modal > .modal-backdrop,
.spx-modals .modal > .modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  color: transparent;
  cursor: default;
}

/* ── Space admin modals (Space control, Share, Announcement) ───────────────
   Rendered at <body> level by body_portal_controller so they stack above the
   Space tab bar and the nav. Sized to the dynamic viewport and clear of the
   home indicator / Safari's bottom toolbar, so no bar ever covers the sheet. */
.spx-modals .modal {
  z-index: 1000;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.spx-modals .modal-box {
  max-height: calc(100vh - 32px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  max-height: min(85dvh, calc(100dvh - 32px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)));
}
/* While one is open, the floating New-post button steps aside. */
body:has(.spx-modals .modal-toggle:checked) .spx-fab { visibility: hidden; }
/* Global search — the ⌘K palette (shared/_global_search), the /search page
 * and the result rows they share (search/_results).
 * docs/design/web/BRIEF-search.md. Colours are move/tokens.css only: gray /
 * ink chrome, the one saturated colour in a row is the object's own.
 * Light values come from :root, dark from html.dark — nothing here repeats
 * a colour per theme.
 */

/* ---- palette shell ---- */
.gsearch {
  position: fixed; inset: 0; z-index: 2147483000;
  display: flex; align-items: flex-start; justify-content: center;
  padding: min(14vh, 120px) 16px 16px;
  font-family: var(--font-move);
}
.gsearch[hidden] { display: none; }
html.gsearch-open { overflow: hidden; }

.gsearch__backdrop {
  position: absolute; inset: 0;
  background: var(--overlay);
  opacity: 0; transition: opacity .16s ease;
}
.gsearch.is-open .gsearch__backdrop { opacity: 1; }

.gsearch__panel {
  position: relative;
  display: flex; flex-direction: column;
  width: 100%; max-width: 640px; max-height: min(72vh, 620px);
  background: var(--raise); color: var(--ink);
  border-radius: var(--r-card);
  box-shadow: 0 0 0 1px var(--hair), 0 24px 64px -16px rgba(0, 25, 53, 0.28), var(--sh-raised);
  overflow: hidden;
  opacity: 0; transform: translateY(-6px) scale(.985);
  transition: opacity .16s ease, transform .2s cubic-bezier(.16, 1, .3, 1);
}
html.dark .gsearch__panel { box-shadow: 0 0 0 1px var(--hair), 0 24px 64px -16px rgba(0, 0, 0, 0.7), var(--sh-raised); }
.gsearch.is-open .gsearch__panel { opacity: 1; transform: none; }

.gsearch__footer {
  display: flex; align-items: center; gap: 16px; flex: none;
  padding: 9px 16px;
  border-top: 1px solid var(--divider);
  background: var(--paper);
  color: var(--mute); font-size: 12px; line-height: 1;
  white-space: nowrap; overflow: hidden;
}
.gsearch__footer-shortcut { margin-left: auto; }
.gsearch kbd, .gsearch-page kbd, .gsearch-kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; margin: 0 1px;
  border-radius: 5px; background: var(--fill); color: var(--ink2);
  box-shadow: inset 0 0 0 1px var(--hair);
  font: 600 11px/1 var(--font-move);
}

/* ---- field ---- */
.gsearch-field {
  display: flex; align-items: center; gap: 10px; flex: none;
  margin: 0; padding: 0 14px 0 16px; height: 56px;
  border-bottom: 1px solid var(--divider);
}
.gsearch-field__icon { width: 18px; height: 18px; flex: none; color: var(--mute); }
/* !important: the app's global input rules (Tailwind forms, Halo) paint a
   ring and a border on every focused input; the field's own frame is the
   panel, so the input itself must stay bare. */
.gsearch-field .gsearch-field__input,
.gsearch-field .gsearch-field__input:focus {
  flex: 1; min-width: 0; height: 100%;
  margin: 0; padding: 0;
  border: 0 !important; outline: 0 !important; box-shadow: none !important;
  background: transparent !important; border-radius: 0;
  color: var(--ink); font: 500 16px/1.3 var(--font-move);
  -webkit-appearance: none; appearance: none;
}
.gsearch-field__input::placeholder { color: var(--mute2); font-weight: 400; }
.gsearch-field__input::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
.gsearch-field__esc {
  flex: none; height: 22px; padding: 0 7px;
  border: 0; border-radius: 6px; cursor: pointer;
  background: var(--fill); color: var(--mute);
  box-shadow: inset 0 0 0 1px var(--hair);
  font: 600 11px/1 var(--font-move);
}
.gsearch-field__esc:hover { color: var(--ink); background: var(--fill-2); }
.gsearch-field__spinner {
  flex: none; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--hair); border-top-color: var(--mute);
  opacity: 0; transition: opacity .12s ease;
}
.is-loading .gsearch-field__spinner { opacity: 1; animation: gsearch-spin .7s linear infinite; }
@keyframes gsearch-spin { to { transform: rotate(360deg); } }

/* ---- results ---- */
.gsearch-results {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 6px 8px 8px;
  scroll-padding: 40px 0 8px;
}
.gsearch-count {
  margin: 0; padding: 8px 8px 0;
  color: var(--mute2); font: 500 12px/1.2 var(--font-move);
}
.gsearch-group { margin: 0; padding: 0; }
.gsearch-group__title {
  margin: 0; padding: 12px 8px 6px;
  color: var(--mute); font: 600 12px/1 var(--font-move);
  letter-spacing: 0; text-transform: none;
}
.gsearch-row,
.gsearch-row:hover,
.gsearch-row:focus {
  display: flex; align-items: center; gap: 12px;
  min-height: 44px; padding: 6px 8px;
  border-radius: var(--r-icon);
  color: var(--ink); text-decoration: none;
  outline: 0; cursor: pointer;
}
.gsearch-row.is-active { background: var(--fill); }
.gsearch-row:focus-visible { box-shadow: inset 0 0 0 2px var(--ink2); }
.gsearch-row__icon,
.gsearch-row__avatar {
  flex: none; width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9px; overflow: hidden;
  background: var(--fill); color: var(--mute);
  font: 600 12px/1 var(--font-move);
}
.gsearch-row.is-active .gsearch-row__icon,
.gsearch-row.is-active .gsearch-row__avatar { background: var(--fill-2); }
.gsearch-row__icon svg { width: 17px; height: 17px; }
/* An object's own colour, when it has one: a tinted tile and a tinted glyph. */
.gsearch-row__icon[style*="--obj"] {
  color: var(--obj);
  background: color-mix(in srgb, var(--obj) 14%, var(--surface));
}
.gsearch-row.is-active .gsearch-row__icon[style*="--obj"] { background: color-mix(in srgb, var(--obj) 20%, var(--surface)); }
.gsearch-row__avatar { border-radius: 50%; color: var(--gold-soft-ink); background: var(--gold-soft); }
.gsearch-row__avatar img { width: 100%; height: 100%; object-fit: cover; }
.gsearch-row__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.gsearch-row__title,
.gsearch-row__sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gsearch-row__title { color: var(--ink2); font: 500 14.5px/1.3 var(--font-move); }
.gsearch-row__title mark { background: transparent; color: var(--ink); font-weight: 700; }
.gsearch-row__sub { color: var(--mute); font: 400 12.5px/1.3 var(--font-move); }
.gsearch-row__kind {
  flex: none; color: var(--mute2); font: 500 12px/1 var(--font-move);
  opacity: 0; transition: opacity .1s ease;
}
.gsearch-row.is-active .gsearch-row__kind { opacity: 1; }

.gsearch-empty { padding: 28px 16px 30px; text-align: center; }
.gsearch-empty__title { margin: 0 0 6px; color: var(--ink2); font: 600 14.5px/1.3 var(--font-move); }
.gsearch-empty__copy { margin: 0 auto; max-width: 400px; color: var(--mute); font: 400 13px/1.5 var(--font-move); }

/* ---- /search page ---- */
.gsearch-page {
  max-width: 720px; margin: 0 auto;
  padding: 104px 20px 96px;
  font-family: var(--font-move);
}
body.desktop-app .gsearch-page { padding-top: 132px; }
.gsearch-page__title { margin: 0 0 16px; color: var(--ink); font: 700 28px/1.2 var(--font-move); letter-spacing: 0; }
.gsearch-field--page {
  height: 52px; padding: 0 16px;
  border: 0; border-radius: var(--r-input);
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair), var(--sh-card);
}
.gsearch-field--page:focus-within { box-shadow: inset 0 0 0 1.5px var(--ink2), var(--sh-card); }
.gsearch-results--page { overflow: visible; padding: 10px 0 0; }
.gsearch-results--page .gsearch-count { padding-left: 8px; }
.gsearch-results--page .gsearch-row__kind { opacity: 1; }

/* ---- openers ---- */
/* The nav's search button: a quiet circle on the right rail, beside the hide
   chevron — the island itself is left exactly as it was. */
.mv-topbar__search {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: var(--mv-muted, var(--mute)); cursor: pointer;
  transition: background-color .14s ease, color .14s ease;
}
.mv-topbar__search svg { width: 17px; height: 17px; }
.mv-topbar__search:hover,
.mv-topbar__search:focus-visible { background: var(--press); color: var(--mv-ink, var(--ink)); outline: 0; }
.mv-topbar__search:focus-visible { box-shadow: 0 0 0 2px var(--ink2); }

/* Home's search button gains its shortcut hint where there is room for it. */
.move .hfeed-search kbd {
  display: none; align-items: center; height: 18px; padding: 0 5px; margin-left: 2px;
  border-radius: 5px; background: var(--fill); color: var(--mute);
  box-shadow: inset 0 0 0 1px var(--hair);
  font: 600 11px/1 var(--font-move);
}
@media (min-width: 1024px) and (hover: hover) { .move .hfeed-search kbd { display: inline-flex; } }

/* ---- phones: the palette becomes a full-height sheet ---- */
@media (max-width: 640px) {
  .gsearch { padding: 0; }
  .gsearch__panel { max-width: none; max-height: none; height: 100%; border-radius: 0; box-shadow: none; }
  .gsearch-field { padding-top: env(safe-area-inset-top); height: calc(56px + env(safe-area-inset-top)); }
  .gsearch__footer { display: none; }
  .gsearch-results { padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
  .gsearch-row__kind { display: none; }
  .gsearch-page { padding: 84px 16px 96px; }
  .gsearch-page__title { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .gsearch__backdrop, .gsearch__panel, .gsearch-row__kind { transition: none; }
  .gsearch-field__spinner { animation-duration: 1.6s; }
}
.gsearch-page--mobile { padding-top: 56px; }
/* Home settings (docs/design/web/BRIEF-home-settings.md): the cog in the
 * Home header, its popover (a bottom sheet on phones), the reorder lists, and
 * the Overview tab's re-skin of main's widgets. Calm, Notion-like: ink and
 * gray on the Move tokens (move/tokens.css), which already carry dark mode —
 * nothing here hard-codes a light colour.
 */

/* ---- header: greeting left, cog right ---- */
.move .hfeed-greet { display: flex; align-items: flex-start; gap: 12px; }
.move .hfeed-greet__text { flex: 1; min-width: 0; }

.move .hset { position: relative; flex: none; margin-top: -2px; }
.move .hset-cog {
  width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: transparent; color: var(--mute); cursor: pointer;
  transition: background 150ms ease-out, color 150ms ease-out, transform 200ms ease-out;
}
.move .hset-cog:hover, .move .hset.is-open .hset-cog { background: var(--press); color: var(--ink); }
.move .hset-cog:focus-visible { outline: 2px solid var(--info); outline-offset: 2px; }
.move .hset.is-open .hset-cog svg { transform: rotate(30deg); }
.move .hset-cog svg { transition: transform 200ms ease-out; }

/* ---- popover ---- */
.move .hset-pop {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 70;
  width: 400px; max-width: calc(100vw - 32px);
  max-height: min(640px, calc(100vh - 140px)); overflow-y: auto; overscroll-behavior: contain;
  background: var(--raise); border-radius: var(--r-card);
  box-shadow: var(--sh-raised), 0 12px 32px rgba(0, 25, 53, 0.10), inset 0 0 0 1px var(--hair);
  transform-origin: top right;
  animation: hset-in 160ms cubic-bezier(0.16, 1, 0.3, 1);
}
.move .hset-pop[hidden], .move .hset-backdrop[hidden] { display: none; }
.move .hset-backdrop { display: none; }
@keyframes hset-in { from { opacity: 0; transform: scale(0.97) translateY(-4px); } to { opacity: 1; transform: none; } }

.move .hset-loading { display: grid; gap: 10px; padding: 18px; }
.move .hset-loading .skel { height: 44px; border-radius: var(--r-input); }

/* ---- panel ---- */
.move .hset-panel { padding: 6px 0 10px; color: var(--ink); }
.move .hset-head {
  position: sticky; top: 0; z-index: 1;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 10px 10px 18px; background: var(--raise);
  border-bottom: 1px solid var(--divider);
}
.move .hset-title { margin: 0; flex: 1; min-width: 0; font-size: 15px; line-height: 20px; font-weight: 600; letter-spacing: -0.1px; }
.move .hset-status { font-size: 12px; line-height: 16px; color: var(--mute); }
.move .hset-status:empty { display: none; }
.move .hset-x {
  width: 32px; height: 32px; border-radius: 8px; border: 0; background: transparent;
  display: inline-flex; align-items: center; justify-content: center; color: var(--mute); cursor: pointer;
}
.move .hset-x:hover { background: var(--press); color: var(--ink); }
.move .hset-x:focus-visible, .move .hset-move:focus-visible, .move .hset-grip:focus-visible { outline: 2px solid var(--info); outline-offset: 1px; }

.move .hset-error {
  margin: 12px 18px 0; padding: 10px 12px; border-radius: var(--r-input);
  background: var(--danger-fill); color: var(--danger); font-size: 13px; line-height: 18px;
}

.move .hset-form { padding: 4px 0 0; }
.move .hset-row { display: flex; align-items: center; gap: 12px; padding: 12px 18px; }
.move .hset-label { display: block; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ink); cursor: pointer; }
.move .hset-desc { display: block; margin: 2px 0 0; font-size: 12.5px; line-height: 17px; color: var(--mute); }

.move .hset-section { padding: 10px 18px 6px; border-top: 1px solid var(--divider); }
.move .hset-section__title {
  margin: 4px 0 0; font-size: 12px; line-height: 16px; font-weight: 600;
  letter-spacing: .02em; text-transform: uppercase; color: var(--mute);
}
.move .hset-section > .hset-desc { margin: 2px 0 8px; }
.move .hset-details > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 6px; min-height: 28px; }
.move .hset-details > summary::-webkit-details-marker { display: none; }
.move .hset-details > summary::after {
  content: ''; width: 6px; height: 6px; margin-left: 2px;
  border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor;
  transform: rotate(-45deg); transition: transform 150ms ease-out;
}
.move .hset-details[open] > summary::after { transform: rotate(45deg); }

/* ---- switch (checkbox in .tog clothing) ---- */
.move .hset-switch { position: relative; flex: none; display: inline-flex; }
.move .hset-switch input {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1;
}
.move .hset-switch .tog { width: 40px; height: 24px; border-radius: 12px; pointer-events: none; }
.move .hset-switch .tog i { width: 20px; height: 20px; top: 2px; left: 2px; }
.move .hset-switch input:checked + .tog { background: var(--ink); }
.move .hset-switch input:checked + .tog i { left: 18px; }
html.dark .move .hset-switch input:checked + .tog i { background: var(--paper); }
.move .hset-switch input:focus-visible + .tog { outline: 2px solid var(--info); outline-offset: 2px; }

/* ---- reorder lists ---- */
.move .hset-list { list-style: none; margin: 0 -8px; padding: 0; }
.move .hset-item {
  display: flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 4px 8px; border-radius: 10px;
  background: var(--raise);
  transition: background 120ms ease-out, box-shadow 120ms ease-out;
}
.move .hset-item + .hset-item { margin-top: 2px; }
.move .hset-item:hover { background: var(--press); }
.move .hset-item.is-dragging {
  background: var(--surface); z-index: 2; position: relative;
  box-shadow: var(--sh-raised), inset 0 0 0 1px var(--hair);
}
.move .hset-item--widget { align-items: center; padding-top: 8px; padding-bottom: 8px; }
.move .hset-item__label { font-size: 14px; line-height: 20px; font-weight: 500; }
.move .hset-item--plain { padding-left: 8px; }
.move .hset-tag {
  display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: var(--r-pill);
  background: var(--fill); color: var(--mute); font-size: 11px; line-height: 16px; font-weight: 600; vertical-align: 1px;
}
.move .hset-grip {
  flex: none; width: 24px; height: 32px; border: 0; padding: 0; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: var(--mute2); cursor: grab; touch-action: none;
}
.move .hset-grip svg { stroke-width: 3; stroke-linecap: round; }
.move .hset-grip:hover { color: var(--ink2); background: var(--fill); }
.move .hset-item.is-dragging .hset-grip { cursor: grabbing; color: var(--ink); }
.move .hset-moves { flex: none; display: inline-flex; gap: 2px; }
.move .hset-move {
  width: 28px; height: 28px; border: 0; padding: 0; border-radius: 7px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: var(--mute); cursor: pointer;
}
.move .hset-move:hover { background: var(--fill); color: var(--ink); }
.move .hset-move:disabled { opacity: 0.3; cursor: default; background: transparent; }
.move .hset-save { margin: 12px 18px 0; }

/* ---- tab chips wrapper (the bar keeps its own flex/gap) ---- */
.move .home-tab-chips { display: flex; align-items: center; gap: 4px; min-width: 0; }
@media (max-width: 480px) { .move .home-tab-chips { gap: 2px; } }

/* ---- standalone /home/settings page ---- */
/* The layout's .mv-content hook pays the island's band + --mv-content-top;
   --mv-page-nav-pad is 0 inside it, so only the page's own 8px is added. */
.move.hset-page { max-width: 480px; margin: 0 auto; padding: calc(var(--mv-page-nav-pad, calc(var(--mv-nav-offset, 46px) + 16px)) + 8px) 16px 96px; }
.move .hset-page__back { margin: 0 0 12px; font-size: 14px; }
.move .hset-page__back a { color: var(--mute); text-decoration: none; }
.move .hset-page__flash { margin: 0 0 12px; font-size: 13px; color: var(--mute); }
.move .hset-page__flash.is-error { color: var(--danger); }
.move .hset-page__card { overflow: hidden; }
.move .hset-page__card .hset-head { background: var(--surface); }
.move .hset-page__card .hset-item { background: transparent; }

/* ---- phones: the popover becomes a bottom sheet ---- */
@media (max-width: 640px) {
  .move .hset-backdrop {
    display: block; position: fixed; inset: 0; z-index: 69; background: var(--overlay);
    animation: hset-fade 160ms ease-out;
  }
  .move .hset-pop {
    position: fixed; top: auto; left: 0; right: 0; bottom: 0; z-index: 70;
    width: auto; max-width: none; max-height: 86vh;
    border-radius: var(--r-sheet) var(--r-sheet) 0 0;
    box-shadow: var(--sh-sheet);
    padding-bottom: env(safe-area-inset-bottom);
    animation: hset-up 220ms cubic-bezier(0.16, 1, 0.3, 1);
  }
  .move .hset-head { padding-top: 14px; border-radius: var(--r-sheet) var(--r-sheet) 0 0; }
  .move .hset-head::before {
    content: ''; position: absolute; top: 6px; left: 50%; width: 36px; height: 4px; margin-left: -18px;
    border-radius: 2px; background: var(--fill-2);
  }
  .move .hset-move { width: 36px; height: 36px; }
  .move .hset-grip { width: 32px; height: 40px; }
}
@keyframes hset-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes hset-up { from { transform: translateY(24px); opacity: 0.6; } to { transform: none; opacity: 1; } }

/* ---- Overview tab: main's widgets on the Move tokens ---- */
.move .hfeed-overview__head { display: flex; align-items: center; justify-content: space-between; margin: 0 2px 10px; }
.move .hfeed-overview__edit {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px;
  border: 0; border-radius: var(--r-pill); background: transparent; color: var(--mute);
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.move .hfeed-overview__edit:hover { background: var(--press); color: var(--ink); }
.move .hfeed-overview__widgets { display: grid; gap: 8px; }
/* The widgets themselves: move/overview.css (.ow-*). */

@media (prefers-reduced-motion: reduce) {
  .move .hset-pop, .move .hset-backdrop, .move .hset-cog svg { animation: none; transition: none; }
}
/* Home → Overview tab widgets (app/views/home_feed/overview/*), on the Move
 * tokens (move/tokens.css) so light and dark both come from the token swap.
 * Card = .card (components.css); everything inside is .ow-*.
 */
.move .ow-list { display: grid; gap: 10px; }
.move .ow-slot:empty { display: none; }

/* ---- card + collapsible header ---- */
.move .ow-card { overflow: hidden; }
.move .ow-card > summary { list-style: none; }
.move .ow-card > summary::-webkit-details-marker { display: none; }
.move .ow-head {
  display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 14px 0 16px;
  cursor: pointer; user-select: none; color: var(--ink); border-radius: var(--r-card);
}
.move .ow-head:hover { background: var(--press); }
.move .ow-head:focus-visible { outline: 2px solid var(--info); outline-offset: -2px; }
.move .ow-head__emoji { width: 28px; height: 28px; border-radius: 8px; background: var(--fill); display: inline-flex; align-items: center; justify-content: center; font-size: 15px; flex: none; }
.move .ow-head__title { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; letter-spacing: -0.1px; }
.move .ow-head__chev { width: 18px; height: 18px; fill: none; stroke: var(--mute2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1); flex: none; }
.move .ow-card[open] > .ow-head .ow-head__chev { transform: rotate(90deg); }
.move .ow-card[open] > .ow-head { border-radius: var(--r-card) var(--r-card) 0 0; }

.move .ow-body { padding: 4px 16px 14px; border-top: 1px solid var(--divider); }
.move .ow-card--static .ow-body, .move .ow-slot .ow-body { border-top: 0; }

/* ---- rows ---- */
.move .ow-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.move .ow-rows > li + li { border-top: 1px solid var(--divider); }
.move .ow-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 8px; margin: 0 -8px;
  border-radius: var(--r-input); color: var(--ink); text-decoration: none; min-height: 44px;
}
.move .ow-row--top { align-items: flex-start; }
.move .ow-row:hover { background: var(--press); text-decoration: none; color: var(--ink); }
.move .ow-row:focus-visible { outline: 2px solid var(--info); outline-offset: -2px; }
.move .ow-row__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.move .ow-row__title { font-size: 14.5px; line-height: 20px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.move .ow-row__title b { font-weight: 600; }
.move .ow-row__meta { font-size: 13px; line-height: 18px; color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.move .ow-row__av { flex: none; object-fit: cover; }
.move .ow-row__icon { width: 28px; height: 28px; border-radius: 8px; overflow: hidden; flex: none; background: var(--fill); }
.move .ow-row__icon img { width: 100%; height: 100%; object-fit: cover; }
.move .ow-row .pill { flex: none; }

.move .ow-group { margin-top: 10px; }
.move .ow-group:first-child { margin-top: 6px; }
.move .ow-group__title { margin: 0 0 2px; font-size: 12px; font-weight: 600; letter-spacing: 0.02em; color: var(--mute); }
.move .ow-group__title--overdue, .move .ow-due--overdue { color: var(--danger); }
.move .ow-group__title--today, .move .ow-due--today { color: var(--warning); }

.move .ow-empty { margin: 10px 0 2px; font-size: 13.5px; color: var(--mute); }
.move .ow-empty.hidden, .move .ow-note.hidden, .move .ow-more.hidden { display: none; }
.move .ow-more, .move .ow-link {
  display: inline-flex; align-items: center; gap: 4px; margin: 8px 0 0 -8px; padding: 6px 8px;
  border: 0; border-radius: var(--r-pill); background: transparent; color: var(--mute);
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none;
}
.move .ow-more:hover, .move .ow-link:hover { background: var(--press); color: var(--ink); text-decoration: none; }
.move .ow-more svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; transition: transform 0.2s; }
.move .ow-link { display: flex; width: fit-content; }

/* ---- Up next ---- */
.move .ow-cals { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 8px -16px 4px; padding: 2px 16px; }
.move .ow-cals::-webkit-scrollbar { display: none; }
.move .ow-cal {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px;
  border-radius: var(--r-pill); background: var(--fill); color: var(--ink2); font-size: 13px; font-weight: 500; text-decoration: none;
}
.move .ow-cal:hover { background: var(--fill-2); color: var(--ink); text-decoration: none; }
.move .ow-cal__dot { width: 8px; height: 8px; border-radius: 50%; }
.move .ow-up { align-items: stretch; }
.move .ow-up__time { width: 46px; flex: none; display: flex; flex-direction: column; align-items: flex-end; justify-content: center; font-size: 13px; font-weight: 600; color: var(--ink2); font-variant-numeric: tabular-nums; line-height: 1.15; }
.move .ow-up__day { font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mute2); }
.move .ow-up__ampm { font-size: 11px; font-weight: 500; color: var(--mute); }
.move .ow-up__bar { width: 3px; border-radius: 2px; flex: none; }
.move .ow-up.is-finished .ow-row__title { color: var(--mute); }
.move .ow-up.is-finished .ow-up__time, .move .ow-up.is-finished .ow-up__bar, .move .ow-up.is-finished .ow-row__meta { opacity: 0.55; }

/* ---- Tasks ---- */
.move .ow-task__check { width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--mute2); flex: none; }
.move .ow-task__bar { width: 3px; align-self: stretch; border-radius: 2px; flex: none; }
.move .ow-done { display: inline-flex; align-items: center; gap: 6px; margin: 10px 0 0; font-size: 13px; color: var(--mute); }
.move .ow-done__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); }

/* ---- tiles (Bookmarks, Learn) ---- */
.move .ow-tiles { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin: 8px -16px 0; padding: 2px 16px 4px; }
.move .ow-tiles::-webkit-scrollbar { display: none; }
.move .ow-tile {
  flex: none; width: 140px; display: flex; flex-direction: column; gap: 6px; padding: 12px;
  border-radius: var(--r-input); background: var(--fill); color: var(--ink); text-decoration: none;
}
.move .ow-tile:hover { background: var(--fill-2); text-decoration: none; color: var(--ink); }
.move .ow-tile__icon { width: 28px; height: 28px; border-radius: 8px; background: var(--surface); display: inline-flex; align-items: center; justify-content: center; font-size: 15px; overflow: hidden; }
.move .ow-tile__icon img { width: 100%; height: 100%; object-fit: cover; }
.move .ow-tile__title { font-size: 13.5px; font-weight: 600; line-height: 18px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 36px; }
.move .ow-tile__meta { font-size: 12px; color: var(--mute); }
.move .ow-tile--article { width: 220px; padding: 0 0 12px; overflow: hidden; }
.move .ow-tile--article .ow-tile__title, .move .ow-tile--article .ow-tile__meta { padding: 0 12px; }
.move .ow-tile__cover { height: 110px; background: var(--fill-2); display: flex; align-items: center; justify-content: center; font-size: 28px; overflow: hidden; }
.move .ow-tile__cover img { width: 100%; height: 100%; object-fit: cover; }

/* ---- Notes ---- */
.move .ow-search {
  display: flex; align-items: center; gap: 8px; height: 40px; margin: 10px 0 4px; padding: 0 6px 0 12px;
  border-radius: var(--r-input); background: var(--fill); color: var(--mute);
}
.move .ow-search input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 14px; color: var(--ink); outline: none; }
.move .ow-search input::placeholder { color: var(--mute2); }
.move .ow-search:focus-within { box-shadow: inset 0 0 0 1.5px var(--hair), 0 0 0 2px var(--info-fill); }
.move .ow-search__clear { width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; color: var(--mute); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.move .ow-search__clear:hover { background: var(--press); color: var(--ink); }
.move .ow-note__dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex: none; }
.move .ow-note__preview { font-size: 13px; line-height: 18px; color: var(--mute); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.move .ow-note .pill { height: 18px; padding: 0 6px; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.02em; }

/* ---- Move AI ---- */
.move .ow-ai__row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.move .ow-ai__tile { background: var(--fill); font-size: 16px; }
.move .ow-ai__title { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: var(--ink); }
.move .ow-ai__cta { flex: none; gap: 6px; }
.move .ow-ai__cta svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 480px) {
  .move .ow-ai__row { flex-wrap: wrap; align-items: flex-start; }
  .move .ow-ai__row > .grow { flex: 1 1 calc(100% - 56px); }
  .move .ow-ai__cta { margin-left: 44px; }
}

/* ---- Start something inside Overview: the composer is already a card ---- */
.move .ow-start .hfeed-composer { margin: 0; }

/* ---- Clipboard ---- */
.move .ow-clip { padding-top: 10px; }
.move .ow-clip__status { margin: 0 0 8px; font-size: 12.5px; color: var(--mute); }
.move .ow-clip__status.is-error, .move .ow-clip__status.text-red-600 { color: var(--danger); }
.move .ow-clip__status.hidden { display: none; }
.move .ow-clip__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; margin-bottom: 8px; }
.move .ow-clip__tool { height: 30px; min-width: 30px; padding: 0 9px; border: 0; border-radius: 8px; background: transparent; color: var(--ink2); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.move .ow-clip__tool:hover { background: var(--press); color: var(--ink); }
.move .ow-clip__tool--bold { font-weight: 800; }
.move .ow-clip__tool--italic { font-style: italic; }
.move .ow-clip__tool--underline { text-decoration: underline; }
.move .ow-clip__sep { width: 1px; height: 16px; margin: 0 4px; background: var(--hair); }
.move .ow-clip__editor {
  min-height: 8rem; max-height: 20rem; overflow-y: auto; padding: 10px 12px;
  border-radius: var(--r-input); background: var(--paper); box-shadow: inset 0 0 0 1px var(--hair);
  font-size: 14.5px; line-height: 22px; color: var(--ink); outline: none;
}
.move .ow-clip__editor:focus { box-shadow: inset 0 0 0 1.5px var(--mute2); }
.move .ow-clip__editor:empty::before { content: attr(data-placeholder); color: var(--mute2); }
.move .ow-clip__editor a { text-decoration: underline; }
.move .ow-clip__editor ul { list-style: disc; padding-left: 20px; }
.move .ow-clip__editor ol { list-style: decimal; padding-left: 20px; }
.move .ow-clip__files { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.move .ow-clip__files[hidden] { display: none; }
/* Rows the clipboard-note controller builds carry Tailwind classes; the
   container re-skins them onto the tokens. */
.move .ow-clip__files li { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 10px; background: var(--fill); font-size: 12.5px; color: var(--ink2); }
.move .ow-clip__files li img { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; }
.move .ow-clip__files li a { color: var(--ink); font-weight: 600; text-decoration: underline; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.move .ow-clip__files li button { border: 0; background: transparent; color: var(--mute); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.move .ow-clip__files li button:hover { color: var(--danger); }
.move .ow-clip__actions { display: flex; gap: 6px; margin-top: 10px; }

@media (prefers-reduced-motion: reduce) {
  .move .ow-head__chev, .move .ow-more svg { transition: none; }
}
/* Profile accent banner + glows, and emoji item tiles
 * (docs/design/web/BRIEF-accent-emoji.md).
 *
 * The accent values arrive as custom properties on .profile-root
 * (AccentHelper#profile_accent_style): --brand, --pf-banner-a/-b (+ -dark),
 * --pf-banner-ink (+ -dark) and --pf-glow (0, 0.6 or 1).
 *
 * Glows are decoration only: pointer-events none, painted behind their own
 * box (z-index -1 inside an isolated stacking context), no layout of their
 * own, and switched off for reduced motion / reduced transparency.
 */

/* ---- emoji item tiles (list rows) ---- */
.item-emoji-tile {
  display: inline-flex; align-items: center; justify-content: center;
  flex: none; line-height: 1; overflow: hidden;
  background: color-mix(in srgb, var(--tile-tint, #9B9A97) 14%, var(--fill, #F4F3EF));
  box-shadow: inset 0 0 0 1px var(--hair, rgba(55, 53, 47, 0.09));
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-style: normal; text-align: center; user-select: none;
}
html.dark .item-emoji-tile {
  background: color-mix(in srgb, var(--tile-tint, #9B9A97) 18%, #232323);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* ---- profile banner (no cover image) ---- */
.pf-accent-banner {
  position: relative; isolation: isolate;
  height: 120px; border-radius: 16px; overflow: hidden;
  background: var(--pf-banner-a);
}
.pf-accent-banner--gradient {
  background:
    radial-gradient(ellipse 70% 120% at 10% 0%, var(--pf-banner-a), transparent 70%),
    linear-gradient(180deg, var(--pf-banner-a) 0%, var(--pf-banner-b) 100%);
}
html.dark .pf-accent-banner { background: var(--pf-banner-a-dark); }
html.dark .pf-accent-banner--gradient {
  background:
    radial-gradient(ellipse 70% 120% at 10% 0%, var(--pf-banner-a-dark), transparent 70%),
    linear-gradient(180deg, var(--pf-banner-a-dark) 0%, var(--pf-banner-b-dark) 100%);
}
/* Owner shortcut to the accent settings: the only text on the banner, in
   the AA ink AccentColor picked for this banner. */
.pf-accent-banner__chip {
  position: absolute; top: 12px; right: 12px; z-index: 1;
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px; border-radius: 999px;
  font-size: 13px; font-weight: 600; line-height: 1; text-decoration: none;
  color: var(--pf-banner-ink);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pf-banner-ink) 22%, transparent);
}
.pf-accent-banner__chip:hover { background: color-mix(in srgb, var(--pf-banner-ink) 8%, transparent); }
.pf-accent-banner__chip:focus-visible { outline: 2px solid var(--pf-banner-ink); outline-offset: 2px; }
html.dark .pf-accent-banner__chip {
  color: var(--pf-banner-ink-dark);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pf-banner-ink-dark) 24%, transparent);
}
html.dark .pf-accent-banner__chip:focus-visible { outline-color: var(--pf-banner-ink-dark); }

/* ---- avatar glow: a soft halo that stays inside the avatar's own column ---- */
.pf2 .pf-avatar { isolation: isolate; }
.pf2 .pf-accent-glow {
  position: absolute; inset: -12px; z-index: -1; border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--brand) 60%, transparent), transparent 100%);
  opacity: calc(var(--pf-glow, 0) * 0.42);
  filter: blur(10px);
}
html.dark .pf2 .pf-accent-glow {
  background: radial-gradient(closest-side, color-mix(in srgb, var(--brand) 50%, #191919), transparent 100%);
  opacity: calc(var(--pf-glow, 0) * 0.5);
}
/* Edge glow under the banner's bottom edge (inside the banner, clipped). */
.pf-accent-banner::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 60%;
  z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 60% 100% at 20% 100%, color-mix(in srgb, var(--brand) 40%, transparent), transparent 70%);
  opacity: calc(var(--pf-glow, 0) * 0.5);
}

/* ---- faint accent tints on focus / active states and the profile switch ---- */
.profile-root.has-accent-glow .pf2 .pf2-tabs [data-profile-tabs-target="indicator"] {
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12), 0 0 0 1px color-mix(in srgb, var(--brand) 28%, transparent) !important;
}
.profile-root.has-accent-glow .pf2 .pf2-tabs [data-profile-tabs-target="segmentBar"] {
  background: color-mix(in srgb, var(--brand) 6%, rgba(55, 53, 47, 0.06)) !important;
}
html.dark .profile-root.has-accent-glow .pf2 .pf2-tabs [data-profile-tabs-target="segmentBar"] {
  background: color-mix(in srgb, var(--brand) 10%, rgba(255, 255, 255, 0.06)) !important;
}
.profile-root.has-accent-glow .pf2 :is(a, button):focus-visible {
  outline: 2px solid color-mix(in srgb, var(--brand) 55%, var(--pf-ink, #1f1f1f));
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .pf2 .pf-accent-glow, .pf-accent-banner::after { filter: none; transition: none; animation: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .pf2 .pf-accent-glow, .pf-accent-banner::after { display: none; }
}

/* ---- accent settings panel (profiles/_form) ---- */
.accent-swatches { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px 4px; }
.accent-swatch { position: relative; }
.accent-swatch input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.accent-swatch span {
  display: block; width: 32px; height: 32px; border-radius: 999px; cursor: pointer;
  background: var(--sw); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
  transition: box-shadow 150ms ease-out;
}
.accent-swatch input:checked + span { box-shadow: 0 0 0 2px var(--surface, #fff), 0 0 0 4px var(--ink, #1f1f1f); }
.accent-swatch input:focus-visible + span { outline: 2px solid var(--info, #2383E2); outline-offset: 4px; }
.accent-seg { display: inline-flex; padding: 2px; border-radius: 8px; background: var(--fill, #F4F3EF); margin-left: auto; }
.accent-seg label { position: relative; }
.accent-seg input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.accent-seg span {
  display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 6px;
  font-size: 13px; font-weight: 500; color: var(--mute, #787774); cursor: pointer;
}
.accent-seg input:checked + span { background: var(--surface, #fff); color: var(--ink, #1f1f1f); font-weight: 600; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12); }
.accent-seg input:focus-visible + span { outline: 2px solid var(--info, #2383E2); outline-offset: 2px; }
html.dark .accent-seg { background: rgba(255, 255, 255, 0.06); }
html.dark .accent-seg input:checked + span { background: #2c2c2e; }
.accent-preview { height: 56px; margin: 4px 16px 12px; }

/* ---- "View links page" CTA: the shared .mv-btn--accent (move/buttons.css) ----
 * AccentHelper#profile_links_cta_style sets --mv-accent* (and the older
 * --cta-* names) from AccentColor.button: the accent fill, black or white ink
 * at AA, hover / pressed shades that keep AA, and a ring 3:1 on the paper.
 * A private profile seen by a stranger arrives with the neutral default.
 */
.profile-links-cta { width: 100%; }
/* Outranks the generic .profile-root.has-accent-glow .pf2 :is(a, button)
   focus rule above, whose accent/ink mix is not guaranteed 3:1. */
.profile-root.has-accent-glow .pf2 .mv-btn:focus-visible {
  outline: 2px solid var(--mv-btn-ring);
  outline-offset: 2px;
}
/* The emoji is a colour glyph; paint it as a silhouette in the ink so it
   follows the same black/white switch as the label. */
.profile-links-cta__emoji {
  color: transparent;
  text-shadow: 0 0 0 var(--mv-btn-ink, #191919);
}
@media (forced-colors: active) {
  .profile-links-cta__emoji { color: ButtonText; text-shadow: none; }
}
/* Calendar theme on the calendar show page: a subtle wash of the calendar's
 * own colour (selected day, today, now line, header accents, the New event
 * button) and main's soft ambient glow, on top of the calm epic design.
 *
 * One colour drives it. calendars/_calendar_show_desktop puts the inline
 * custom properties from AccentHelper#calendar_theme_style on the page root
 * (.cal-surface.cal-themed):
 *
 *   --cal-theme              the calendar colour (neutral #9B9A97 when unset)
 *   --cal-theme-fill / -ink  a solid theme fill and black-or-white ink at AA
 *   --cal-theme-hover        the fill one step deeper, same ink at AA
 *   --cal-theme-text-light / -dark   the theme as text, AA on that scheme
 *   --cal-theme-line-light / -dark   the theme as a thin mark, 3:1
 *
 * Every tint and the glow are mixed here from --cal-theme with color-mix, at
 * a lower strength in dark mode. Text never sits in raw theme colour: it is
 * either the -text variant or the AA ink on a solid fill.
 *
 * The glow is decoration only: pointer-events none, painted behind the page
 * content (z-index -1 in the surface's isolated stacking context), low
 * opacity, no animation, and gone under prefers-reduced-transparency.
 */

.cal-themed {
  --cal-accent-text: var(--cal-theme-text-light, #37352F);
  --cal-accent-line: var(--cal-theme-line-light, #37352F);
  --cal-tint: color-mix(in srgb, var(--cal-theme, #9B9A97) 10%, transparent);
  --cal-tint-soft: color-mix(in srgb, var(--cal-theme, #9B9A97) 6%, transparent);
  --cal-today-ring: color-mix(in srgb, var(--cal-theme-line-light, #9B9A97) 45%, transparent);
  --cal-glow-a: color-mix(in srgb, var(--cal-theme, #9B9A97) 26%, transparent);
  --cal-glow-b: color-mix(in srgb, var(--cal-theme, #9B9A97) 17%, transparent);
  --cal-halo: color-mix(in srgb, var(--cal-theme, #9B9A97) 30%, transparent);
  --cal-hair-accent: color-mix(in srgb, var(--cal-theme, #9B9A97) 26%, rgba(55, 53, 47, 0.09));
}
html.dark .cal-themed {
  --cal-accent-text: var(--cal-theme-text-dark, rgba(255, 255, 255, 0.92));
  --cal-accent-line: var(--cal-theme-line-dark, rgba(255, 255, 255, 0.82));
  --cal-tint: color-mix(in srgb, var(--cal-theme, #9B9A97) 14%, transparent);
  --cal-tint-soft: color-mix(in srgb, var(--cal-theme, #9B9A97) 8%, transparent);
  --cal-today-ring: color-mix(in srgb, var(--cal-theme-line-dark, #9B9A97) 50%, transparent);
  --cal-glow-a: color-mix(in srgb, var(--cal-theme, #9B9A97) 18%, transparent);
  --cal-glow-b: color-mix(in srgb, var(--cal-theme, #9B9A97) 11%, transparent);
  --cal-halo: color-mix(in srgb, var(--cal-theme, #9B9A97) 20%, transparent);
  --cal-hair-accent: color-mix(in srgb, var(--cal-theme, #9B9A97) 24%, rgba(255, 255, 255, 0.08));
}

/* ---- ambient glow (main's two soft blobs, behind everything) ---- */
.cal-themed .cal-glow {
  display: block;
  position: absolute; inset: 0; z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.cal-themed .cal-glow::before,
.cal-themed .cal-glow::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(72px);
}
.cal-themed .cal-glow::before {
  top: -180px; left: -160px;
  width: 640px; height: 440px;
  background: radial-gradient(closest-side, var(--cal-glow-a), transparent 76%);
}
.cal-themed .cal-glow::after {
  bottom: -260px; right: -140px;
  width: 760px; height: 560px;
  background: radial-gradient(closest-side, var(--cal-glow-b), transparent 76%);
}
/* A faint theme halo around the main card (main's grid lift glow). */
.cal-v2.cal-themed .cal-card {
  box-shadow: inset 0 0 0 1px var(--cv-hair), 0 0 56px -26px var(--cal-halo);
}

/* ---- header accents ---- */
.cal-v2.cal-themed .cal-topbar { box-shadow: inset 0 -1px 0 var(--cal-hair-accent); }
.cal-themed .cal-topbar .cal-segmented__item.is-active {
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12), 0 0 0 1px var(--cal-today-ring);
}
.cal-themed .cal-rail__date small { color: var(--cal-accent-text); }

/* ---- Month: today's cell gets a soft wash + theme ring (inline var) ---- */
html .cal-v2.cal-themed .cal-today-cell { background-color: var(--cal-tint-soft); }

/* ---- Week: today's column, its weekday label and the now line ---- */
html .cal-v2.cal-themed .week-today-col { background-color: var(--cal-tint-soft); }
html .cal-v2.cal-themed .week-day-headers .week-today-col > span:first-child { color: var(--cal-accent-text); }
html .cal-v2.cal-themed .week-now-line,
html .cal-v2.cal-themed .week-now-line .week-now-dot { background-color: var(--cal-accent-line); }

/* ---- Day: the hour timeline's now line ---- */
html .cal-v2.cal-themed .now-line { border-top-color: var(--cal-accent-line); }
html .cal-v2.cal-themed .now-line::before { background: var(--cal-accent-line); }

/* ---- Phones: the date strip's today / selected pill ---- */
html .cal-v2.cal-themed .cal-v2__strip,
html.dark .cal-v2.cal-themed .cal-v2__strip {
  --timeline-brand: var(--cal-theme-fill);
  --timeline-inverse: var(--cal-theme-ink);
}
html .cal-v2.cal-themed .cal-v2__strip .timeline-day-pill.is-today:not(.is-active) .dom { color: var(--cal-accent-text); }

/* ---- New event button (calendars/_calendar_new_event_button) ----
 * A .mv-btn--accent.mv-btn--sm (move/buttons.css): the calendar colour as
 * the fill with black or white ink at AA, mapped from the theme properties
 * below. These rules only place it: icon-only in the slim rail, icon +
 * label when open, full width in the phone drawer. */
.cal-themed {
  --mv-accent: var(--cal-theme-fill, #9B9A97);
  --mv-accent-ink: var(--cal-theme-ink, #191919);
  --mv-accent-hover: var(--cal-theme-hover, var(--cal-theme-fill, #9B9A97));
  --mv-accent-active: var(--cal-theme-hover, var(--cal-theme-fill, #9B9A97));
  --mv-accent-ring: var(--cal-theme-line-light, #37352F);
  --mv-accent-ring-dark: var(--cal-theme-line-dark, rgba(255, 255, 255, 0.82));
}
.cal-new-btn { overflow: hidden; }
.cal-new-btn__icon { flex: none; }

/* Rail: one element that rides the panel's width (--rail-on is 0 slim, 1
   open; see the rail rules in calendars/_calendar_show_desktop). It sits
   under the calendar's identity block: below its tile when slim, below the
   tile + name + meta band when open. */
.cal-new-btn--rail {
  position: absolute; z-index: 3;
  top: calc(100px + 16px * var(--rail-on, 0));
  left: calc(10px + 2px * var(--rail-on, 0));
  width: calc(36px + (var(--rail-open-w, 296px) - 60px) * var(--rail-on, 0));
  justify-content: flex-start; padding: 0 0 0 10px;
  transition: width 0.24s cubic-bezier(0.2, 0.8, 0.2, 1) 0.14s, left 0.24s ease 0.14s, top 0.24s ease 0.14s, background-color 0.15s ease;
}
.cal-new-btn--rail .cal-new-btn__label {
  opacity: var(--rail-on, 0);
  transition: opacity 0.18s ease 0.14s;
}
.cal-rail.is-open .cal-new-btn--rail,
.cal-rail.is-pinned .cal-new-btn--rail,
.cal-rail:has(:focus-visible) .cal-new-btn--rail { transition-delay: 0s, 0s, 0s, 0s; }
.cal-rail.is-open .cal-new-btn--rail .cal-new-btn__label,
.cal-rail:has(:focus-visible) .cal-new-btn--rail .cal-new-btn__label { transition-delay: 0.04s; }
@media (hover: hover) and (pointer: fine) {
  .cal-rail:hover .cal-new-btn--rail { transition-delay: 0.06s, 0.06s, 0.06s, 0s; }
  .cal-rail:hover .cal-new-btn--rail .cal-new-btn__label { transition-delay: 0.1s; }
}
/* Room for the button under the identity block, slim and open. */
.cal-rail.has-new-btn .cal-rail__peek { padding-top: 148px; }
.cal-rail.has-new-btn .cal-rail__full { padding-top: 164px; }

/* Phone drawer: full width under the drawer's header. */
.cal-left__new { padding: 6px 4px 10px; }
.cal-new-btn--drawer { display: flex; width: 100%; height: 40px; }

@media (prefers-reduced-motion: reduce) {
  .cal-new-btn,
  .cal-new-btn--rail,
  .cal-new-btn--rail .cal-new-btn__label { transition: none !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .cal-themed .cal-glow { display: none; }
  .cal-v2.cal-themed .cal-card { box-shadow: inset 0 0 0 1px var(--cv-hair); }
}
/* Start something (docs/design/web/BRIEF-start-something.md).
 * The Home composer's slim row → options → quick forms, its ≤768px bottom
 * sheet, and the onboarding modal's open/close motion.
 * Calm gray/ink on the Move tokens (tokens.css flips them for dark); the
 * only accent is the gold "Make this an event?" suggestion. Every motion is
 * 150–250ms ease-out (the sheet a spring) and drops out under
 * prefers-reduced-motion.
 */
.ss { --ss-ease: cubic-bezier(0.2, 0.8, 0.2, 1); --ss-spring: cubic-bezier(0.32, 0.72, 0, 1); font-family: var(--font-move); color: var(--ink); }
.ss [hidden] { display: none !important; }
.ss-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.ss-grow { flex: 1 1 auto; }

/* ---- avatar (kept on the left in every state) ---- */
.ss-av {
  width: 40px; height: 40px; flex: none; border-radius: 50%; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ink2); color: var(--paper); font-size: 15px; font-weight: 600;
}
.ss-av img { width: 100%; height: 100%; object-fit: cover; }
.ss-av--lg { width: 44px; height: 44px; }

/* ---- resting row ---- */
.ss-head { display: flex; align-items: center; gap: 12px; }
.ss-prompt {
  flex: 1 1 auto; min-width: 0; display: block; height: 44px; min-height: 44px; max-height: 44px; resize: none; overflow: hidden;
  padding: 11px 16px; border: 0; border-radius: 22px; background: var(--fill);
  font: inherit; font-size: 15px; line-height: 22px; color: var(--ink);
  transition: background 150ms var(--ss-ease);
}
.ss-prompt::placeholder { color: var(--mute2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-prompt:hover { background: var(--fill-2); }
.ss-prompt:focus { outline: 2px solid var(--hair); outline-offset: 0; }
.ss-plus, .ss-back, .ss-close {
  flex: none; width: 36px; height: 36px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: var(--ink2); box-shadow: inset 0 0 0 1px var(--hair);
  transition: background 150ms var(--ss-ease), transform 200ms var(--ss-ease);
}
.ss-back, .ss-close { width: 32px; height: 32px; box-shadow: none; background: var(--fill); }
.ss-plus:hover, .ss-back:hover, .ss-close:hover { background: var(--fill-2); }
.ss-plus:focus-visible, .ss-back:focus-visible, .ss-close:focus-visible, .ss-opt:focus-visible,
.ss-submit:focus-visible, .ss-suggest:focus-visible, .ss-more:focus-visible, .ss-chip:has(:focus-visible), button.ss-chip:focus-visible { outline: 2px solid var(--info); outline-offset: 2px; }
.ss-plus svg, .ss-back svg, .ss-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ss-plus svg { transition: transform 200ms var(--ss-ease); }
.ss.is-open .ss-plus svg { transform: rotate(45deg); }

/* ---- expanding panel (desktop): height + opacity ---- */
.ss-panel {
  display: grid; grid-template-rows: 0fr; opacity: 0;
  transition: grid-template-rows 210ms var(--ss-ease), opacity 180ms var(--ss-ease);
}
.ss.is-open .ss-panel { grid-template-rows: 1fr; opacity: 1; }
.ss-panel__inner { min-height: 0; overflow: hidden; }
.ss.is-open .ss-panel__inner { overflow: visible; }
.ss-backdrop, .ss-sheet-head { display: none; }

/* ---- options ---- */
.ss-menu { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 0 2px 52px; }
.ss-opt {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 10px;
  border: 0; border-radius: var(--r-input); background: var(--fill); color: var(--ink);
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-align: left;
  opacity: 0; transform: translateY(6px) scale(0.98);
  transition: opacity 180ms var(--ss-ease), transform 200ms var(--ss-ease), background 120ms ease;
  transition-delay: calc(var(--i, 0) * 30ms);
}
.ss:not(.is-open) .ss-opt { transition-delay: calc((4 - var(--i, 0)) * 20ms); }
.ss.is-open .ss-opt { opacity: 1; transform: none; }
.ss-opt:hover { background: var(--fill-2); }
.ss-opt:active { transform: scale(0.98); }
.ss-opt__emoji { font-size: 18px; line-height: 1; }
.ss-opt__text { display: flex; flex-direction: column; min-width: 0; }
.ss-opt__hint { display: none; font-size: 12.5px; font-weight: 500; color: var(--mute); }
.ss.has-form .ss-menu { display: none; }

/* ---- quick forms ---- */
.ss-forms { padding-left: 52px; }
.ss-form { padding: 14px 0 2px; }
.ss-form__head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.ss-form__emoji { font-size: 18px; line-height: 1; }
.ss-form__title { margin: 0; font-size: 15px; line-height: 20px; font-weight: 600; color: var(--ink); }
.ss-form__body { margin: 0; }
.ss-label { display: block; margin: 12px 2px 6px; font-size: 12.5px; line-height: 16px; font-weight: 600; color: var(--mute); }
.ss-label--inline { margin: 0 2px 0 0; }
.ss-input, .ss-select {
  display: block; width: 100%; height: 40px; padding: 0 12px; border: 0; border-radius: var(--r-input);
  background: var(--fill); color: var(--ink); font: inherit; font-size: 15px;
}
.ss-input::placeholder { color: var(--mute2); }
.ss-input:focus, .ss-select:focus { outline: 2px solid var(--info); outline-offset: -1px; }
.ss-textarea { height: auto; min-height: 76px; padding: 10px 12px; line-height: 22px; resize: vertical; }
.ss-select { width: auto; max-width: 220px; height: 34px; border-radius: var(--r-pill); font-size: 13.5px; font-weight: 600; cursor: pointer; }
.ss-select--block { width: 100%; max-width: none; height: 40px; border-radius: var(--r-input); }
.ss-select--emoji { width: 64px; font-size: 18px; height: 40px; border-radius: var(--r-input); }
.ss-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.ss-row { display: flex; align-items: center; gap: 8px; }
.ss-row--wrap { flex-wrap: wrap; margin-top: 10px; }
.ss-row--top { align-items: flex-start; gap: 10px; }
.ss-fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.ss-fieldset legend { padding: 0; }
.ss-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 0;
  border-radius: var(--r-pill); background: var(--fill); color: var(--ink2); font: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; position: relative; transition: background 120ms ease, box-shadow 120ms ease;
}
.ss-chip:hover { background: var(--fill-2); }
.ss-chip--radio:has(input:checked) { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.ss-swatches { gap: 10px; }
.ss-swatch { position: relative; width: 28px; height: 28px; border-radius: 50%; background: var(--sw); cursor: pointer; transition: transform 150ms var(--ss-ease); }
.ss-swatch:has(input:checked) { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink); }
.ss-swatch:has(input:focus-visible) { outline: 2px solid var(--info); outline-offset: 4px; }
.ss-swatch:hover { transform: scale(1.08); }
.ss-hint { margin: 6px 2px 0; font-size: 12.5px; line-height: 17px; color: var(--mute); }
.ss-nopost { margin: 10px 0 0 52px; }
.ss-previews { display: flex; gap: 6px; margin-top: 8px; }
.ss-previews:empty { display: none; }
.ss-previews img, .ss-previews video { width: 64px; height: 64px; object-fit: cover; border-radius: var(--r-input); }
.ss-errors:empty { display: none; }
.ss-errors { margin-top: 8px; }
.ss-error { margin: 0 0 4px; padding: 8px 12px; border-radius: 10px; background: var(--danger-fill); color: var(--danger); font-size: 13px; line-height: 18px; }
.ss-form__foot { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.ss-more { font-size: 13px; font-weight: 600; color: var(--mute); text-decoration: none; }
.ss-more:hover { color: var(--ink); text-decoration: underline; }
.ss-submit {
  display: inline-flex; align-items: center; justify-content: center; height: 36px; padding: 0 18px;
  border: 0; border-radius: var(--r-pill); background: var(--btn); color: var(--btn-ink);
  font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background 120ms ease, transform 80ms ease, opacity 150ms ease;
}
.ss-submit:hover { text-decoration: none; color: var(--btn-ink); }
.ss-submit:active { background: var(--btn-press); transform: scale(0.98); }
.ss-submit.is-busy, .ss-submit:disabled { opacity: 0.55; pointer-events: none; }
.ss-upsell { margin-top: 10px; padding: 14px; border-radius: var(--r-input); background: var(--fill); }
.ss-upsell__title { margin: 0; font-size: 14px; font-weight: 600; color: var(--ink); }

/* "Make this an event?" — the one accent: Move's gold. */
.ss-suggest {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; height: 32px; padding: 0 12px;
  border: 0; border-radius: var(--r-pill); background: var(--gold-soft); color: var(--gold-soft-ink);
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.ss-suggest--head { margin-left: 52px; }

/* ---- success line + the new card sliding into the feed ---- */
.ss-done {
  display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 10px 12px;
  border-radius: var(--r-input); background: var(--success-fill); color: var(--success); font-size: 14px; font-weight: 600;
}
.ss-done__check { font-size: 15px; }
.ss-done__link { margin-left: auto; color: inherit; text-decoration: underline; }
.ss-new { animation: ss-slide-in 240ms var(--ss-ease, ease-out) both, ss-highlight 2400ms ease-out both; }
@keyframes ss-slide-in { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@keyframes ss-highlight { from { background: var(--gold-soft); } 30% { background: var(--gold-soft); } to { background: transparent; } }

/* Onboarding modal open / close, matching the composer's timing. */
[data-onboarding-target="backdrop"]:not(.hidden) { animation: ss-fade-in 200ms ease-out both; }
[data-onboarding-target="backdrop"].ob-leaving { animation: ss-fade-out 200ms ease-out both; }
[data-onboarding-target="modal"].ob-entering > [data-onboarding-target="container"] { animation: ob-in 220ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
[data-onboarding-target="modal"].ob-leaving > [data-onboarding-target="container"] { animation: ob-out 180ms ease-in both; }
@keyframes ss-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes ss-fade-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes ob-in { from { opacity: 0; transform: translateY(8px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes ob-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(6px) scale(0.98); } }
@keyframes ob-sheet-in { from { transform: translateY(100%); } to { transform: none; } }
@keyframes ob-sheet-out { from { transform: none; } to { transform: translateY(100%); } }

/* ---- ≤768px: the composer's panel is a bottom sheet; so is the onboarding modal ---- */
@media (max-width: 768px) {
  .ss-menu, .ss-forms { padding-left: 0; }
  .ss-suggest--head, .ss-nopost { margin-left: 0; }
  .ss-grid2 { grid-template-columns: 1fr; }

  .move .ss .ss-panel {
    position: fixed; left: 0; right: 0; bottom: var(--ss-kb, 0px); z-index: 10001;
    display: block; opacity: 1; visibility: hidden; transform: translateY(100%);
    max-height: calc(100dvh - 56px - var(--ss-kb, 0px)); overflow-y: auto; overscroll-behavior: contain;
    padding: 0 16px calc(16px + env(safe-area-inset-bottom, 0px));
    background: var(--surface); border-radius: var(--r-sheet) var(--r-sheet) 0 0; box-shadow: var(--sh-sheet);
    transition: transform 300ms var(--ss-spring), visibility 0s linear 300ms;
  }
  .move .ss.is-sheet-open .ss-panel { visibility: visible; transform: translateY(0); transition: transform 320ms var(--ss-spring), visibility 0s; }
  .move .ss .ss-panel__inner { overflow: visible; }
  .move .ss .ss-backdrop {
    display: block; position: fixed; inset: 0; z-index: 10000; background: var(--overlay);
    opacity: 0; pointer-events: none; transition: opacity 220ms var(--ss-ease);
  }
  .ss.is-sheet-open .ss-backdrop { opacity: 1; pointer-events: auto; }
  .move .ss .ss-sheet-head { display: block; position: sticky; top: 0; z-index: 1; padding: 8px 0 4px; background: var(--surface); touch-action: none; cursor: grab; }
  .ss-handle { display: block; width: 36px; height: 5px; margin: 0 auto 12px; border-radius: 3px; background: var(--fill-2); }
  .ss-sheet-head__row { display: flex; align-items: center; gap: 10px; }
  .ss-sheet-head__title { flex: 1 1 auto; min-width: 0; font-size: 16px; font-weight: 600; color: var(--ink); }
  .move .ss .ss-menu { flex-direction: column; flex-wrap: nowrap; gap: 2px; padding-top: 8px; }
  .move .ss .ss-opt { width: 100%; height: 56px; padding: 0 10px; gap: 12px; background: transparent; }
  .move .ss .ss-opt:hover { background: var(--fill); }
  .move .ss .ss-opt__emoji { width: 36px; height: 36px; border-radius: var(--r-icon); background: var(--fill); display: inline-flex; align-items: center; justify-content: center; }
  .move .ss .ss-opt__hint { display: block; }
  .ss.is-sheet-open .ss-opt { opacity: 1; transform: none; }

  [data-onboarding-target="modal"].ob-sheet { align-items: flex-end; padding: 0; }
  [data-onboarding-target="modal"].ob-sheet > [data-onboarding-target="container"] {
    max-width: none; max-height: 92dvh; border-radius: var(--r-sheet) var(--r-sheet) 0 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  [data-onboarding-target="modal"].ob-sheet.ob-entering > [data-onboarding-target="container"] { animation: ob-sheet-in 320ms cubic-bezier(0.32, 0.72, 0, 1) both; }
  [data-onboarding-target="modal"].ob-sheet.ob-leaving > [data-onboarding-target="container"] { animation: ob-sheet-out 220ms ease-in both; }
}

@media (prefers-reduced-motion: reduce) {
  .ss, .ss *, .ss-new,
  [data-onboarding-target="backdrop"], [data-onboarding-target="modal"] > [data-onboarding-target="container"] {
    transition: none !important; animation: none !important;
  }
}
.ss .ss-panel.is-dragging { transition: none !important; }
/* Event quick view (shared/_quickview, quickview_controller.js).
 * Over 768px: a centred modal that fades and scales in.
 * 768px and under: a bottom sheet that slides up, with a drag grip.
 * Portalled to <body> and stacked above the nav island (z 99–140) and the
 * phone tab bar; Turbo's busy veil (9999) still covers it.
 * Tokens from move/tokens.css, so light and dark both follow the theme.
 */
.qv-root {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.qv-root[hidden] { display: none !important; }

.qv-backdrop {
  position: absolute;
  inset: 0;
  background: var(--overlay, rgba(31, 31, 31, 0.4));
  opacity: 0;
  transition: opacity 200ms ease-out;
}
.qv-root[data-state="open"] .qv-backdrop { opacity: 1; }

.qv-panel {
  position: relative;
  width: min(480px, 100%);
  max-height: min(720px, calc(100dvh - 48px));
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--surface, #fff);
  color: var(--ink, #1f1f1f);
  border-radius: var(--r-sheet, 26px);
  box-shadow: 0 24px 64px rgba(0, 25, 53, 0.22), 0 0 0 1px var(--hair, rgba(55, 53, 47, 0.09));
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 200ms ease-out, transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
  outline: none;
}
.qv-root[data-state="open"] .qv-panel { opacity: 1; transform: none; }

.qv-grip { display: none; }

/* The close button is a .mv-btn--secondary.mv-btn--icon; this only places it. */
.qv-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
}

.qv-frame { display: block; }

.qv-loading { display: flex; gap: 6px; justify-content: center; padding: 72px 0; }
.qv-loading span {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--mute2, #9b9a97);
  animation: qv-pulse 900ms ease-in-out infinite;
}
.qv-loading span:nth-child(2) { animation-delay: 150ms; }
.qv-loading span:nth-child(3) { animation-delay: 300ms; }
@keyframes qv-pulse { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }

.qv-body { padding: 20px 20px 22px; display: flex; flex-direction: column; gap: 16px; }
.qv-cover {
  margin: -20px -20px 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--r-sheet, 26px) var(--r-sheet, 26px) 0 0;
  background: var(--fill, #f4f3ef);
}
.qv-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.qv-head { display: flex; align-items: center; gap: 12px; padding-right: 40px; }
.qv-head-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.qv-title { margin: 0; overflow-wrap: anywhere; color: var(--ink, #1f1f1f); }
.qv-title:focus { outline: none; }
.qv-busy-tile {
  width: 48px; height: 48px; flex: none; border-radius: var(--r-input, 12px);
  background: repeating-linear-gradient(135deg, var(--fill, #f4f3ef) 0 6px, var(--fill-2, #eceae4) 6px 12px);
  box-shadow: inset 3px 0 0 var(--c, var(--obj-blue));
}

.qv-facts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.qv-facts li { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; line-height: 20px; color: var(--ink2, #37352f); }
.qv-facts li > svg { color: var(--mute, #787774); margin-top: -0.5px; }
.qv-facts .qv-place { overflow-wrap: anywhere; }
.qv-cal-dot { width: 12px; height: 12px; border-radius: 4px; margin: 4px 4px 0; flex: none; }
.qv-notes {
  margin: 0; font-size: 14px; line-height: 20px; color: var(--ink2, #37352f);
  background: var(--fill, #f4f3ef); border-radius: var(--r-input, 12px); padding: 10px 12px;
  white-space: pre-line; overflow-wrap: anywhere;
}
.qv-rsvp { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.qv-rsvp .rsvp { display: flex; flex-wrap: wrap; gap: 8px; }
.qv-actions { display: flex; gap: 8px; }
.qv-actions .mv-btn { flex: 1 1 0; }
.qv-private { margin: 0; }

/* Phones: a bottom sheet. */
@media (max-width: 768px) {
  .qv-root { align-items: flex-end; padding: 0; }
  .qv-panel {
    width: 100%;
    max-height: calc(100dvh - 48px);
    border-radius: var(--r-sheet, 26px) var(--r-sheet, 26px) 0 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: var(--sh-sheet, 0 -8px 32px rgba(0, 25, 53, 0.16));
    opacity: 1;
    transform: translateY(100%);
    transition: transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  .qv-root[data-state="open"] .qv-panel { transform: none; }
  .qv-panel.qv-dragging { transition: none; }
  .qv-grip {
    display: flex; justify-content: center; align-items: center;
    position: sticky; top: 0; z-index: 3;
    height: 22px; margin-bottom: -22px;
    touch-action: none; cursor: grab;
  }
  .qv-grip span { width: 40px; height: 5px; border-radius: 999px; background: var(--fill-2, #eceae4); }
  .qv-body { padding-top: 26px; }
  .qv-cover { margin-top: -26px; }
  .qv-close { top: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .qv-backdrop, .qv-panel { transition: none !important; }
  .qv-panel { transform: none !important; }
  .qv-loading span { animation: none; opacity: 0.6; }
}

/* The page behind stays put while it is open (quickview_controller pads
   back the scrollbar's width, so nothing shifts sideways). Only <body> is
   clipped: its overflow propagates to the viewport, which keeps the scroll
   position — clipping <html> as well would reset the page to the top. */
html.qv-locked body { overflow: hidden !important; }

/* ── The cards that open it (QuickviewHelper) ─────────────────────────────
   Same box as before: only a focus ring (an outline, which takes no space)
   and a pointer are added. The ring is drawn on the whole card when its
   link has keyboard focus. */
[data-controller~="quickview-link"] { cursor: pointer; }
[data-controller~="quickview-link"] a[data-quickview-url]:focus-visible { outline: none; }
[data-controller~="quickview-link"]:has(a[data-quickview-url]:focus-visible),
a[data-controller~="quickview-link"]:focus-visible {
  outline: 2px solid var(--info, #2383e2);
  outline-offset: 2px;
}
/* ═══════════════════════════════════════════════════
   THE MESSAGING RAMP — one palette, two themes
   ═══════════════════════════════════════════════════
   This sheet is the messaging + notifications design system: ~5,600 lines of
   `messages-*`, `message-*`, `notification-*`, `huddle-*` and `channel-create-*`
   components. None of it is written in Tailwind utilities, so NOTHING in
   dark.css reaches it — that file remaps utility class names (`bg-white`,
   `text-[#37352F]`), and `.messages-sidebar` is not a utility. Before this
   ramp existed the whole messaging UI rendered in full light on a #191919
   page: a white conversation stream, an #F7F7F5 sidebar, #37352F ink.

   So the fix belongs here, and it is the same shape dark.css calls the
   destination for the rest of the app (see its section 1, "the parts of the
   app that are already tokenised"): every colour in this file resolves
   through a custom property, and dark mode is the one `html.dark` block
   below. No component rule is duplicated, and any component added later is
   dark for free.

   The flip lives in THIS file rather than in dark.css because this sheet
   travels inside the `default` / `mobile` bundles (see their `require`
   lines) and dark.css is a separate linked asset — on a layout that links
   one without the other, a ramp split across the two would half-apply. Same
   argument shared/_in_app_nav_styles makes for the top bar: two sheets, one
   switch — `html.dark`.

   ── Two triples, not one ──────────────────────────────────────────────────

   196 of the 261 rgba() values in this file are mixed from ONE ink triple,
   `55, 53, 47` (#37352F) — every hairline, hover wash, divider and icon
   tint. Tokenising the TRIPLE rather than each colour is what makes the flip
   a single declaration instead of 196 of them.

   But a handful of those rgba()s are not furniture: they are the scrims over
   a photo, the veil behind a drawer, the dark chip on a video thumbnail.
   Those must stay DARK in dark mode — flipped to white they become a haze
   across the media they exist to sit on. They are mixed from
   `--msg-scrim-rgb`, which deepens instead of inverting. The split is by
   ROLE, and it is the one thing to get right when adding a rule here.

   ── What deliberately does NOT flip ───────────────────────────────────────

     • The huddle shell (`.huddle-panel`, `.huddle-bar`, `.huddle-popout-*`,
       `.messages-popout-bar--dark`) and the media surfaces (lightbox, video
       letterboxing) are ALREADY dark by design. They are right in both
       themes and are left exactly as authored.

     • The accent stays #2383E2. It is both a fill that carries white text
       (4.4:1) and ink in its own right (3.95:1 on #1c1c1e — AA for the 14px
       semibold and larger it is actually used on). Lifting it to a pale blue
       would read better as a link and drop every white-on-accent badge to
       2.5:1, so the accent holds and only its HOVER lifts — a hover that got
       darker on a dark page was backwards.

     • Photos, video and avatars are content. Nothing here filters an image.
   ═══════════════════════════════════════════════════ */

:root {
  /* The two triples. Everything mixed from ink inverts; everything mixed from
     scrim deepens. */
  --msg-ink-rgb:    55, 53, 47;
  --msg-scrim-rgb:  55, 53, 47;
  --msg-shadow-rgb: 15, 15, 15;

  /* Ink, strongest to faintest. */
  --msg-ink:        #37352f;
  --msg-ink-soft:   #6b6b69;
  --msg-muted:      #787774;
  --msg-dim:        #9b9a97;
  --msg-faint:      #908f8b;
  --msg-quiet:      #b4b4b0;
  --msg-line-ink:   #d3d3d0;

  /* Surfaces, lightest first. `chrome` is the pop-out title bar, a half-step
     off white; `well` is the sidebar, a reply quote, a media tile. */
  --msg-surface:     #ffffff;
  --msg-chrome:      #fbfbfa;
  --msg-well:        #f7f7f5;
  --msg-raise:       #ececea;
  --msg-avatar-fill: #8b8a87;
  --msg-avatar-ink:  #616060;
  /* The recents-list initial avatar: a dark neutral gradient carrying white
     text. It is the one "dark in light mode" fill that has to get LIGHTER in
     dark, or a near-black disc lands on a near-black page. */
  --msg-avatar-grad-1: #3b3a37;
  --msg-avatar-grad-2: #5b5954;

  /* The skeleton shimmer sweeps a highlight ACROSS a placeholder bar, so in
     dark it has to be a faint lift rather than the 75% white that reads as a
     strobe on near-black. */
  --msg-shimmer:    rgba(255, 255, 255, 0.35);
  --msg-shimmer-hi: rgba(255, 255, 255, 0.75);

  /* Surfaces that are dark in LIGHT mode — a tooltip, the error toast. These
     invert direction: on a dark page they have to step UP off the canvas or
     they vanish into it. */
  --msg-tooltip-bg:  #1f1f1f;
  --msg-tooltip-ink: #ffffff;
  --msg-toast-bg:    #37352f;
  --msg-toast-ink:   #ffffff;

  /* Danger. Four distinct reds in light — kept distinct rather than collapsed
     so light rendering is unchanged — converging on two in dark, where the
     deep bricks are unreadable on near-black. */
  --msg-danger:       #eb5757;
  --msg-danger-hover: #d64545;
  --msg-danger-ink:   #d4453b;
  --msg-danger-deep:  #b93a31;
  --msg-danger-alt:   #b23a3a;

  /* The accent trio. These used to be written as an INLINE style by
     MessagesHelper#messages_theme_css_variables — three constants, duplicated
     from this sheet, on the root of every messages screen. An inline custom
     property cannot be overridden by a stylesheet, so while they were there
     dark mode could not touch the accent at all. The helper now emits
     nothing and this is the single declaration. */
  --messages-accent: #2383E2;
  --messages-accent-hover: #1B6DBF;
  --messages-composer-focus-ring: rgba(35, 131, 226, 0.15);
}

html.dark {
  --msg-ink-rgb:    255, 255, 255;
  --msg-scrim-rgb:  0, 0, 0;
  --msg-shadow-rgb: 0, 0, 0;

  --msg-ink:        rgba(255, 255, 255, 0.87);
  --msg-ink-soft:   rgba(255, 255, 255, 0.66);
  --msg-muted:      #9b9a97;
  --msg-dim:        #86857f;
  --msg-faint:      #86857f;
  --msg-quiet:      #75746f;
  --msg-line-ink:   #4a4a53;

  /* Move's dark pairs, the same ramp dark.css and the top bar publish:
     #191919 canvas · #1c1c1e surface · #232326 raised. */
  --msg-surface:     #1c1c1e;
  --msg-chrome:      #202023;
  --msg-well:        #232326;
  --msg-raise:       #33333a;
  --msg-avatar-fill: #4a4a53;
  --msg-avatar-ink:  rgba(255, 255, 255, 0.72);
  --msg-avatar-grad-1: #45454e;
  --msg-avatar-grad-2: #5e5e6a;

  --msg-shimmer:    rgba(255, 255, 255, 0.05);
  --msg-shimmer-hi: rgba(255, 255, 255, 0.11);

  --msg-tooltip-bg:  #3a3a42;
  --msg-tooltip-ink: rgba(255, 255, 255, 0.92);
  --msg-toast-bg:    #3a3a42;
  --msg-toast-ink:   rgba(255, 255, 255, 0.92);

  --msg-danger:       #f07a7a;
  --msg-danger-hover: #f4928f;
  --msg-danger-ink:   #f07a7a;
  --msg-danger-deep:  #f4928f;
  --msg-danger-alt:   #f07a7a;

  /* The accent itself holds — see the header. Only the hover lifts, so
     "more" still means lighter, and the focus ring nearly doubles its alpha
     because a 15% blue wash is invisible on #1c1c1e. */
  --messages-accent-hover: #4a9bf0;
  --messages-composer-focus-ring: rgba(35, 131, 226, 0.30);
}

/* ── Dark: the four things a token flip alone cannot say ───────────────────
   Everything above is a value swap. These four are relationships, and they
   only exist in dark.
   ──────────────────────────────────────────────────────────────────────── */

/* 1 · ELEVATION. In light, a card is white and the page it floats over is
   white too — the shadow does all the separating. On near-black a 12% black
   shadow separates nothing, and shadows cannot go "below" the canvas the way
   they can on paper. So the floating layer steps UP off the surface instead,
   which is the same inversion `--msg-well` makes (a recessed well in light
   becomes a raised panel in dark, because down is not available). The deeper
   shadow stays as a second cue for the tallest things. */
html.dark :where(
  .messages-recents-card, .messages-stage-card, .messages-empty-state-card,
  .messages-compose-results, .messages-status-popover, .messages-avatar-popover,
  .messages-avatar-emoji-popover, .messages-composer-emoji-card,
  .emoji-picker-popup-card, .messages-schedule-popover, .messages-profile-card,
  .messages-modal-card, .message-edit-card, .message-row-actions,
  .mention-dropdown,
  /* The sticky category header scrolls inside the emoji card, so it has to
     carry the card's colour and not the stream's. */
  .messages-composer-emoji-group-title
) {
  background: var(--msg-raise);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
}
html.dark :where(.messages-composer-emoji-group-title) { box-shadow: none; }
/* The row-action toolbar is small and sits ON a message; it gets the lift but
   not the 30px cloud, which would read as a smudge at that size. */
html.dark :where(.message-row-actions) { box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); }
/* The details drawer is a docked panel, not a floating card — it keeps the
   stream's surface and separates with its edge and a directional shadow. */
html.dark :where(.messages-details-drawer) { box-shadow: -6px 0 20px rgba(0, 0, 0, 0.45); }
/* A section inside the drawer sat on the drawer's own colour once both
   flipped, so the card outlines vanished. */
html.dark :where(.messages-details-section) { background: var(--msg-well); }

/* 2 · THE COMPOSER'S EDITOR. dark.css paints every `trix-editor` in the app
   with its own raised fill (its section 9), which inside the composer draws a
   second box one step off the shell it is supposed to fill. The composer and
   the edit card own their editor's surface. */
html.dark :where(.messages-composer, .message-edit-card) trix-editor {
  background: transparent;
}

/* 3 · THE SIDEBAR'S RIGHT EDGE. A 9% white hairline between two surfaces that
   are 7 units apart is not a seam anybody can find. The sidebar is the one
   place in this UI where two large panes meet with nothing but a line. */
html.dark :where(.messages-sidebar) { border-right-color: rgba(255, 255, 255, 0.12); }

/* 4 · THE ACTIVE THREAD ROW. `color-mix(accent 10%, transparent)` over white
   is a pale blue wash; over #232326 it is a 10% blue lift that barely clears
   the hover state next to it. Selection is the one state that must never be
   ambiguous, so it doubles.

   Written WITHOUT `:where()`, unlike every other rule in this section. The
   rule it overrides carries `!important`, and between two `!important`
   declarations specificity still decides — `:where()` contributes zero, so
   `html.dark :where(.messages-thread-row.is-active)` at (0,1,1) would lose to
   the original's (0,2,0). Spelled out it is (0,3,0) and wins by one. */
html.dark .messages-thread-row.is-active {
  background: color-mix(in srgb, var(--messages-accent) 22%, transparent) !important;
}

/* 5 · The mobile details toggle is a white glass pill written as a literal
   `rgba(255, 255, 255, 0.92)` — it is glass, so it keeps its alpha and
   changes its colour, the same way dark.css handles `bg-white/90`. */
html.dark :where(.mobile-message-details-toggle) {
  background: rgba(28, 28, 30, 0.92);
}

/* ═══════════════════════════════════════════════════
   Notifications — Notion × iOS Native
   ═══════════════════════════════════════════════════ */
   .notifications-root {
    /* Design system: FixelText with the -apple-system fallback stack. */
    font-family: 'FixelText', -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.01em;
  }
  
  /* ─── Segmented Control ─── */
  .notification-segment {
    flex: 1;
    position: relative;
    z-index: 1;
    padding: 7px 12px;
    /* Segment / micro type: 11 / 700 / uppercase. */
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(var(--msg-ink-rgb),0.5);
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    transition: color 0.2s ease;
    background: transparent;
    border: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
  }
  .notification-segment.is-active {
    color: var(--msg-ink);
    font-weight: 600;
  }
  
  /* ─── Badge ─── */
  .notification-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    color: white;
    background-color: #eb5757;
    border-radius: 9px;
    letter-spacing: 0;
  }
  
  /* ─── Filter Chips ─── */
  .notification-chip {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    color: rgba(var(--msg-ink-rgb),0.5);
    border-radius: 999px;
    cursor: pointer;
    transition: color 0.15s ease, background-color 0.15s ease, transform 0.08s ease;
    background: transparent;
    border: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
  }
  .notification-chip:hover {
    color: var(--msg-ink);
    background: rgba(var(--msg-ink-rgb),0.04);
  }
  .notification-chip:active { transform: scale(0.95); }
  .notification-chip.is-active {
    color: var(--msg-ink);
    background: rgba(var(--msg-ink-rgb),0.06);
    font-weight: 600;
  }
  
  /* ─── Icon Button ─── */
  .notification-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    /* Design system: prev/next-style icon buttons are fully round. */
    border-radius: 999px;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.08s ease;
    background: transparent;
    border: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
  }
  .notification-icon-btn:hover {
    background-color: rgba(var(--msg-ink-rgb),0.06);
  }
  .notification-icon-btn:active {
    /* Signature 08 — tap scales down to 0.90. */
    transform: scale(0.90);
  }
  
  /* ─── Hover Action Buttons ─── */
  .notification-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    color: var(--msg-muted);
    cursor: pointer;
    transition: all 0.15s ease;
    background: transparent;
    border: none;
    outline: none;
  }
  .notification-action-btn:hover {
    background-color: rgba(var(--msg-ink-rgb),0.06);
    color: var(--msg-ink);
  }
  
  /* ─── Row Base ─── */
  .notification-row-base {
    position: relative;
    display: block;
    cursor: pointer;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
  }
  .notification-row-base:hover {
    background-color: rgba(var(--msg-ink-rgb),0.02);
  }
  .notification-row-base + .notification-row-base {
    border-top: 1px solid rgba(var(--msg-ink-rgb),0.04);
  }
  
  /* ─── Stagger animation for rows ─── */
  @keyframes notifSlideUp {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  .notification-row-base {
    animation: notifSlideUp 0.3s ease both;
  }
  
  /* ─── iOS safe areas ─── */
  @supports (padding-bottom: env(safe-area-inset-bottom)) {
    .notifications-root {
      padding-bottom: env(safe-area-inset-bottom);
    }
  }
  
  /* ─── Touch device tweaks ─── */
  @media (hover: none) and (pointer: coarse) {
    .notification-icon-btn {
      width: 40px;
      height: 40px;
    }
  }
  /* ─── Website notifications overrides ─── */
  .notifications-root--web {
    color: var(--msg-ink);
  }
  .notifications-root--web .notification-segment {
    color: rgba(var(--msg-ink-rgb),0.5);
  }
  .notifications-root--web .notification-segment.is-active {
    color: var(--msg-ink);
  }
  .notifications-root--web .notification-chip {
    color: rgba(var(--msg-ink-rgb),0.5);
  }
  .notifications-root--web .notification-chip:hover {
    color: var(--msg-ink);
    background: rgba(var(--msg-ink-rgb),0.04);
  }
  .notifications-root--web .notification-chip.is-active {
    color: var(--msg-ink);
    background: rgba(var(--msg-ink-rgb),0.06);
  }
  .notifications-root--web .notification-icon-btn:hover {
    background-color: rgba(var(--msg-ink-rgb),0.06);
  }
  .notifications-root--web .notification-action-btn:hover {
    background-color: rgba(var(--msg-ink-rgb),0.06);
    color: var(--msg-ink);
  }
  .notifications-root--web .notification-row-base:hover {
    background-color: rgba(var(--msg-ink-rgb),0.02);
  }
  .notifications-root--web .notification-row-base + .notification-row-base {
    border-top-color: rgba(var(--msg-ink-rgb),0.04);
  }
  /* Temporarily hide non-functional menu in notifications.
     Remove this when menu functionality is implemented. */
  .notifications-root--web [data-notification-actions-target="menuWrapper"] {
    display: none !important;
  }

  /* ═══════════════════════════════════════════════════
     Messages — Notion-native palette
     ═══════════════════════════════════════════════════ */
  /* The accent trio used to be re-declared here as well. A declaration ON an
     element beats one inherited from `html`, so these three shadowed the
     `html.dark` flip for the whole messages subtree even after the inline
     style was removed. The ramp at the top of this file is now the only
     place they are set. */
  .messages-index-shell,
  .mobile-message-container {
    --message-media-tile: 132px;
  }
  .messages-index-shell {
    --messages-nav-offset: 48px;
    height: calc(100dvh - var(--messages-nav-offset));
    min-height: calc(100dvh - var(--messages-nav-offset));
    max-height: calc(100dvh - var(--messages-nav-offset));
    overflow: hidden;
    background: var(--msg-surface);
  }
  /* The in-app nav floats over the page and occupies no flow, so the
     conversation can fill the viewport. The island sits on this paper; the
     unpainted gutters are this surface, not the canvas behind it. Pop-out
     windows have no app nav, so they keep the 48px offset they already sized
     themselves around. */
  .messages-index-shell:not(.messages-index-shell--popout) {
    --messages-nav-offset: 0;
    height: 100dvh;
    min-height: 100dvh;
    max-height: 100dvh;
  }
  .messages-index-frame {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
  }
  .messages-index-frame--thread {
    height: 100%;
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
  }

  /* ─── Sidebar (Notion-native light) ─── */
  .messages-sidebar {
    width: 100%;
    height: 100%;
    min-height: 0;
    background: var(--msg-well);
    color: var(--msg-ink);
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(var(--msg-ink-rgb),0.09);
  }
  .messages-sidebar-header {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 10px 12px 8px;
    border-bottom: 1px solid rgba(var(--msg-ink-rgb),0.08);
    gap: 8px;
  }
  .messages-sidebar-headline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
  }
  .messages-sidebar-header-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
  }
  .messages-sidebar-iconbtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 6px;
    color: var(--msg-muted);
    background: transparent;
    transition: background-color 0.12s ease, color 0.12s ease;
  }
  .messages-sidebar-iconbtn:hover {
    background: rgba(var(--msg-ink-rgb),0.07);
    color: var(--msg-ink);
  }
  .messages-sidebar-eyebrow {
    display: none;
  }
  .messages-sidebar-title {
    margin: 0;
    font-size: 15px;
    line-height: 1.2;
    font-weight: 700;
    color: var(--msg-ink);
    letter-spacing: -0.01em;
  }
  .messages-sidebar-compose {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    gap: 5px;
    border-radius: 6px;
    border: none;
    padding: 5px 8px;
    font-size: 12px;
    font-weight: 500;
    color: var(--msg-muted);
    background: transparent;
    transition: background-color 0.12s ease, color 0.12s ease;
  }
  .messages-sidebar-compose:hover {
    background: rgba(var(--msg-ink-rgb),0.07);
    color: var(--msg-ink);
  }
.messages-sidebar-list-wrap {
    flex: 1;
    overflow-y: auto;
    padding: 6px 0 18px;
  }
  .messages-sidebar-threads {
    display: flex;
    flex-direction: column;
    gap: 1px;
  }
  /* Infinite-scroll sentinels (sidebar + conversation) */
  .messages-sidebar-load-more,
  .messages-load-older {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 10px 0;
  }
  .messages-sidebar-load-more-spinner,
  .messages-load-older-spinner {
    width: 16px;
    height: 16px;
    border-radius: 9999px;
    border: 2px solid rgba(var(--msg-ink-rgb),0.18);
    border-top-color: rgba(var(--msg-ink-rgb),0.55);
    animation: messages-loader-spin 0.7s linear infinite;
  }
  @keyframes messages-loader-spin {
    to { transform: rotate(360deg); }
  }
  /* The lazy sidebar-list frame must not introduce a layout box — keep the
     inner .messages-sidebar-list-wrap as the real flex child of the aside. */
  turbo-frame#messages_sidebar_list,
  .messages-sidebar-list-frame {
    display: contents;
  }
  .messages-sidebar-list-wrap:not([aria-busy="true"]) .messages-sidebar-skeleton {
    display: none;
  }
  .messages-sidebar .notification-row-base {
    animation: none;
  }
  .messages-sidebar-skeleton {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px 8px;
  }
  .messages-sidebar-skeleton-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 10px;
    animation: messages-skeleton-pulse 1.2s ease-in-out infinite;
  }
  .messages-sidebar-skeleton-avatar {
    flex: none;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    background: rgba(var(--msg-ink-rgb),0.08);
  }
  .messages-sidebar-skeleton-line {
    flex: 1;
    height: 10px;
    border-radius: 6px;
    background: rgba(var(--msg-ink-rgb),0.08);
  }
  .messages-sidebar-skeleton-line--lg { max-width: 72%; }
  @keyframes messages-skeleton-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
  }
  .messages-sidebar-section-title {
    margin: 0;
    padding: 8px 10px 4px;
    font-size: 13px;
    letter-spacing: -0.01em;
    text-transform: none;
    color: var(--msg-dim);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: default;
    user-select: none;
  }
  .messages-sidebar-section-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: 0.85;
  }
  .messages-sidebar-empty {
    margin: 12px;
    border-radius: 10px;
    padding: 14px;
    background: rgba(var(--msg-ink-rgb),0.04);
    border: 1px solid rgba(var(--msg-ink-rgb),0.06);
  }
  .messages-sidebar-empty h3 {
    margin: 0 0 2px;
    font-size: 14px;
    font-weight: 700;
    color: var(--msg-ink);
  }
  .messages-sidebar-empty p {
    margin: 0;
    font-size: 12px;
    line-height: 1.45;
    color: var(--msg-muted);
  }
  .messages-sidebar-empty-cta {
    margin-top: 10px;
    display: inline-flex;
    border-radius: 8px;
    border: 1px solid rgba(var(--msg-ink-rgb),0.12);
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--msg-ink);
    background: rgba(var(--msg-ink-rgb),0.04);
    transition: background-color 0.15s ease;
  }
  .messages-sidebar-empty-cta:hover {
    background: rgba(var(--msg-ink-rgb),0.08);
  }

  /* ─── Thread rows (Slack-style) ─── */
  .messages-thread-row {
    margin: 0 6px;
    color: inherit;
    border-radius: 6px;
  }
  .messages-thread-item:hover .messages-thread-row:not(.is-active) {
    background: rgba(var(--msg-ink-rgb),0.06) !important;
  }
  .messages-thread-row:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--messages-accent) 35%, transparent);
    outline-offset: 1px;
  }
  .messages-thread-row.is-active {
    background: color-mix(in srgb, var(--messages-accent) 10%, transparent) !important;
  }
  .messages-thread-row.is-active .message-thread-title {
    color: var(--messages-accent) !important;
  }
  .messages-thread-row.is-active .message-thread-unread-count {
    color: #ffffff;
    background: var(--messages-accent);
  }
  .messages-thread-row + .messages-thread-row {
    border-top: none !important;
    margin-top: 1px;
  }
  .messages-thread-item + .messages-thread-item {
    margin-top: 1px;
  }
  .messages-thread-item:hover {
    z-index: 25;
  }
  .messages-thread-dismiss {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: rgba(var(--msg-ink-rgb),0.55);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.12s ease, background 0.12s ease, color 0.12s ease;
  }
  .messages-thread-item:hover .messages-thread-dismiss,
  .messages-thread-item:has(.messages-thread-row.is-active) .messages-thread-dismiss,
  .messages-thread-dismiss:focus-visible {
    opacity: 1;
  }
  @media (hover: none), (pointer: coarse) {
    .messages-thread-dismiss {
      opacity: 0.55;
    }
  }
  .messages-thread-dismiss:hover {
    background: rgba(var(--msg-ink-rgb),0.16);
    color: rgba(var(--msg-ink-rgb),0.92);
  }
  .messages-thread-participants-tooltip {
    position: absolute;
    left: 6px;
    right: 6px;
    bottom: calc(100% + 6px);
    z-index: 30;
    padding: 7px 10px;
    border-radius: 8px;
    background: var(--msg-tooltip-bg);
    color: var(--msg-tooltip-ink);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    text-align: center;
    box-shadow: 0 6px 18px rgba(var(--msg-shadow-rgb),0.22);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s ease;
  }
  .messages-thread-participants-tooltip::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -5px;
    transform: translateX(-50%) rotate(45deg);
    width: 10px;
    height: 10px;
    background: var(--msg-tooltip-bg);
  }
  .messages-thread-item:hover .messages-thread-participants-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  .messages-thread-item:has(.messages-thread-dismiss:hover) .messages-thread-participants-tooltip {
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
  }
  /* Unread left indicator bar */
  .messages-thread-row.is-unread-row {
    position: relative;
  }
  .messages-thread-row.is-unread-row::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--messages-accent);
    border-radius: 0 3px 3px 0;
  }
  .message-thread-prefix {
    opacity: 0.55;
    margin-right: 1px;
    font-size: 12px;
  }
  .message-thread-title {
    margin: 0;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 400;
    color: var(--msg-ink-soft);
  }
  .message-thread-title-row {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    max-width: 100%;
  }
  .message-thread-title-text {
    min-width: 0;
  }
  .message-thread-title.is-unread {
    color: var(--msg-ink);
    font-weight: 600;
  }
  .message-thread-group-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    background: var(--msg-avatar-fill);
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    color: #ffffff;
    letter-spacing: 0;
  }
  .messages-thread-row.is-active .message-thread-group-avatar {
    background: var(--messages-accent);
    color: #ffffff;
  }
  .message-thread-avatar {
    flex: none;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    overflow: hidden;
  }
  .message-thread-avatar--photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .message-thread-avatar--initial {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--msg-raise);
    color: var(--msg-avatar-ink);
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
  }
  .message-thread-unread-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9999px;
    font-size: 10px;
    font-weight: 700;
    color: #ffffff;
    background: var(--messages-accent);
    flex-shrink: 0;
  }

  /* ─── Stage (empty state / compose) ─── */
  .messages-stage {
    display: none;
    flex: 1;
    min-height: 0;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--msg-surface);
  }
  .messages-stage--thread {
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    min-height: 0;
    overflow: hidden;
    padding: 0;
    background: transparent;
  }
  /* Slack-style "Recent conversations" card */
  .messages-recents-card {
    width: min(560px, 100%);
    border-radius: 18px;
    border: 1px solid rgba(var(--msg-ink-rgb),0.09);
    background: var(--msg-surface);
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(var(--msg-shadow-rgb),0.04), 0 12px 30px -20px rgba(var(--msg-shadow-rgb),0.22);
  }
  .messages-recents-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px 14px;
  }
  .messages-recents-badge {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--messages-accent) 12%, transparent);
    color: var(--messages-accent);
  }
  .messages-recents-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--msg-ink);
  }
  .messages-recents-subtitle {
    margin: 2px 0 0;
    font-size: 13px;
    color: var(--msg-muted);
  }
  .messages-recents-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 4px 8px 6px;
  }
  .messages-recent-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 10px;
    border-radius: 12px;
    text-decoration: none;
    transition: background-color 0.14s ease, transform 0.12s ease;
  }
  .messages-recent-row:hover { background: color-mix(in srgb, var(--messages-accent) 7%, transparent); }
  .messages-recent-row:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--messages-accent) 35%, transparent);
    outline-offset: 2px;
    background: color-mix(in srgb, var(--messages-accent) 7%, transparent);
  }
  .messages-recent-row:active { transform: scale(0.99); }
  .messages-recent-avatar { position: relative; flex: none; width: 40px; height: 40px; }
  .messages-recent-avatar img { width: 40px; height: 40px; border-radius: 9999px; }
  .messages-recent-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 9999px;
    background: linear-gradient(135deg, var(--msg-avatar-grad-1), var(--msg-avatar-grad-2));
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
  }
  .messages-recent-dot {
    position: absolute;
    top: -1px;
    right: -1px;
    width: 11px;
    height: 11px;
    border-radius: 9999px;
    background: var(--messages-accent);
    border: 2px solid var(--msg-surface);
  }
  .messages-recent-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
  .messages-recent-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
  .messages-recent-name {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14.5px;
    font-weight: 500;
    color: var(--msg-ink);
    max-width: 100%;
  }
  .messages-recent-name-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .messages-recent-name.is-unread { font-weight: 700; }
  .messages-recent-time {
    flex: none;
    font-size: 12px;
    color: var(--msg-quiet);
    font-variant-numeric: tabular-nums;
  }
  .messages-recent-time.is-unread { color: var(--messages-accent); font-weight: 600; }
  .messages-recent-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .messages-recent-snippet {
    min-width: 0;
    font-size: 13px;
    line-height: 1.35;
    color: var(--msg-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .messages-recent-snippet.is-unread { color: var(--msg-ink); }
  .messages-recent-you { color: var(--msg-quiet); }
  .messages-recent-badge-count {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 9999px;
    background: var(--messages-accent);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
  }
  .messages-recents-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 4px 12px 14px;
    padding: 11px 16px;
    border-radius: 12px;
    border: 1px solid color-mix(in srgb, var(--messages-accent) 25%, transparent);
    color: var(--messages-accent);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.14s ease;
  }
  .messages-recents-cta:hover { background: color-mix(in srgb, var(--messages-accent) 8%, transparent); }

  .messages-stage-card {
    width: min(540px, 100%);
    border-radius: 16px;
    border: 1px solid rgba(var(--msg-ink-rgb),0.09);
    background: var(--msg-surface);
    text-align: center;
    padding: 42px 30px;
    box-shadow: 0 1px 3px rgba(var(--msg-shadow-rgb),0.04);
  }
  .messages-stage-icon {
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    color: var(--messages-accent);
    background: color-mix(in srgb, var(--messages-accent) 8%, transparent);
  }
  .messages-stage-card h2 {
    margin: 0;
    color: var(--msg-ink);
    font-size: 20px;
    font-weight: 700;
  }
  .messages-stage-card p {
    margin: 8px 0 0;
    color: var(--msg-muted);
    font-size: 14px;
    line-height: 1.5;
  }
  .messages-stage-cta {
    margin-top: 18px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 8px;
    padding: 10px 14px;
    color: #ffffff;
    background: var(--messages-accent);
    font-size: 13px;
    font-weight: 600;
    transition: background-color 0.15s ease;
  }
  .messages-stage-cta:hover {
    background: var(--messages-accent-hover);
  }
  .messages-thread-compose-shell {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    padding: 24px 20px;
  }
  .messages-thread-compose-wrap {
    width: min(760px, 100%);
  }
  .messages-thread-compose-submit {
    background: var(--messages-accent);
    color: #ffffff;
  }
  .messages-thread-compose-submit:hover {
    background: var(--messages-accent-hover);
  }

  /* ─── Slack-style new-message composer ─── */
  .messages-compose-shell {
    min-height: 420px;
    display: flex;
    flex-direction: column;
  }
  .messages-compose-shell.is-ready .messages-compose-body {
    flex: 1;
    min-height: 0;
  }
  .messages-compose-body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: var(--msg-surface);
  }
  .messages-compose-header {
    position: relative;
  }
  .messages-compose-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    color: var(--msg-muted);
    transition: background 0.12s ease, color 0.12s ease;
  }
  .messages-compose-close:hover {
    color: var(--msg-ink);
    background: rgba(var(--msg-ink-rgb),0.06);
  }
  .messages-compose-quick {
    padding: 10px 14px 4px;
    border-bottom: 1px solid rgba(var(--msg-ink-rgb),0.06);
    background: var(--msg-surface);
  }
  .messages-compose-quick-label {
    margin: 0 0 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--msg-dim);
  }
  .messages-compose-quick-list {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: none;
  }
  .messages-compose-quick-list::-webkit-scrollbar { display: none; }
  .messages-compose-quick-pick {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 56px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: transform 0.12s ease;
  }
  .messages-compose-quick-pick:hover { transform: translateY(-1px); }
  .messages-compose-quick-pick:hover .messages-compose-quick-avatar,
  .messages-compose-quick-pick:hover .messages-compose-quick-avatar--fallback {
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--messages-accent) 30%, transparent);
  }
  .messages-compose-quick-pick:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--messages-accent) 40%, transparent);
    outline-offset: 3px;
    border-radius: 12px;
  }
  .messages-compose-quick-pick.is-loading { opacity: 0.55; pointer-events: none; }
  .messages-compose-quick-avatar {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    object-fit: cover;
    box-shadow: 0 0 0 1px rgba(var(--msg-ink-rgb),0.08);
  }
  .messages-compose-quick-avatar--fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    background: var(--msg-dim);
  }
  .messages-compose-quick-name {
    max-width: 64px;
    font-size: 11px;
    font-weight: 500;
    color: var(--msg-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .messages-compose-placeholder {
    flex: 1;
    min-height: 0;
  }
  .messages-compose-results-heading {
    margin: 6px 8px 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--msg-dim);
  }
  .messages-compose-result.is-highlighted,
  .messages-compose-result.is-highlighted:hover {
    background: color-mix(in srgb, var(--messages-accent) 10%, transparent);
  }
  .messages-compose-result.is-loading {
    opacity: 0.55;
    pointer-events: none;
  }
  .messages-composer-shell.is-disabled {
    opacity: 0.45;
    pointer-events: none;
    user-select: none;
  }
  /* Native app full-screen wrapper for the composer. */
  .messages-compose-mobile-app {
    /* Fixed + flush to the top so it escapes the mobile layout's mt-24 wrapper
       (which was leaving a large white gap above the composer) and clears the
       iOS status bar via the safe-area inset. */
    position: fixed;
    inset: 0;
    top: 0;
    z-index: 50;
    height: 100dvh;
    max-height: 100dvh;
    padding-top: env(safe-area-inset-top, 0px);
    display: flex;
    flex-direction: column;
    background: var(--msg-surface);
  }
  body:has(.messages-compose-mobile-app) { overflow: hidden; }
  /* The .messages-compose-mobile-app container already adds the safe-area inset,
     so the compose header must NOT add it again (the generic mobile
     .messages-conversation-header rule does), or it leaves a large white gap. */
  .messages-compose-mobile-app .messages-compose-header {
    padding-top: 10px;
  }
  /* Dismissable header for the recipient dropdown — shown on mobile so the
     full-width results list can be closed without an outside tap. */
  .messages-compose-results-header { display: none; }
  .messages-compose-results-dismiss {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 8px;
    background: rgba(var(--msg-ink-rgb),0.06);
    color: var(--msg-ink);
    flex-shrink: 0;
  }
  .messages-compose-results-dismiss:active { transform: scale(0.92); }
  @media (max-width: 767px) {
    .messages-compose-results-header {
      position: sticky;
      top: 0;
      z-index: 2;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      padding: 8px 8px 6px;
      margin: -4px -4px 4px;
      background: var(--msg-surface);
      border-bottom: 1px solid rgba(var(--msg-ink-rgb),0.07);
    }
    .messages-compose-results-header-label {
      font-size: 12px;
      font-weight: 700;
      color: var(--msg-dim);
      text-transform: uppercase;
      letter-spacing: 0.04em;
      padding-left: 4px;
    }
  }
  /* To: row */
  .messages-compose-to {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(var(--msg-ink-rgb),0.09);
    background: var(--msg-surface);
  }
  .messages-compose-to-label {
    flex-shrink: 0;
    padding-top: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--msg-muted);
  }
  .messages-compose-to-control {
    position: relative;
    flex: 1;
    min-width: 0;
  }
  .messages-compose-to-field {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border: 1px solid rgba(var(--msg-ink-rgb),0.12);
    border-radius: 10px;
    background: var(--msg-surface);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
  }
  .messages-compose-to-field:focus-within {
    border-color: var(--messages-accent);
    box-shadow: 0 0 0 3px var(--messages-composer-focus-ring);
  }
  .messages-compose-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  .messages-compose-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px 4px 10px;
    font-size: 13px;
    font-weight: 500;
    color: var(--messages-accent-hover);
    background: color-mix(in srgb, var(--messages-accent) 10%, transparent);
    border-radius: 9999px;
  }
  .messages-compose-chip button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--messages-accent-hover);
    cursor: pointer;
    border-radius: 9999px;
    padding: 2px;
  }
  .messages-compose-chip button:hover { background: color-mix(in srgb, var(--messages-accent) 18%, transparent); }
  .messages-compose-to-input {
    flex: 1;
    min-width: 140px;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent;
    padding: 8px 2px;
    font-size: 14px;
    color: var(--msg-ink);
  }
  .messages-compose-to-input:focus,
  .messages-compose-to-input:focus-visible {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
  }
  .messages-compose-to-input::placeholder { color: var(--msg-quiet); }
  /* Results dropdown */
  .messages-compose-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 6px;
    padding: 4px;
    background: var(--msg-surface);
    border: 1px solid rgba(var(--msg-ink-rgb),0.09);
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(var(--msg-shadow-rgb),0.16);
    max-height: 280px;
    overflow-y: auto;
    z-index: 30;
  }
  .messages-compose-result {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.12s ease;
  }
  .messages-compose-result:hover { background: rgba(var(--msg-ink-rgb),0.05); }
  .messages-compose-result-avatar {
    width: 32px;
    height: 32px;
    border-radius: 9999px;
    object-fit: cover;
    flex-shrink: 0;
  }
  .messages-compose-result-avatar--fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--msg-ink-rgb),0.08);
    color: var(--msg-muted);
    font-size: 13px;
    font-weight: 700;
  }
  .messages-compose-result-meta { display: flex; flex-direction: column; min-width: 0; }
  .messages-compose-result-name,
  .messages-compose-quick-name,
  .mobile-messages-person-name {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px 4px;
    max-width: 100%;
  }
  .messages-compose-result-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--msg-ink);
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .messages-compose-result-username {
    font-size: 12px;
    color: var(--msg-quiet);
    line-height: 1.25;
  }
  .messages-compose-empty {
    margin: 0;
    padding: 12px 10px;
    font-size: 13px;
    color: var(--msg-muted);
  }
  .messages-compose-cancel {
    font-size: 13px;
    font-weight: 500;
    color: var(--msg-muted);
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 8px;
    transition: color 0.15s ease, background-color 0.15s ease;
  }
  .messages-compose-cancel:hover { color: var(--msg-ink); background: rgba(var(--msg-ink-rgb),0.05); }

  /* ─── Conversation shell ─── */
  .messages-conversation-shell {
    height: 100%;
    min-height: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--msg-surface);
  }
  .messages-conversation-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(var(--msg-ink-rgb),0.09);
    padding: 12px 14px;
    background: var(--msg-surface);
  }
  .messages-conversation-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .messages-conversation-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: none;
    color: var(--msg-muted);
    background: transparent;
    transition: background-color 0.15s ease, color 0.15s ease;
  }
  .messages-conversation-info:hover {
    background: rgba(var(--msg-ink-rgb),0.06);
    color: var(--msg-ink);
  }
  .messages-conversation-info:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--messages-accent) 40%, transparent);
    outline-offset: 2px;
  }
  .messages-conversation-body {
    position: relative;
    flex: 1;
    min-height: 0;
    display: flex;
    overflow: hidden;
  }
  .messages-conversation-main {
    flex: 1;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    transition: margin-right 0.24s ease;
  }

  /* ─── Details drawer ─── */
  .messages-details-drawer {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 320px;
    max-width: min(92vw, 340px);
    transform: translateX(102%);
    transition: transform 0.24s ease;
    border-left: 1px solid rgba(var(--msg-ink-rgb),0.09);
    background: var(--msg-surface);
    box-shadow: -4px 0 16px rgba(var(--msg-shadow-rgb),0.06);
    z-index: 18;
    display: flex;
    flex-direction: column;
  }
  .messages-conversation-shell.is-details-open .messages-conversation-main {
    margin-right: 320px;
  }
  .messages-conversation-shell.is-details-open .messages-details-drawer {
    transform: translateX(0);
  }
  .messages-details-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(var(--msg-ink-rgb),0.09);
  }
  .messages-details-title {
    margin: 0;
    color: var(--msg-ink);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.01em;
  }
  .messages-details-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 8px;
    color: var(--msg-muted);
    background: transparent;
    transition: background-color 0.15s ease, color 0.15s ease;
  }
  .messages-details-close:hover {
    background: rgba(var(--msg-ink-rgb),0.06);
    color: var(--msg-ink);
  }
  .messages-details-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
  .messages-details-section {
    border: 1px solid rgba(var(--msg-ink-rgb),0.09);
    border-radius: 10px;
    background: var(--msg-surface);
    padding: 12px;
  }
  .messages-details-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
  }
  .messages-details-label {
    margin: 0 0 6px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--msg-quiet);
    font-weight: 700;
  }
  .messages-details-section-header .messages-details-label {
    margin-bottom: 0;
  }
  .messages-details-count {
    color: var(--msg-quiet);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
  }
  .messages-details-thread-name {
    margin: 0;
    color: var(--msg-ink);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
  }
  .messages-details-meta {
    margin: 4px 0 0;
    color: var(--msg-muted);
    font-size: 12px;
  }
  .messages-details-participant-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .messages-details-participant-item {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    padding: 4px 2px 4px 4px;
    margin: 0 -4px;
    border-radius: 8px;
    transition: background 0.12s ease;
  }
  .messages-details-participant-item:hover {
    background: rgba(var(--msg-ink-rgb),0.04);
  }
  .messages-details-participant-info {
    flex: 1;
    min-width: 0;
  }
  .messages-details-participant-avatar {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
  }
  .messages-details-participant-avatar--fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--msg-muted);
    background: rgba(var(--msg-ink-rgb),0.06);
  }
  .messages-details-participant-name {
    margin: 0;
    color: var(--msg-ink);
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
  }
  .messages-details-participant-name-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .messages-details-participant-username {
    margin: 0;
    color: var(--msg-muted);
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  /* Live availability row under each participant in the details drawer. */
  .messages-presence-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 3px;
    min-width: 0;
  }
  .messages-presence-chip-dot {
    width: 8px;
    height: 8px;
    border-radius: 9999px;
    flex-shrink: 0;
    background: var(--msg-quiet);
    box-shadow: inset 0 0 0 1.5px rgba(var(--msg-ink-rgb),0.08);
  }
  .messages-presence-chip-dot[data-status="active"] { background: #2EA86B; }
  .messages-presence-chip-dot[data-status="away"] { background: #E5A53B; }
  .messages-presence-chip-dot[data-status="offline"] { background: transparent; box-shadow: inset 0 0 0 1.5px var(--msg-quiet); }
  .messages-presence-chip-label {
    color: var(--msg-muted);
    font-size: 11.5px;
    font-weight: 500;
  }
  .messages-details-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    border: 1px solid rgba(var(--msg-ink-rgb),0.09);
    padding: 1px 6px;
    font-size: 10px;
    color: var(--msg-muted);
    font-weight: 600;
  }
  .messages-details-participant-message {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 7px;
    color: var(--msg-muted);
    opacity: 0;
    transition: opacity 0.12s ease, background 0.12s ease, color 0.12s ease;
  }
  .messages-details-participant-item:hover .messages-details-participant-message,
  .messages-details-participant-message:focus-visible {
    opacity: 1;
  }
  .messages-details-participant-message:hover {
    background: color-mix(in srgb, var(--messages-accent) 12%, transparent);
    color: var(--messages-accent);
  }
  .messages-details-participant-message.is-loading {
    opacity: 0.45;
    pointer-events: none;
  }
  @media (hover: none) {
    .messages-details-participant-message {
      opacity: 0.55;
    }
  }
  .messages-details-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .messages-details-stat {
    border: 1px solid rgba(var(--msg-ink-rgb),0.09);
    border-radius: 8px;
    background: var(--msg-well);
    padding: 8px 6px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .messages-details-stat span {
    color: var(--msg-quiet);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }
  .messages-details-stat strong {
    color: var(--msg-ink);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.1;
  }
  .messages-details-empty {
    margin: 0;
    color: var(--msg-muted);
    font-size: 12px;
    line-height: 1.4;
  }
  .messages-details-media-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .messages-details-media-card {
    min-width: 0;
  }
  .messages-details-media-link {
    position: relative;
    display: block;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(var(--msg-ink-rgb),0.09);
    aspect-ratio: 1 / 1;
    background: var(--msg-well);
    text-decoration: none;
  }
  .messages-details-media-image,
  .messages-details-media-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: rgba(var(--msg-ink-rgb),0.06);
  }
  .messages-details-media-play {
    position: absolute;
    left: 6px;
    bottom: 6px;
    width: 22px;
    height: 22px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: rgba(var(--msg-scrim-rgb),0.8);
    z-index: 2;
  }
  .messages-details-media-view {
    position: absolute;
    right: 6px;
    bottom: 6px;
    border-radius: 9999px;
    padding: 2px 7px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #ffffff;
    background: rgba(var(--msg-scrim-rgb),0.78);
    z-index: 2;
  }
  .messages-details-media-meta {
    margin: 5px 0 0;
    color: var(--msg-muted);
    font-size: 10px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .messages-details-file-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
  }
  .messages-details-file-item {
    min-width: 0;
  }
  .messages-details-file-link {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    border: 1px solid rgba(var(--msg-ink-rgb),0.09);
    border-radius: 8px;
    background: var(--msg-well);
    padding: 7px 8px;
    text-decoration: none;
    transition: border-color 0.15s ease, background-color 0.15s ease;
  }
  .messages-details-file-link:hover {
    border-color: rgba(var(--msg-ink-rgb),0.15);
    background: rgba(var(--msg-ink-rgb),0.04);
  }
  .messages-details-file-icon {
    width: 16px;
    height: 16px;
    color: var(--msg-muted);
    flex-shrink: 0;
  }
  .messages-details-file-name {
    margin: 0;
    color: var(--msg-ink);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .messages-details-file-meta {
    margin: 1px 0 0;
    color: var(--msg-muted);
    font-size: 10px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .mobile-message-details-toggle {
    display: none;
  }
  .mobile-message-details-backdrop {
    display: none;
  }
  .messages-details-backdrop {
    display: none;
  }
  .messages-conversation-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    color: var(--msg-muted);
    transition: background-color 0.15s ease;
  }
  .messages-conversation-back:hover {
    background: rgba(var(--msg-ink-rgb),0.06);
  }
  .messages-conversation-title {
    margin: 0;
    color: var(--msg-ink);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
  }
  .messages-conversation-subtitle {
    margin: 1px 0 0;
    color: var(--msg-muted);
    font-size: 12px;
    line-height: 1.2;
  }
  .messages-conversation-title-wrap.is-editing + .messages-conversation-subtitle {
    margin-top: 8px;
  }
  .messages-conversation-title-wrap {
    min-width: 0;
  }
  .messages-conversation-title-wrap.is-editable .messages-group-thread-name {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
  }
  .messages-group-thread-name-form {
    display: none;
    align-items: center;
    gap: 8px;
    min-width: 0;
  }
  .messages-conversation-title-wrap.is-editing .messages-group-thread-name {
    display: none;
  }
  .messages-conversation-title-wrap.is-editing .messages-group-thread-name-form {
    display: flex;
  }
  .messages-group-thread-name-edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 6px;
    color: var(--msg-muted);
    background: transparent;
    opacity: 0;
    transition: opacity 0.15s ease, background-color 0.15s ease, color 0.15s ease;
    cursor: pointer;
  }
  .messages-conversation-title-wrap.is-editable:hover .messages-group-thread-name-edit {
    opacity: 1;
  }
  .messages-group-thread-name-edit:hover {
    color: var(--messages-accent);
    background: color-mix(in srgb, var(--messages-accent) 10%, transparent);
  }
  .messages-group-thread-name-editor {
    position: relative;
    flex: 1;
    min-width: 0;
    border: 1px solid rgba(var(--msg-ink-rgb),0.12);
    border-radius: 10px;
    background: var(--msg-surface);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
  }
  .messages-group-thread-name-editor:focus-within {
    border-color: var(--messages-accent) !important;
    box-shadow: 0 0 0 3px var(--messages-composer-focus-ring) !important;
    outline: none !important;
  }
  .messages-group-thread-name-input {
    display: block;
    width: 100%;
    height: 30px;
    padding: 0 10px;
    border: none !important;
    border-radius: 10px;
    background: transparent;
    color: var(--msg-ink);
    font-size: 14px;
    font-weight: 600;
    outline: none !important;
    box-shadow: none !important;
  }
  .messages-conversation-title-wrap.has-reset .messages-group-thread-name-input {
    padding-right: 34px;
  }
  .messages-group-thread-name-input:focus,
  .messages-group-thread-name-input:focus-visible,
  .messages-group-thread-name-input:active {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
  }
  .messages-group-thread-name-input::placeholder {
    color: var(--msg-quiet);
    font-weight: 500;
  }
  .messages-group-thread-name-reset {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    border: none;
    border-radius: 9999px;
    background: rgba(var(--msg-ink-rgb),0.08);
    color: var(--msg-muted);
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
  }
  .messages-group-thread-name-reset.hidden {
    display: none;
  }
  .messages-group-thread-name-reset:hover {
    background: rgba(var(--msg-ink-rgb),0.14);
    color: var(--msg-ink);
  }
  .messages-group-thread-name-done {
    flex: none;
    border: none;
    border-radius: 6px;
    background: var(--messages-accent);
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 5px 10px;
    white-space: nowrap;
    transition: background-color 0.15s ease;
  }
  .messages-group-thread-name-done:hover:not(:disabled) {
    background: var(--messages-accent-hover);
  }
  .messages-group-thread-name-done:disabled {
    opacity: 0.6;
    cursor: not-allowed;
  }
  .messages-conversation-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: none;
    color: var(--msg-danger);
    background: transparent;
    transition: background-color 0.15s ease;
  }
  .messages-conversation-danger:hover {
    background: rgba(235, 87, 87, 0.06);
  }

  /* ─── Message stream ─── */
  .messages-stream {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    background: var(--msg-surface);
    padding: 12px 0 10px;
  }
  .messages-stream-loading {
    position: absolute;
    inset: 0;
    z-index: 8;
    display: block;
    padding: 18px 18px;
    background: var(--msg-surface);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
  }
  .messages-stream-loading-pill,
  .messages-stream-loading-bar {
    position: relative;
    overflow: hidden;
    background: rgba(var(--msg-ink-rgb),0.07);
  }
  .messages-stream-loading-pill::after,
  .messages-stream-loading-bar::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
      90deg,
      transparent 0%,
      var(--msg-shimmer) 42%,
      var(--msg-shimmer-hi) 50%,
      var(--msg-shimmer) 58%,
      transparent 100%
    );
    transform: translateX(-120%);
    animation: messages-stream-shimmer 1.35s ease-in-out infinite;
  }
  .messages-stream-loading-bar:nth-of-type(2)::after {
    animation-delay: 0.12s;
  }
  .messages-stream-loading-bar:nth-of-type(3)::after {
    animation-delay: 0.24s;
  }
  .messages-stream-loading-bar:nth-of-type(4)::after {
    animation-delay: 0.36s;
  }
  .messages-stream-loading-pill {
    display: block;
    width: 70px;
    height: 20px;
    border-radius: 9999px;
    margin: 0 auto 18px;
  }
  .messages-stream-loading-bar {
    display: block;
    height: 11px;
    border-radius: 9999px;
    margin-bottom: 10px;
  }
  .messages-stream-loading-bar--lg {
    width: 74%;
  }
  .messages-stream-loading-bar--md {
    width: 58%;
  }
  .messages-stream-loading-bar--sm {
    width: 43%;
  }
  .messages-stream.is-hydrating > :not(.messages-stream-loading) {
    visibility: hidden;
  }
  .messages-stream.is-hydrating .messages-stream-loading {
    visibility: visible;
    opacity: 1;
  }
  @keyframes messages-stream-shimmer {
    0% {
      transform: translateX(-120%);
    }
    100% {
      transform: translateX(120%);
    }
  }

  /* ─── Date separator ─── */
  .messages-date-separator {
    position: relative;
    margin: 14px 0;
    max-width: none;
    display: flex;
    justify-content: center;
    pointer-events: none;
  }
  .messages-date-separator.is-sticky-active {
    position: sticky;
    top: 8px;
    z-index: 14;
  }
  .messages-date-separator::before {
    content: "";
    position: absolute;
    left: 16px;
    right: 16px;
    top: 50%;
    height: 1px;
    background: rgba(var(--msg-ink-rgb),0.09);
    transform: translateY(-50%);
  }
  .messages-date-separator.is-sticky-active::before {
    opacity: 0;
  }
  .messages-date-separator span {
    position: relative;
    z-index: 1;
    border-radius: 9999px;
    border: 1px solid rgba(var(--msg-ink-rgb),0.12);
    background: var(--msg-well);
    padding: 3px 10px;
    color: var(--msg-muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.01em;
  }

  /* ─── Empty state ─── */
  .messages-empty-state {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    min-height: 100%;
    padding: 26px 20px;
  }
  .messages-empty-state-card {
    width: min(620px, 100%);
    text-align: left;
    border: 1px solid rgba(var(--msg-ink-rgb),0.09);
    border-radius: 14px;
    background: var(--msg-surface);
    padding: 22px 20px;
    box-shadow: 0 1px 3px rgba(var(--msg-shadow-rgb),0.04);
  }
  .messages-empty-state-icon {
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--msg-well);
    color: var(--msg-muted);
    font-size: 20px;
    font-weight: 700;
  }
  .messages-empty-state-title {
    margin: 0;
    color: var(--msg-ink);
    font-size: 16px;
    font-weight: 700;
  }
  .messages-empty-state-text {
    margin: 6px 0 0;
    color: var(--msg-muted);
    font-size: 13px;
  }

  /* ─── Message rows ─── */
  .message-row {
    margin: 0;
    max-width: none;
    transition: background-color 0.15s ease;
  }
  .message-row:hover,
  .message-row:focus-within {
    background: rgba(var(--msg-ink-rgb),0.035);
  }
  .message-row--jump-highlight {
    background: color-mix(in srgb, var(--messages-accent) 8%, transparent) !important;
    transition: background-color 0.45s ease;
  }
  .message-row-author {
    font-size: 14px;
    font-weight: 700;
    color: var(--msg-ink);
  }
  .message-author-status,
  .messages-list-status {
    position: relative;
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    line-height: 1;
    cursor: default;
    flex-shrink: 0;
    vertical-align: middle;
  }
  .messages-list-status {
    margin-left: 4px;
    font-size: 12px;
  }
  .message-author-status-emoji,
  .messages-list-status-emoji {
    line-height: 1;
  }
  /* Inline tooltips hold the text for JS; the visible layer is hoisted to
     document.body so sidebar overflow and row stacking cannot clip it. */
  .message-author-status-tooltip,
  .messages-list-status-tooltip {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .messages-status-hoist-tooltip {
    position: fixed;
    z-index: 10050;
    min-width: max-content;
    max-width: min(260px, calc(100vw - 16px));
    padding: 7px 10px;
    border-radius: 8px;
    background: var(--msg-tooltip-bg);
    color: var(--msg-tooltip-ink);
    box-shadow: 0 8px 24px rgba(var(--msg-shadow-rgb), 0.28);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    white-space: normal;
    word-break: break-word;
    text-align: center;
    pointer-events: none;
  }
  .messages-status-hoist-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--msg-tooltip-bg);
  }
  .message-author-status[hidden],
  .message-author-status--empty,
  .messages-list-status[hidden],
  .messages-list-status--empty {
    display: none !important;
  }
  .message-row-content .message-mention {
    display: inline;
    padding: 0 0.2em;
    border-radius: 3px;
    font-weight: 600;
    color: var(--messages-accent, #2563eb);
    background: color-mix(in srgb, var(--messages-accent, #2563eb) 12%, transparent);
  }
  .message-row-time {
    font-size: 11px;
    color: var(--msg-quiet);
    font-family: 'FixelText', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    font-variant-numeric: normal;
    white-space: nowrap;
  }
  .message-row-content {
    color: var(--msg-ink);
    line-height: 1.45;
    font-family: 'FixelText', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    font-size: 14px;
  }

  /* ─── Reply quote ─── */
  .message-reply-quote {
    margin: 0 0 8px;
    width: min(520px, 100%);
    border: 1px solid rgba(var(--msg-ink-rgb),0.09);
    border-left: 3px solid var(--msg-quiet);
    border-radius: 8px;
    background: var(--msg-well);
    padding: 7px 9px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 2px;
    transition: background-color 0.15s ease, border-color 0.15s ease;
  }
  .message-reply-quote:hover {
    background: rgba(var(--msg-ink-rgb),0.04);
    border-color: rgba(var(--msg-ink-rgb),0.12);
  }
  .message-reply-quote-label {
    color: var(--msg-ink);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
  }
  .message-reply-quote-snippet {
    color: var(--msg-muted);
    font-size: 12px;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }
  .message-row-content .trix-content,
  .message-row-content .trix-content * {
    font-family: inherit !important;
  }
  .message-row-content .trix-content {
    color: inherit;
  }
  .message-row-content p {
    margin: 0 0 0.3rem;
  }
  .message-row-content p:last-child {
    margin-bottom: 0;
  }
  .message-row-content :where(h1, h2, h3, h4, h5, h6) {
    margin: 0 0 0.3rem;
    color: var(--msg-ink);
    font-size: 14px;
    line-height: 1.45;
    font-weight: 600;
  }
  .message-row-content .trix-content a {
    color: var(--messages-accent);
    font-weight: 500;
    font-size: inherit !important;
    text-decoration: underline;
    text-underline-offset: 2px;
  }
  .message-row-content figure,
  .message-row-content action-text-attachment {
    display: inline-block;
    vertical-align: top;
    margin: 0.35rem 0.35rem 0.35rem 0;
    padding: 0;
  }
  .message-row-content .trix-content .attachment--preview {
    display: inline-block;
    width: var(--message-media-tile, 132px);
    height: var(--message-media-tile, 132px);
    max-width: var(--message-media-tile, 132px);
    margin: 0.35rem 0.35rem 0.35rem 0;
    padding: 0;
    overflow: hidden;
    border-radius: 10px;
    border: 1px solid rgba(var(--msg-ink-rgb),0.09);
    background: var(--msg-well);
    text-align: left;
    line-height: 0;
  }
  .message-row-content .trix-content .attachment--preview img,
  .message-row-content .trix-content action-text-attachment img,
  .message-row-content .trix-content figure img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover;
    background: var(--msg-well);
  }
  .message-row-content .trix-content .attachment-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-width: none;
  }
  .message-row-content .trix-content .attachment-gallery .attachment {
    flex: 0 0 var(--message-media-tile, 132px);
    width: var(--message-media-tile, 132px);
    max-width: var(--message-media-tile, 132px);
    padding: 0;
  }
  .message-row-content .attachment__caption {
    display: none;
  }

  /* ─── Inline images (rich-text embeds) ─── */
  .message-inline-image-trigger {
    position: relative;
    display: inline-block;
    width: var(--message-media-tile, 132px);
    height: var(--message-media-tile, 132px);
    margin: 0.35rem 0.35rem 0.35rem 0;
    border-radius: 10px;
    border: 1px solid rgba(var(--msg-ink-rgb),0.09);
    background: var(--msg-well);
    vertical-align: top;
    text-decoration: none;
    overflow: hidden;
    line-height: 0;
  }
  .message-inline-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: var(--msg-well);
  }
  .message-inline-image-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 8px;
    background: linear-gradient(to top, rgba(var(--msg-scrim-rgb),0.5), rgba(var(--msg-scrim-rgb),0.06));
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
  }
  .message-row-content .trix-content .message-inline-image-overlay {
    padding: 8px !important;
    line-height: 1;
  }
  .message-inline-image-trigger:hover .message-inline-image-overlay {
    opacity: 1;
  }
  .message-lightbox-trigger {
    cursor: zoom-in;
  }
  .message-attachment-link:hover {
    background: rgba(var(--msg-ink-rgb),0.04) !important;
    border-color: rgba(var(--msg-ink-rgb),0.14) !important;
  }
  .message-lightbox-trigger:hover {
    border-color: rgba(var(--msg-ink-rgb),0.16) !important;
  }

  /* ─── Uploaded photo grid — uniform squares ─── */
  .messages-photo-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-width: calc(var(--message-media-tile, 132px) * 3 + 12px);
  }
  .messages-photo-card {
    position: relative;
    display: block;
    flex: 0 0 var(--message-media-tile, 132px);
    width: var(--message-media-tile, 132px);
    height: var(--message-media-tile, 132px);
    overflow: hidden;
    border-radius: 10px;
    border: 1px solid rgba(var(--msg-ink-rgb),0.09);
    background: var(--msg-well);
    line-height: 0;
    text-decoration: none;
  }
  .messages-photo-image {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: var(--msg-well);
  }
  .messages-photo-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 8px;
    background: linear-gradient(to top, rgba(var(--msg-scrim-rgb),0.45), transparent 55%);
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
    line-height: 1.2;
  }
  .messages-photo-card:hover .messages-photo-overlay {
    opacity: 1;
  }

  /* ─── Video players — stacked, comfortable size ─── */
  .messages-video-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-width: 32rem;
  }
  .messages-video-player {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    border: 1px solid rgba(var(--msg-ink-rgb),0.09);
    background: #000;
    box-shadow: 0 1px 3px rgba(var(--msg-shadow-rgb),0.06);
  }
  .messages-video-player-element {
    display: block;
    width: 100%;
    max-height: 360px;
    background: #000;
  }
  /* Expand-to-viewer control, top-right of an inline video. */
  .messages-video-expand {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: none;
    color: #fff;
    background: rgba(var(--msg-shadow-rgb),0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.18s ease, background 0.18s ease;
  }
  .messages-video-player:hover .messages-video-expand,
  .messages-video-expand:focus-visible {
    opacity: 1;
  }
  .messages-video-expand:hover {
    background: rgba(var(--msg-shadow-rgb),0.78);
  }
  .messages-video-expand svg {
    width: 16px;
    height: 16px;
  }
  /* Touch devices have no hover — keep the affordance visible. */
  @media (hover: none) {
    .messages-video-expand { opacity: 1; }
  }

  /* ─── Slack-style in-page media viewer (lightbox) ─── */
  .messages-lightbox {
    -webkit-tap-highlight-color: transparent;
  }
  .messages-lightbox-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: min(96vw, 1400px);
    max-height: 88vh;
  }
  .messages-lightbox-media {
    display: block;
    max-width: min(96vw, 1400px);
    max-height: 88vh;
    width: auto;
    height: auto;
    border-radius: 8px;
    object-fit: contain;
    background: #000;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  }
  .messages-lightbox-toolbar {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: calc(100vw - 24px);
  }
  .messages-lightbox-title {
    max-width: 42vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12.5px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
  }
  .messages-lightbox-tool {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    transition: background 0.18s ease;
    cursor: pointer;
  }
  .messages-lightbox-tool:hover {
    background: rgba(255, 255, 255, 0.28);
  }
  .messages-lightbox-tool svg {
    width: 18px;
    height: 18px;
  }
  .messages-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    cursor: pointer;
    transition: background 0.18s ease, opacity 0.18s ease;
  }
  .messages-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.28);
  }
  .messages-lightbox-nav svg {
    width: 20px;
    height: 20px;
  }
  .messages-lightbox-nav--prev { left: 12px; }
  .messages-lightbox-nav--next { right: 12px; }
  .messages-lightbox-nav.is-disabled {
    opacity: 0.35;
    cursor: not-allowed;
  }
  .messages-lightbox-counter {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
  }
  @media (max-width: 640px) {
    .messages-lightbox-nav {
      width: 38px;
      height: 38px;
    }
    .messages-lightbox-nav--prev { left: 6px; }
    .messages-lightbox-nav--next { right: 6px; }
    .messages-lightbox-title { display: none; }
  }
  .message-upload-tile--video {
    background: #000;
  }
  .message-upload-video {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
  }

  /* ─── Message editing ─── */
  .message-edit-row:hover {
    background: transparent;
  }
  .message-edit-card {
    border: 1px solid rgba(var(--msg-ink-rgb),0.12);
    border-radius: 10px;
    background: var(--msg-surface);
    box-shadow: 0 2px 8px rgba(var(--msg-shadow-rgb),0.06);
    overflow: hidden;
  }
  .message-edit-card trix-toolbar {
    display: none !important;
  }
  .message-edit-card trix-editor {
    border: 0 !important;
    margin: 0 !important;
    min-height: 74px;
    max-height: 240px;
    overflow-y: auto;
    padding: 0.5rem 0.7rem !important;
    outline: none !important;
    color: var(--msg-ink);
    line-height: 1.45;
  }
  .message-edit-card trix-editor,
  .message-edit-card trix-editor * {
    font-family: 'FixelText', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif !important;
  }
  .message-edit-card trix-editor:empty:not(:focus)::before,
  .message-edit-card trix-editor::before {
    font-family: inherit !important;
  }
  .message-edit-actions {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .message-edit-save {
    border: none;
    border-radius: 8px;
    background: var(--messages-accent);
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    transition: background-color 0.15s ease;
  }
  .message-edit-save:hover {
    background: var(--messages-accent-hover);
  }
  .message-edit-cancel {
    border: 1px solid rgba(var(--msg-ink-rgb),0.12);
    border-radius: 8px;
    background: var(--msg-surface);
    color: var(--msg-ink);
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    transition: background-color 0.15s ease, border-color 0.15s ease;
  }
  .message-edit-cancel:hover {
    background: var(--msg-well);
    border-color: rgba(var(--msg-ink-rgb),0.18);
  }
  .message-edit-hint {
    color: var(--msg-quiet);
    font-size: 11px;
    margin-left: 2px;
  }

  /* ─── Message row actions ─── */
  .message-row-actions {
    position: absolute;
    top: 4px;
    right: 10px;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 1px;
    border: 1px solid rgba(var(--msg-ink-rgb),0.1);
    border-radius: 9px;
    padding: 3px;
    background: var(--msg-surface);
    box-shadow:
      0 1px 2px rgba(var(--msg-shadow-rgb),0.06),
      0 4px 14px rgba(var(--msg-shadow-rgb),0.1);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-1px);
    transition:
      opacity 0.14s ease,
      visibility 0.14s ease,
      transform 0.14s ease,
      box-shadow 0.14s ease;
  }
  .message-row:hover .message-row-actions,
  .message-row:focus-within .message-row-actions,
  .message-row-actions:focus-within {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    box-shadow:
      0 1px 3px rgba(var(--msg-shadow-rgb),0.08),
      0 6px 18px rgba(var(--msg-shadow-rgb),0.14);
  }
  .message-row-actions .notification-action-btn {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    color: var(--msg-ink-soft);
  }
  .message-row-actions .notification-action-btn:hover {
    background-color: rgba(var(--msg-ink-rgb),0.07);
    color: var(--msg-ink);
  }
  /* "More options" overflow menu in the row toolbar. */
  .message-more-menu { position: relative; }
  .message-more-menu > summary { list-style: none; }
  .message-more-menu > summary::-webkit-details-marker { display: none; }
  .message-more-menu > summary:focus-visible,
  .message-row-actions .notification-action-btn:focus-visible {
    outline: 2px solid var(--msg-ink-soft);
    outline-offset: 1px;
  }
  .message-more-menu[open] > summary {
    background-color: rgba(var(--msg-ink-rgb),0.07);
    color: var(--msg-ink);
  }
  .message-more-menu-panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 30;
    min-width: 160px;
    padding: 4px;
    border: 1px solid rgba(var(--msg-ink-rgb),0.1);
    border-radius: 9px;
    background: var(--msg-surface);
    box-shadow: 0 6px 18px rgba(var(--msg-shadow-rgb),0.14);
  }
  .message-more-menu.is-menu-above .message-more-menu-panel {
    top: auto;
    bottom: calc(100% + 6px);
  }
  /* Keep the toolbar showing while its menu is open (pointer may leave the row). */
  .message-row-actions:has(.message-more-menu[open]) {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }
  .message-row-actions .notification-action-btn--danger {
    color: var(--msg-danger);
  }
  .message-row-actions .notification-action-btn--danger:hover {
    background-color: rgba(235, 87, 87, 0.1);
    color: var(--msg-danger-hover);
  }
  .message-row-actions .notification-action-btn:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--messages-accent) 45%, transparent);
    outline-offset: 1px;
  }

  /* ─── Mobile web message UX ─── */
  @media (max-width: 767px) {
    #internal-body-wrapper:has(.messages-index-frame--thread),
    #internal-body-wrapper:has(.mobile-message-container) {
      padding-bottom: 0 !important;
    }

    .messages-index-shell:not(.messages-index-shell--popout) {
      height: 100dvh;
      min-height: 100dvh;
      max-height: 100dvh;
    }

    .messages-stage--thread {
      height: 100%;
      min-height: 0;
      max-height: 100%;
    }

    .messages-conversation-shell {
      height: 100%;
      min-height: 0;
      max-height: 100%;
    }

    .messages-conversation-body {
      min-height: 0;
    }

    .messages-conversation-main {
      flex: 1;
      min-height: 0;
      max-height: 100%;
      overflow: hidden;
    }

    .message-row {
      padding-top: 10px !important;
      padding-bottom: 10px !important;
    }

    .message-row.is-actions-open {
      background: rgba(var(--msg-ink-rgb),0.04);
    }

    .message-row-actions {
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      transform: translateY(2px);
      top: 6px;
      right: 8px;
      padding: 2px;
      border-radius: 8px;
      box-shadow: 0 2px 10px rgba(var(--msg-shadow-rgb),0.12);
    }

    .message-row.is-actions-open .message-row-actions {
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
      transform: translateY(0);
    }

    .message-row-actions .notification-action-btn {
      width: 34px;
      height: 34px;
    }

    .messages-composer-shell {
      flex-shrink: 0;
      z-index: 12;
      padding: 6px 10px calc(8px + env(safe-area-inset-bottom, 0px));
      background: var(--msg-surface);
      border-top: 1px solid rgba(var(--msg-ink-rgb),0.08);
    }

    .messages-composer {
      overflow: visible;
    }

    .messages-composer-emoji-popover:not(.hidden) {
      position: fixed;
      left: 10px;
      right: 10px;
      bottom: calc(76px + env(safe-area-inset-bottom, 0px));
      margin-bottom: 0;
      z-index: 120;
    }

    .messages-composer-emoji-card {
      /* Height is set on open from the space that actually exists — see
         message_form_controller#positionComposerEmojiPicker. */
      max-width: none;
    }

    .mention-dropdown {
      /* JS still measures and pins it; these are the fallback so a late
         stylesheet or a missed measurement still lands above the composer
         instead of stacking unstyled buttons inside it. */
      position: fixed;
      left: 10px;
      right: 10px;
      width: auto;
      max-width: none;
      bottom: calc(76px + env(safe-area-inset-bottom, 0px));
      margin-bottom: 0;
      max-height: min(50vh, 360px);
      padding: 6px;
      border-radius: 14px;
      z-index: 120;
    }
    .mention-dropdown-header {
      position: sticky;
      top: -6px;
      z-index: 2;
      display: flex;
      align-items: center;
      padding: 8px 8px 8px;
      margin: -6px -6px 4px;
      background: inherit;
      border-bottom: 1px solid rgba(var(--msg-ink-rgb),0.07);
    }
    .mention-dropdown-header-label {
      font-size: 12px;
      font-weight: 700;
      color: var(--msg-dim);
      text-transform: uppercase;
      letter-spacing: 0.04em;
    }
    .mention-dropdown-item {
      padding: 10px 12px;
      min-height: 48px;
      gap: 12px;
      border-radius: 10px;
    }
    .mention-dropdown-avatar {
      width: 36px;
      height: 36px;
    }
    .mention-dropdown-avatar-fallback {
      font-size: 14px;
    }
    .mention-dropdown-name {
      font-size: 15px;
    }
    .mention-dropdown-badge {
      font-size: 10px;
      padding: 4px 7px;
      max-width: 38%;
    }

    .emoji-picker-popup {
      position: fixed !important;
      z-index: 10060;
    }

    .messages-composer-toolbar {
      gap: 8px;
      padding: 4px 6px 6px;
    }

    .messages-composer-toolbar-tools {
      flex: 1;
      min-width: 0;
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: none;
      flex-wrap: nowrap;
    }

    .messages-composer-toolbar-tools::-webkit-scrollbar {
      display: none;
    }

    .messages-composer-toolbar-submit {
      flex-shrink: 0;
      margin-left: auto;
    }

    .messages-composer-format-group {
      display: none;
    }

    .messages-composer-toolbar-tools label,
    .messages-composer-toolbar-tools button:not(.messages-format-button) {
      flex-shrink: 0;
    }

    .messages-send-button {
      min-width: 64px;
      padding: 8px 14px !important;
      font-size: 14px !important;
      white-space: nowrap;
    }

    .messages-composer-editor trix-editor,
    .messages-composer trix-editor {
      min-height: 44px !important;
      /* Lower than desktop: the on-screen keyboard already takes half the
         screen, so a composer that grows past this leaves nothing to read. */
      max-height: 96px !important;
      font-size: 16px !important;
    }

    .messages-video-stack {
      max-width: 100%;
    }

    .messages-conversation-header {
      padding: 10px 12px;
      padding-top: calc(10px + env(safe-area-inset-top, 0px));
    }

    .messages-stream {
      padding-left: 4px;
      padding-right: 4px;
    }

    .mobile-message-container .message-row-actions {
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
    }

    .mobile-message-container .message-row.is-actions-open .message-row-actions {
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
    }

    .mobile-message-container .messages-composer-format-group {
      display: none;
    }
  }

  /* ─── Reactions ─── */
  .message-reactions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    position: relative;
  }
  .message-reaction-pill {
    position: relative;
    cursor: pointer;
    user-select: none;
    border: 1px solid rgba(var(--msg-ink-rgb),0.09);
    border-radius: 9999px;
    background: var(--msg-well);
    min-height: 28px;
    padding: 4px 9px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
  }
  .message-reaction-pill:hover {
    border-color: rgba(var(--msg-ink-rgb),0.15);
    background: rgba(var(--msg-ink-rgb),0.04);
    transform: translateY(-1px);
  }
  .message-reaction-pill.is-active {
    border-color: color-mix(in srgb, var(--messages-accent) 30%, transparent);
    background: color-mix(in srgb, var(--messages-accent) 6%, transparent);
  }
  .message-reaction-emoji {
    font-size: 15px;
    line-height: 1;
    display: inline-flex;
  }
  .message-reaction-count {
    min-width: 12px;
    color: var(--msg-muted);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
  }
  .message-reaction-pill.is-active .message-reaction-count {
    color: var(--messages-accent);
  }
  /* Slack-style hover tooltip: who reacted (comma-separated) + the emoji. */
  .message-reaction-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    z-index: 70;
    min-width: max-content;
    max-width: min(260px, 80vw);
    padding: 7px 10px;
    border-radius: 8px;
    background: var(--msg-tooltip-bg);
    color: var(--msg-tooltip-ink);
    box-shadow: 0 8px 24px rgba(var(--msg-shadow-rgb),0.24);
    text-align: center;
    line-height: 1.35;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.14s ease, transform 0.14s ease, visibility 0.14s;
  }
  .message-reaction-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--msg-tooltip-bg);
  }
  .message-reaction-tooltip-names {
    display: block;
    font-size: 12px;
    font-weight: 600;
    white-space: normal;
    word-break: break-word;
  }
  .message-reaction-tooltip-action {
    display: block;
    margin-top: 1px;
    font-size: 11px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.66);
  }
  .message-reaction-tooltip-emoji {
    font-size: 12px;
  }
  .message-reaction-pill:hover .message-reaction-tooltip,
  .message-reaction-pill:focus-visible .message-reaction-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
  }
  /* On touch devices a hover tooltip would stick after a tap — hide it. */
  @media (hover: none) {
    .message-reaction-tooltip { display: none; }
  }
  .message-reaction-add {
    width: 28px;
    height: 28px;
    border-radius: 9999px;
    border: 1px solid rgba(var(--msg-ink-rgb),0.09);
    background: var(--msg-well);
    color: var(--msg-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  }
  .message-reaction-add:hover {
    border-color: rgba(var(--msg-ink-rgb),0.15);
    background: rgba(var(--msg-ink-rgb),0.04);
    color: var(--msg-ink);
  }

  /* ─── Emoji picker ─── */
  .emoji-picker-popup {
    position: fixed;
    z-index: 60;
    pointer-events: auto;
    /* Give the popup an intrinsic width so getBoundingClientRect() measures
       the card — not the full page width — when we position it. Without this
       the picker mis-measures and lands flush against the viewport edge. */
    width: min(260px, calc(100vw - 20px));
  }
  .emoji-picker-popup-card {
    width: 100%;
    max-height: min(70vh, 420px);
    overflow-y: auto;
    border-radius: 12px;
    border: 1px solid rgba(var(--msg-ink-rgb),0.09);
    background: var(--msg-surface);
    padding: 9px;
    box-shadow: 0 8px 24px rgba(var(--msg-shadow-rgb),0.12);
  }
  .emoji-picker-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 7px;
  }
  .emoji-picker-popup-title {
    margin: 0;
    color: var(--msg-quiet);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
  .emoji-picker-popup-close {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin: -4px -4px -4px 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--msg-muted);
    cursor: pointer;
  }
  .emoji-picker-popup-close:hover {
    background: rgba(var(--msg-ink-rgb),0.06);
    color: var(--msg-ink);
  }
  .emoji-reaction-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 4px;
  }
  .emoji-reaction-btn {
    width: 100%;
    height: 34px;
    border: none;
    border-radius: 8px;
    background: transparent;
    font-size: 20px;
    line-height: 1;
    transition: background-color 0.15s ease, transform 0.15s ease;
  }
  .emoji-reaction-btn:hover {
    background: rgba(var(--msg-ink-rgb),0.04);
    transform: translateY(-1px);
  }
  .emoji-reaction-more {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 6px 8px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--messages-accent, #2563eb);
    font-size: 12px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
  }
  .emoji-reaction-more:hover {
    background: rgba(var(--msg-ink-rgb),0.04);
  }
  .emoji-reaction-full-scroll {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 4px;
    max-height: min(220px, 40vh);
    overflow-y: auto;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(var(--msg-ink-rgb),0.08);
  }
  .messages-conversation-title-wrap .message-author-status {
    display: inline;
    margin-left: 4px;
    font-size: 15px;
    vertical-align: middle;
  }

  /* ─── Composer ─── */
  .messages-composer-shell {
    border-top: 1px solid rgba(var(--msg-ink-rgb),0.09);
    background: var(--msg-surface);
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  }
  .messages-composer {
    overflow: hidden;
    border: 1px solid rgba(var(--msg-ink-rgb),0.12);
    border-radius: 10px;
    background: var(--msg-surface);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
  }
  .messages-reply-context {
    border-bottom: 1px solid rgba(var(--msg-ink-rgb),0.06);
    background: var(--msg-well);
    padding: 7px 9px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
  }
  .messages-reply-context.hidden {
    display: none !important;
  }
  .messages-reply-context-copy {
    min-width: 0;
  }
  .messages-reply-context-title {
    margin: 0;
    color: var(--msg-ink);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .messages-reply-context-snippet {
    margin: 2px 0 0;
    color: var(--msg-muted);
    font-size: 12px;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .messages-reply-context-close {
    margin-top: 1px;
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--msg-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background-color 0.15s ease, color 0.15s ease;
  }
  .messages-reply-context-close:hover {
    background: rgba(var(--msg-ink-rgb),0.06);
    color: var(--msg-ink);
  }
  .messages-composer:focus-within {
    border-color: var(--messages-accent);
    box-shadow: 0 0 0 3px var(--messages-composer-focus-ring);
  }
  .messages-composer-editor {
    padding: 2px 4px;
    font-family: 'FixelText', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  }
  .messages-composer-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border-top: 1px solid rgba(var(--msg-ink-rgb),0.06);
    background: var(--msg-surface);
    padding: 6px 8px;
  }
  .messages-composer-toolbar-tools {
    display: flex;
    align-items: center;
    gap: 2px;
    min-width: 0;
  }
  .messages-composer-toolbar-submit {
    display: flex;
    align-items: center;
    flex-shrink: 0;
  }
  .messages-composer-format-group {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-right: 3px;
    padding-right: 4px;
    border-right: 1px solid rgba(var(--msg-ink-rgb),0.06);
  }
  .messages-format-button {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--msg-muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    transition: background-color 0.15s ease, color 0.15s ease;
  }
  .messages-format-button:hover {
    background: rgba(var(--msg-ink-rgb),0.06);
    color: var(--msg-ink);
  }
  .messages-format-button:focus-visible,
  .messages-composer-toolbar button:focus-visible,
  .messages-composer-toolbar label:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--messages-accent) 40%, transparent);
    outline-offset: 1px;
  }
  .messages-format-button.is-active {
    background: color-mix(in srgb, var(--messages-accent) 8%, transparent);
    color: var(--messages-accent);
  }
  .messages-format-glyph-italic {
    font-family: Georgia, "Times New Roman", serif;
    font-style: italic;
    font-weight: 700;
    font-size: 13px;
    line-height: 1;
    text-transform: lowercase;
  }
  .messages-send-button {
    background: var(--messages-accent) !important;
    display: block;
  }
  .messages-send-button:hover {
    background: var(--messages-accent-hover);
  }
  .messages-send-button:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--messages-accent) 50%, white);
    outline-offset: 2px;
  }
  .messages-composer trix-toolbar {
    display: none !important;
  }
  .messages-composer trix-editor {
    border: 0 !important;
    margin: 0 !important;
    padding: 0.35rem 0.45rem !important;
    outline: none !important;
    min-height: 46px;
    /* The draft grows until it hits this, then scrolls. 280px plus a row of
       attachment thumbnails made the composer nearly half the pane, which is
       what left the emoji picker nowhere to go. Eight lines is still a
       generous draft, and the rest scrolls. */
    max-height: 176px;
    overflow-y: auto;
    color: var(--msg-ink);
    font-size: 15px;
    line-height: 1.45;
  }
  .messages-composer trix-editor,
  .messages-composer trix-editor * {
    font-family: inherit !important;
  }
  .messages-composer trix-editor:empty:not(:focus)::before,
  .messages-composer trix-editor::before {
    font-family: inherit !important;
    color: var(--msg-quiet);
    font-size: 15px;
    line-height: 1.45;
  }
  .messages-composer trix-editor a,
  .message-edit-card trix-editor a {
    color: var(--messages-accent) !important;
    text-decoration: underline !important;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 2px;
  }
  /* Pasted/dropped images belong in the upload preview strip, not inline. */
  .messages-composer trix-editor figure.attachment,
  .messages-composer trix-editor action-text-attachment,
  .messages-composer trix-editor .attachment--preview {
    display: none !important;
  }

  /* ─── Composer emoji popover ───
     The popover hangs off the TOP of the composer form and grows upward, and
     the conversation pane clips anything above it (overflow: hidden). So a tall
     composer — a long draft, or a draft plus a row of attachment thumbnails —
     used to push the card off the top of the pane: its title and first rows of
     emoji were simply gone, with nothing to scroll. Bounding the card to the
     space that actually exists, and letting the GRID take up the slack, keeps
     the whole picker reachable however tall the composer gets. */
  .messages-composer-emoji-popover {
    position: absolute;
    left: 0;
    bottom: 100%;
    z-index: 40;
    margin-bottom: 8px;
  }
  .messages-composer-emoji-card {
    width: min(320px, calc(100vw - 24px));
    max-height: min(44vh, 320px);
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-radius: 12px;
    border: 1px solid rgba(var(--msg-ink-rgb),0.09);
    background: var(--msg-surface);
    padding: 10px;
    box-shadow: 0 8px 24px rgba(var(--msg-shadow-rgb),0.12);
  }
  .messages-composer-emoji-title {
    margin: 0 0 8px;
    color: var(--msg-quiet);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
  /* The scroller, one grid per category inside it. Fills whatever the card has
     left and scrolls, rather than fixing a height the card may not have room
     for. The card's own max-height is set on open from the space actually
     available, so a second cap here would only give it less room than it has. */
  .messages-composer-emoji-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 2px;
  }
  .messages-composer-emoji-group-title {
    position: sticky;
    top: 0;
    z-index: 1;
    margin: 0;
    padding: 6px 0 4px;
    background: var(--msg-surface);
    color: var(--msg-quiet);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
  .messages-composer-emoji-group-title:first-child {
    padding-top: 0;
  }
  .messages-composer-emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 4px;
  }
  .messages-composer-emoji-btn {
    width: 100%;
    height: 30px;
    border: none;
    border-radius: 8px;
    background: transparent;
    font-size: 20px;
    line-height: 1;
    transition: background-color 0.15s ease, transform 0.15s ease;
  }
  .messages-composer-emoji-btn:hover {
    background: rgba(var(--msg-ink-rgb),0.04);
    transform: translateY(-1px);
  }

  /* ─── Composer @-mention dropdown ───
     Same surface as the To: results list and the emoji card: tokenised ink,
     12px radius, 4px inner padding. JS pins it `position: fixed` so the
     conversation pane's overflow:hidden cannot clip it — the absolute
     fallback is only for the first paint before measurement. */
  .mention-dropdown {
    position: absolute;
    left: 0;
    bottom: 100%;
    z-index: 50;
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
    min-height: 0;
    width: min(360px, calc(100vw - 24px));
    max-height: min(44vh, 320px);
    padding: 4px;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    background: var(--msg-surface);
    border: 1px solid rgba(var(--msg-ink-rgb),0.09);
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(var(--msg-shadow-rgb),0.16);
    scrollbar-width: thin;
    scrollbar-color: rgba(var(--msg-ink-rgb),0.22) transparent;
  }
  .mention-dropdown::-webkit-scrollbar { width: 6px; }
  .mention-dropdown::-webkit-scrollbar-track { background: transparent; }
  .mention-dropdown::-webkit-scrollbar-thumb {
    background: rgba(var(--msg-ink-rgb),0.22);
    border-radius: 9999px;
  }
  .mention-dropdown-header {
    display: none;
  }
  .mention-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    -webkit-appearance: none;
    appearance: none;
    color: var(--msg-ink);
    transition: background-color 0.12s ease;
  }
  .mention-dropdown-item:hover {
    background: rgba(var(--msg-ink-rgb),0.05);
  }
  .mention-dropdown-item-selected,
  .mention-dropdown-item-selected:hover {
    background: color-mix(in srgb, var(--messages-accent) 10%, transparent);
  }
  .mention-dropdown-item:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--messages-accent) 40%, transparent);
    outline-offset: -2px;
  }
  .mention-dropdown-avatar {
    width: 32px;
    height: 32px;
    border-radius: 9999px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 0 0 1px rgba(var(--msg-ink-rgb),0.08);
  }
  .mention-dropdown-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--msg-avatar-fill);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
  }
  .mention-dropdown-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
  }
  .mention-dropdown-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--msg-ink);
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mention-dropdown-username {
    font-size: 12px;
    color: var(--msg-quiet);
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mention-dropdown-badge {
    flex-shrink: 0;
    max-width: 42%;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.2;
    color: var(--msg-muted);
    background: rgba(var(--msg-ink-rgb),0.06);
    border-radius: 9999px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .mention-dropdown-badge-add {
    color: var(--messages-accent);
    background: color-mix(in srgb, var(--messages-accent) 12%, transparent);
  }

  /* ─── Upload previews ─── */
  .message-upload-preview-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    /* Attaching a stack of files used to grow the composer without limit,
       eating the conversation above it and shoving the emoji popover off the
       top of the pane. Cap it and scroll the thumbnails instead. */
    max-height: 120px;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .message-upload-tile {
    position: relative;
    width: 82px;
    height: 82px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(var(--msg-ink-rgb),0.09);
    background: var(--msg-well);
    flex-shrink: 0;
  }
  .message-upload-tile--file {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8px 6px;
    background: var(--msg-well);
  }
  .message-upload-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .message-upload-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border: none;
    border-radius: 9999px;
    background: rgba(var(--msg-scrim-rgb),0.78);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.15s ease;
  }
  .message-upload-remove:hover {
    background: rgba(var(--msg-scrim-rgb),0.92);
  }
  .message-upload-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: linear-gradient(to top, rgba(var(--msg-scrim-rgb),0.62), rgba(var(--msg-scrim-rgb),0.08));
    padding: 6px 4px;
  }
  .message-upload-overlay-label {
    color: #ffffff;
    font-size: 10px;
    font-weight: 600;
  }
  .message-upload-file-icon {
    width: 18px;
    height: 18px;
    color: var(--msg-quiet);
    margin-bottom: 4px;
  }
  .message-upload-file-name {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--msg-muted);
    font-size: 10px;
    line-height: 1.2;
  }
  .message-upload-file-size {
    color: var(--msg-quiet);
    font-size: 10px;
    line-height: 1.2;
  }
  @keyframes messageSlideInBottom {
    from {
      opacity: 0;
      transform: translateY(8px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  .animate-slide-in-bottom {
    animation: messageSlideInBottom 0.26s ease-out;
  }

  /* ─── Desktop breakpoint ─── */
  @media (min-width: 768px) {
    .messages-index-frame {
      flex-direction: row;
      min-height: 0;
    }
    .messages-sidebar {
      width: 260px;
      min-width: 240px;
      min-height: 0;
    }
    .messages-stage {
      display: flex;
    }
    .messages-index-frame--thread .messages-stage {
      display: flex;
    }
    .messages-conversation-header {
      padding: 11px 18px;
    }
    .messages-stream {
      padding-bottom: 10px;
    }
    .messages-composer-shell {
      padding: 10px 18px calc(10px + env(safe-area-inset-bottom, 0px));
    }
  }

  /* ─── Mobile breakpoint ─── */
  @media (max-width: 767px) {
    .mobile-message-container {
      position: fixed;
      inset: 0;
      /* Native app: there's no web navbar, so the old 48px nav offset was just
         dead white space. Sit flush to the top and use the iOS safe-area inset
         (status bar / notch) so the header isn't cut off. */
      top: 0;
      display: flex;
      flex-direction: column;
      background: var(--msg-surface);
      height: 100dvh;
      max-height: 100dvh;
      padding-top: env(safe-area-inset-top, 0px);
    }

    body:has(.mobile-message-container) {
      overflow: hidden;
    }

    .mobile-message-container .message-scroll-container {
      flex: 1;
      min-height: 0;
      overflow-y: auto;
      overflow-x: hidden;
      -webkit-overflow-scrolling: touch;
      overscroll-behavior-y: contain;
    }

    .mobile-message-container .message-input-container {
      flex-shrink: 0;
      z-index: 10;
      padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
      background: var(--msg-surface);
      border-top: 1px solid rgba(var(--msg-ink-rgb),0.06);
    }

    .mobile-message-container trix-toolbar,
    .messages-conversation-shell trix-toolbar {
      display: none !important;
    }

    .emoji-picker-popup {
      width: min(280px, calc(100vw - 24px));
      z-index: 10060;
    }
    .emoji-reaction-btn {
      height: 40px;
      min-height: 40px;
    }
    .message-reaction-add,
    .message-reaction-pill {
      min-height: 36px;
    }
    .messages-list-status,
    .message-author-status {
      min-width: 28px;
      min-height: 28px;
      justify-content: center;
      touch-action: manipulation;
    }
    .messages-sidebar-footer .messages-avatar-popover {
      left: auto;
      right: 0;
      width: min(280px, calc(100vw - 16px));
    }

    .messages-index-frame--thread .messages-sidebar {
      display: none;
    }
    .messages-index-frame--thread .messages-stage {
      display: flex;
      padding: 0;
    }
    .messages-conversation-shell.is-details-open .messages-conversation-main {
      margin-right: 0;
    }
    .messages-index-frame--thread .messages-conversation-info {
      display: inline-flex;
    }
    .messages-index-frame--thread .messages-details-backdrop {
      position: absolute;
      inset: 0;
      display: block;
      z-index: 17;
      background: rgba(var(--msg-scrim-rgb),0.34);
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      transition: opacity 0.2s ease, visibility 0.2s ease;
    }
    .messages-index-frame--thread .messages-details-backdrop.is-visible {
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
    }
    .messages-index-frame--thread .messages-details-drawer {
      display: flex;
      width: min(90vw, 340px);
      max-width: 340px;
      transform: translateX(104%);
      box-shadow: -4px 0 16px rgba(var(--msg-shadow-rgb),0.12);
      z-index: 18;
    }
    .mobile-message-details-toggle {
      position: fixed;
      top: calc(env(safe-area-inset-top, 0px) + 12px);
      right: 14px;
      z-index: 42;
      width: 32px;
      height: 32px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: 8px;
      border: 1px solid rgba(var(--msg-ink-rgb),0.09);
      color: var(--msg-ink);
      background: rgba(255, 255, 255, 0.92);
      box-shadow: 0 2px 8px rgba(var(--msg-shadow-rgb),0.1);
      backdrop-filter: blur(6px);
    }
    .mobile-message-details-backdrop {
      position: fixed;
      inset: 0;
      display: block;
      z-index: 39;
      background: rgba(var(--msg-scrim-rgb),0.34);
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      transition: opacity 0.2s ease, visibility 0.2s ease;
    }
    .mobile-message-details-backdrop.is-visible {
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
    }
    .mobile-message-container .messages-details-drawer {
      display: flex;
      position: fixed;
      top: 0;
      right: 0;
      bottom: 0;
      z-index: 40;
      width: min(90vw, 340px);
      max-width: 340px;
      transform: translateX(104%);
      transition: transform 0.24s ease;
      box-shadow: -4px 0 16px rgba(var(--msg-shadow-rgb),0.12);
      /* Clear the iOS status bar so the drawer's "Conversation details" header
         isn't cut off / overflowing at the top. */
      padding-top: env(safe-area-inset-top, 0px);
    }
    .mobile-message-container.is-details-open .messages-details-drawer {
      transform: translateX(0);
    }
    .mobile-message-container .messages-details-body {
      padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    }
  }
  
  /* ─── Reduced motion ─── */
  @media (prefers-reduced-motion: reduce) {
    .notification-row-base { animation: none !important; }
    * { transition-duration: 0.01s !important; }
  }
  
  /* ─── Scrollbar (Notion style) ─── */
  .notifications-root ::-webkit-scrollbar { width: 6px; }
  .notifications-root ::-webkit-scrollbar-track { background: transparent; }
  .notifications-root ::-webkit-scrollbar-thumb { background: rgba(var(--msg-ink-rgb), 0.12); border-radius: 3px; }

  /* ═══════════════════════════════════════════════════
     Realtime presence — typing · online · seen
     (additive; reuses the existing Notion palette)
     ═══════════════════════════════════════════════════ */

  /* ─── Header avatar + online dot ─── */
  .messages-conversation-avatar {
    position: relative;
    flex-shrink: 0;
    line-height: 0;
  }
  .messages-presence-dot {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 11px;
    height: 11px;
    border-radius: 9999px;
    background: var(--msg-quiet);
    border: 2px solid var(--msg-surface);
    box-shadow: 0 0 0 0 rgba(46, 168, 107, 0.45);
    transition: background-color 0.2s ease, transform 0.2s ease;
    transform: scale(0.85);
  }
  .messages-presence-dot.is-online {
    background: #2EA86B;
    transform: scale(1);
    animation: messagesPresencePulse 2.4s ease-out infinite;
  }
  .messages-presence-dot.is-away {
    background: #E5A53B;
    transform: scale(1);
    animation: none;
  }
  @keyframes messagesPresencePulse {
    0%   { box-shadow: 0 0 0 0 rgba(46, 168, 107, 0.45); }
    70%  { box-shadow: 0 0 0 5px rgba(46, 168, 107, 0); }
    100% { box-shadow: 0 0 0 0 rgba(46, 168, 107, 0); }
  }

  /* ─── Live strip (sits between stream and composer) ─── */
  .messages-live-strip {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 18px;
    background: var(--msg-surface);
    pointer-events: none;
  }
  .messages-live-strip--mobile {
    padding: 0 14px;
  }

  /* ─── Typing indicator ─── */
  .messages-typing-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(4px);
    transition: opacity 0.2s ease, transform 0.2s ease, height 0.2s ease, padding 0.2s ease;
  }
  .messages-typing-indicator.is-active {
    height: 22px;
    padding: 1px 0 3px;
    opacity: 1;
    transform: translateY(0);
  }
  .messages-typing-dots {
    display: inline-flex;
    align-items: flex-end;
    gap: 3px;
    padding: 5px 9px;
    border-radius: 9999px;
    background: var(--msg-well);
    border: 1px solid rgba(var(--msg-ink-rgb),0.06);
  }
  .messages-typing-dots span {
    width: 5px;
    height: 5px;
    border-radius: 9999px;
    background: var(--msg-quiet);
    display: inline-block;
    animation: messagesTypingBounce 1.2s ease-in-out infinite;
  }
  .messages-typing-dots span:nth-child(2) { animation-delay: 0.18s; }
  .messages-typing-dots span:nth-child(3) { animation-delay: 0.36s; }
  @keyframes messagesTypingBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
    30%           { transform: translateY(-4px); opacity: 1; }
  }
  .messages-typing-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--msg-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* ─── Seen / read receipt ─── */
  .messages-seen-receipt {
    display: none;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    height: 0;
    opacity: 0;
    transform: translateY(3px);
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
  .messages-seen-receipt.is-active {
    display: flex;
    height: 20px;
    opacity: 1;
    transform: translateY(0);
    padding-bottom: 2px;
  }
  .messages-seen-avatars {
    display: inline-flex;
    align-items: center;
  }
  .messages-seen-avatar {
    width: 16px;
    height: 16px;
    border-radius: 9999px;
    overflow: hidden;
    border: 1.5px solid var(--msg-surface);
    background: var(--msg-well);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: -5px;
  }
  .messages-seen-avatar:first-child { margin-left: 0; }
  .messages-seen-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .messages-seen-avatar--fallback {
    font-size: 9px;
    font-weight: 700;
    color: var(--msg-muted);
  }
  .messages-seen-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--msg-quiet);
    letter-spacing: 0.01em;
  }

  /* ─── Micro-interactions (humanization & polish) ─── */
  /* Satisfying press on emoji + reaction controls */
  .emoji-reaction-btn:active,
  .messages-composer-emoji-btn:active {
    transform: scale(0.86);
  }
  .message-reaction-pill:active {
    transform: scale(0.94);
  }
  .message-reaction-add:active {
    transform: scale(0.9);
  }
  /* Emoji picker entrance */
  .emoji-picker-popup-card {
    transform-origin: bottom right;
    animation: messagesPickerPop 0.16s ease-out;
  }
  @keyframes messagesPickerPop {
    from { opacity: 0; transform: translateY(6px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
  }
  /* Send button — gentle lift + press feedback */
  .messages-send-button {
    transition: background-color 0.15s ease, transform 0.12s ease, box-shadow 0.2s ease;
  }
  .messages-send-button:not(:disabled):hover {
    transform: translateY(-1px);
  }
  .messages-send-button:not(:disabled):active {
    transform: translateY(0) scale(0.97);
  }
  /* Composer attachment / tool buttons — subtle press */
  .messages-composer-toolbar label:active,
  .messages-composer-toolbar button:not(.messages-send-button):active {
    transform: scale(0.92);
  }

  @media (prefers-reduced-motion: reduce) {
    .messages-presence-dot.is-online { animation: none; }
    .messages-typing-dots span { animation: none; opacity: 0.7; }
    .emoji-picker-popup-card { animation: none; }
  }
  /* ═══════════════════════════════════════════════════
     Messages — presence status menu (sidebar header)
     ═══════════════════════════════════════════════════ */
  .messages-status-menu {
    position: relative;
  }
  .messages-status-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    padding: 3px 7px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--msg-muted);
    font-size: 12px;
    font-weight: 500;
    transition: background-color 0.12s ease, color 0.12s ease;
  }
  .messages-status-trigger:hover { background: rgba(var(--msg-ink-rgb),0.06); color: var(--msg-ink); }
  .messages-status-caret { width: 13px; height: 13px; opacity: 0.7; }
  .messages-status-dot {
    width: 9px;
    height: 9px;
    border-radius: 9999px;
    flex-shrink: 0;
    background: var(--msg-quiet);
    box-shadow: inset 0 0 0 1.5px rgba(var(--msg-ink-rgb),0.08);
  }
  .messages-status-dot[data-status="active"] { background: #2EA86B; }
  .messages-status-dot[data-status="away"] { background: #E5A53B; }
  .messages-status-dot[data-status="offline"] { background: transparent; box-shadow: inset 0 0 0 1.5px var(--msg-quiet); }
  .messages-status-popover {
    position: absolute;
    z-index: 40;
    top: calc(100% + 4px);
    left: 0;
    min-width: 184px;
    padding: 5px;
    border-radius: 10px;
    background: var(--msg-surface);
    border: 1px solid rgba(var(--msg-ink-rgb),0.1);
    box-shadow: 0 10px 30px rgba(var(--msg-shadow-rgb),0.16);
  }
  .messages-status-option {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 7px 9px;
    border: none;
    border-radius: 7px;
    background: transparent;
    color: var(--msg-ink);
    font-size: 13px;
    text-align: left;
    transition: background-color 0.12s ease;
  }
  .messages-status-option:hover { background: rgba(var(--msg-ink-rgb),0.06); }
  .messages-status-option.is-selected { background: color-mix(in srgb, var(--messages-accent) 10%, transparent); color: var(--messages-accent); }

  /* ═══════════════════════════════════════════════════
     Messages — sidebar footer (avatar menu + focus mode)
     ═══════════════════════════════════════════════════ */
  .messages-sidebar-footer {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid rgba(var(--msg-ink-rgb),0.09);
    background: var(--msg-well);
  }

  /* ── Avatar menu ── */
  .messages-avatar-menu { position: relative; flex: 1 1 auto; min-width: 0; }
  .messages-avatar-trigger {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    min-width: 0;
    padding: 5px 7px;
    border: none;
    border-radius: 8px;
    background: transparent;
    text-align: left;
    transition: background-color 0.12s ease;
  }
  .messages-avatar-trigger:hover { background: rgba(var(--msg-ink-rgb),0.06); }
  .messages-avatar-figure { position: relative; flex-shrink: 0; width: 30px; height: 30px; }
  .messages-avatar-img,
  .messages-avatar-fallback {
    width: 30px; height: 30px; border-radius: 9999px;
    object-fit: cover; display: flex; align-items: center; justify-content: center;
  }
  .messages-avatar-fallback {
    background: color-mix(in srgb, var(--messages-accent) 16%, var(--msg-surface));
    color: var(--messages-accent); font-size: 13px; font-weight: 700;
  }
  .messages-avatar-presence {
    position: absolute; right: -1px; bottom: -1px;
    width: 11px; height: 11px; border-radius: 9999px;
    background: var(--msg-quiet); box-shadow: 0 0 0 2px var(--msg-well);
  }
  .messages-avatar-presence[data-status="active"] { background: #2EA86B; }
  .messages-avatar-presence[data-status="away"] { background: #E5A53B; }
  .messages-avatar-presence[data-status="offline"] { background: var(--msg-surface); box-shadow: 0 0 0 2px var(--msg-well), inset 0 0 0 1.5px var(--msg-quiet); }
  .messages-avatar-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
  .messages-avatar-name { font-size: 13px; font-weight: 600; color: var(--msg-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .messages-avatar-status { font-size: 11.5px; color: var(--msg-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .messages-avatar-status-muted { color: var(--msg-faint); }
  .messages-avatar-caret { width: 14px; height: 14px; flex-shrink: 0; margin-left: auto; opacity: 0.55; color: var(--msg-muted); }

  .messages-avatar-popover {
    position: absolute;
    z-index: 60;
    bottom: calc(100% + 8px);
    left: 0;
    width: 240px;
    max-width: calc(100vw - 28px);
    max-height: min(440px, calc(100vh - 120px));
    overflow-y: auto;
    padding: 10px;
    border-radius: 12px;
    background: var(--msg-surface);
    border: 1px solid rgba(var(--msg-ink-rgb),0.1);
    box-shadow: 0 16px 44px rgba(var(--msg-shadow-rgb),0.22);
  }
  .messages-avatar-section { display: flex; flex-direction: column; gap: 6px; }
  .messages-avatar-section-title {
    margin: 2px 4px; font-size: 11px; font-weight: 600; letter-spacing: 0.02em;
    text-transform: uppercase; color: var(--msg-faint);
  }
  .messages-avatar-divider { height: 1px; margin: 8px 0; background: rgba(var(--msg-ink-rgb),0.08); }

  .messages-avatar-status-row {
    display: flex; align-items: center; gap: 8px;
    padding: 7px 9px; border-radius: 8px;
    background: color-mix(in srgb, var(--messages-accent) 8%, transparent);
  }
  .messages-avatar-status-row[hidden] { display: none !important; }
  .messages-avatar-status-current { flex: 1; min-width: 0; font-size: 13px; font-weight: 500; color: var(--msg-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .messages-avatar-status-clear {
    flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; border: none; border-radius: 6px; background: transparent; color: var(--msg-muted);
  }
  .messages-avatar-status-clear:hover { background: rgba(var(--msg-ink-rgb),0.08); color: var(--msg-ink); }

  .messages-avatar-status-form { display: flex; flex-direction: column; gap: 8px; }
  .messages-avatar-status-input {
    display: flex; align-items: center; gap: 6px;
    border: 1px solid rgba(var(--msg-ink-rgb),0.14); border-radius: 8px;
    padding: 5px 12px 5px 5px;
    background: var(--msg-surface);
  }
  .messages-avatar-status-input:focus-within { border-color: var(--messages-accent); }
  .messages-avatar-text-input {
    flex: 1; min-width: 0;
    margin: 0;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0 !important;
    font-size: 13px; line-height: 1.35; color: var(--msg-ink);
    -webkit-appearance: none;
    appearance: none;
  }
  .messages-avatar-text-input:focus,
  .messages-avatar-text-input:focus-visible {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
  }
  .messages-avatar-text-input::placeholder { color: var(--msg-quiet); }

  /* Status emoji picker trigger + its empty state. */
  .messages-avatar-emoji-button {
    flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; padding: 0;
    border: none; border-radius: 7px; background: transparent; cursor: pointer;
    transition: background-color 0.12s ease;
  }
  .messages-avatar-emoji-button:hover { background: rgba(var(--msg-ink-rgb),0.07); }
  .messages-avatar-emoji-glyph { font-size: 17px; line-height: 1; }
  .messages-avatar-emoji-placeholder { width: 18px; height: 18px; color: var(--msg-quiet); }
  /* Empty state: show the muted smiley outline, hide the (blank) glyph. */
  .messages-avatar-emoji-button:not(.is-empty) .messages-avatar-emoji-placeholder { display: none; }
  .messages-avatar-emoji-button.is-empty .messages-avatar-emoji-glyph { display: none; }

  .messages-avatar-emoji-popover {
    border: 1px solid rgba(var(--msg-ink-rgb),0.12);
    border-radius: 10px;
    background: var(--msg-surface);
    padding: 6px;
    box-shadow: 0 6px 20px rgba(var(--msg-shadow-rgb),0.1);
  }
  .messages-avatar-emoji-popover[hidden] { display: none; }
  .messages-avatar-emoji-none {
    display: flex; align-items: center; gap: 6px; width: 100%;
    padding: 5px 7px; margin-bottom: 5px;
    border: none; border-radius: 7px; background: transparent;
    color: var(--msg-muted); font-size: 12px; cursor: pointer;
  }
  .messages-avatar-emoji-none:hover { background: rgba(var(--msg-ink-rgb),0.06); color: var(--msg-ink); }
  .messages-avatar-emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 2px;
    max-height: 176px;
    overflow-y: auto;
  }
  .messages-avatar-emoji-choice {
    display: inline-flex; align-items: center; justify-content: center;
    aspect-ratio: 1 / 1; padding: 0;
    border: none; border-radius: 6px; background: transparent;
    font-size: 17px; line-height: 1; cursor: pointer;
    transition: background-color 0.1s ease, transform 0.1s ease;
  }
  .messages-avatar-emoji-choice:hover { background: rgba(var(--msg-ink-rgb),0.08); transform: scale(1.12); }

  .messages-avatar-presets { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
  .messages-avatar-preset {
    display: flex; align-items: center; gap: 7px;
    padding: 6px 8px; border: 1px solid rgba(var(--msg-ink-rgb),0.1); border-radius: 8px;
    background: var(--msg-surface); color: var(--msg-ink); font-size: 12.5px; text-align: left; min-width: 0;
    transition: background-color 0.12s ease, border-color 0.12s ease;
  }
  .messages-avatar-preset:hover { background: rgba(var(--msg-ink-rgb),0.05); border-color: rgba(var(--msg-ink-rgb),0.16); }
  .messages-avatar-preset-emoji { flex-shrink: 0; font-size: 14px; }
  .messages-avatar-preset-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  .messages-avatar-expiry {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    font-size: 12px; color: var(--msg-muted); padding: 0 2px;
  }
  .messages-avatar-expiry-select {
    border: 1px solid rgba(var(--msg-ink-rgb),0.14); border-radius: 7px;
    padding: 4px 8px; font-size: 12px; color: var(--msg-ink); background: var(--msg-surface);
  }
  .messages-avatar-status-save {
    margin-top: 2px; padding: 8px 10px; border: none; border-radius: 8px;
    background: var(--messages-accent); color: #fff; font-size: 13px; font-weight: 600;
    transition: filter 0.12s ease;
  }
  .messages-avatar-status-save:hover { filter: brightness(0.96); }

  .messages-avatar-presence-option {
    display: flex; align-items: center; gap: 9px; width: 100%;
    padding: 7px 9px; border: none; border-radius: 7px; background: transparent;
    color: var(--msg-ink); font-size: 13px; text-align: left; transition: background-color 0.12s ease;
  }
  .messages-avatar-presence-option:hover { background: rgba(var(--msg-ink-rgb),0.06); }
  .messages-avatar-presence-option.is-selected { background: color-mix(in srgb, var(--messages-accent) 10%, transparent); color: var(--messages-accent); }
  .messages-avatar-presence-hint { margin-left: auto; font-size: 11px; color: var(--msg-faint); }

  /* ── Focus mode toggle ── */
  .messages-focus { flex-shrink: 0; }
  .messages-focus-trigger {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 10px; border: 1px solid rgba(var(--msg-ink-rgb),0.12); border-radius: 999px;
    background: var(--msg-surface); color: var(--msg-muted); font-size: 12px; font-weight: 600;
    transition: background-color 0.12s ease, color 0.12s ease, border-color 0.12s ease;
  }
  .messages-focus-trigger:hover { background: rgba(var(--msg-ink-rgb),0.05); color: var(--msg-ink); }
  .messages-focus-icon { width: 15px; height: 15px; }
  .messages-focus.is-on .messages-focus-trigger {
    background: color-mix(in srgb, var(--messages-accent) 14%, var(--msg-surface));
    border-color: color-mix(in srgb, var(--messages-accent) 38%, transparent);
    color: var(--messages-accent);
  }

  /* ═══════════════════════════════════════════════════
     Messages — avatar presence badge (availability + status)
     Overlaid bottom-right of any user avatar across the messages UI.
     ═══════════════════════════════════════════════════ */
  .messages-presence-badge {
    position: absolute;
    right: -3px;
    bottom: -3px;
    z-index: 2;
    width: 11px;
    height: 11px;
    border-radius: 9999px;
    background: var(--msg-quiet);
    box-shadow: 0 0 0 2px var(--msg-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
  }
  .messages-presence-badge[data-availability="active"] { background: #2EA86B; }
  .messages-presence-badge[data-availability="away"] { background: #E5A53B; }
  .messages-presence-badge[data-availability="offline"] { background: var(--msg-surface); box-shadow: 0 0 0 2px var(--msg-surface), inset 0 0 0 1.5px var(--msg-quiet); }
  /* Auto-decided "inactive" — a muted grey dot (filled, distinct from the hollow
     "appear offline"). */
  .messages-presence-badge[data-availability="inactive"] { background: var(--msg-quiet); box-shadow: 0 0 0 2px var(--msg-surface); }
  /* With a custom status the badge becomes a white chip holding the comment
     icon; availability is conveyed by the ring colour. */
  .messages-presence-badge.has-status { width: 16px; height: 16px; background: var(--msg-surface); }
  .messages-presence-badge.has-status[data-availability="active"]  { box-shadow: 0 0 0 2px var(--msg-surface), inset 0 0 0 1.6px #2EA86B; }
  .messages-presence-badge.has-status[data-availability="away"]    { box-shadow: 0 0 0 2px var(--msg-surface), inset 0 0 0 1.6px #E5A53B; }
  .messages-presence-badge.has-status[data-availability="offline"] { box-shadow: 0 0 0 2px var(--msg-surface), inset 0 0 0 1.6px var(--msg-quiet); }
  .messages-presence-badge.has-status[data-availability="inactive"] { box-shadow: 0 0 0 2px var(--msg-surface), inset 0 0 0 1.6px var(--msg-quiet); }
  /* Realtime wrapper for a single-instance badge (e.g. the header). */
  .messages-presence-badge-slot { display: contents; }
  .messages-presence-badge-icon { width: 10px; height: 10px; color: var(--messages-accent, #2383E2); }
  .messages-presence-badge--lg { width: 14px; height: 14px; right: -2px; bottom: -2px; }
  .messages-presence-badge--lg.has-status { width: 18px; height: 18px; }
  .messages-presence-badge--lg .messages-presence-badge-icon { width: 11px; height: 11px; }

  /* Relative wrappers so the badge can overlay avatars without being clipped. */
  .mobile-messages-person-avatar-wrap,
  .messages-compose-quick-avatar-wrap,
  .messages-compose-result-avatar-wrap,
  .channel-create-member-avatar-wrap {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
  }

  /* ═══════════════════════════════════════════════════
     Messages — avatar menu popover head + status expiry
     ═══════════════════════════════════════════════════ */
  .messages-avatar-pop-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 2px 4px 8px;
  }
  .messages-avatar-pop-title { font-size: 13px; font-weight: 700; color: var(--msg-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .messages-avatar-pop-close {
    flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
    width: 24px; height: 24px; border: none; border-radius: 6px; background: transparent; color: var(--msg-muted);
  }
  .messages-avatar-pop-close:hover { background: rgba(var(--msg-ink-rgb),0.08); color: var(--msg-ink); }
  .messages-avatar-status-current { display: flex; flex-direction: column; min-width: 0; flex: 1; }
  .messages-avatar-status-current > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .messages-avatar-status-clearat { font-size: 11px; font-weight: 400; color: var(--msg-faint); margin-top: 1px; }
  .messages-avatar-status-clearat:empty { display: none; }
  .messages-avatar-expiry-hint { margin: 2px 2px 0; font-size: 11.5px; color: var(--messages-accent, #2383E2); }
  .messages-avatar-expiry-hint[hidden] { display: none; }

  /* DM partner's custom status line in the conversation header. */
  .messages-conversation-status { display: flex; align-items: center; gap: 5px; min-width: 0; }
  .messages-conversation-status-icon { width: 13px; height: 13px; flex-shrink: 0; color: var(--messages-accent, #2383E2); }
  .messages-conversation-status-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  /* Native index header: avatar menu + focus replace the old "Messages" title. */
  .mobile-messages-index-headleft { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1; }
  .mobile-messages-index-headleft .messages-avatar-trigger { padding: 4px 6px; }
  .mobile-messages-index-header .messages-avatar-popover {
    top: calc(100% + 8px);
    bottom: auto;
    left: auto;
    right: 0;
    width: min(280px, calc(100vw - 16px));
  }
  .mobile-messages-index-header .messages-avatar-caret { transform: rotate(180deg); }
  .mobile-messages-index-header .messages-avatar-presets {
    grid-template-columns: 1fr;
  }

  /* ═══════════════════════════════════════════════════
     Messages — collapsible sidebar sections (Channels)
     ═══════════════════════════════════════════════════ */
  .messages-sidebar-section { margin-top: 4px; }
  .messages-sidebar-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 8px 2px 6px;
  }
  .messages-sidebar-section-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    min-width: 0;
    padding: 4px 4px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--msg-dim);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.01em;
    transition: background-color 0.12s ease, color 0.12s ease;
  }
  .messages-sidebar-section-toggle:hover { background: rgba(var(--msg-ink-rgb),0.05); color: var(--msg-ink); }
  .messages-sidebar-section-caret {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    transition: transform 0.15s ease;
  }
  .messages-sidebar-section:not(.is-collapsed) .messages-sidebar-section-caret { transform: rotate(90deg); }
  .messages-sidebar-section-body { display: flex; flex-direction: column; gap: 1px; }
  /* Collapsible sidebar regions (Channels, Direct messages, Requests) set
     display:flex, which would otherwise beat the UA/preflight `[hidden]` rule
     at equal specificity — the toggle flipped `hidden` but the list stayed. */
  .messages-sidebar-section-body[hidden],
  .messages-sidebar-threads[hidden],
  .messages-channels-create[hidden],
  .messages-sidebar-section-title .message-thread-unread-count[hidden] { display: none !important; }
  button.messages-sidebar-section-title { cursor: pointer; }
  .mobile-messages-section.is-collapsed .mobile-messages-dm-empty { display: none; }
  /* Outlined create-channel button (mv-btn secondary, sm, icon) in the
     Channels header: 32px visual, 44px tap target via an invisible halo. */
  .messages-channels-create { flex-shrink: 0; margin-left: 4px; }
  .messages-channels-create::before {
    content: "";
    position: absolute;
    inset: -6px;
  }
  .messages-channel-row { padding: 0; }
  .messages-channel-hash {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    flex-shrink: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--msg-dim);
  }
  .messages-channel-row.is-active .messages-channel-hash,
  .messages-channel-row.is-unread-row .messages-channel-hash { color: var(--messages-accent); }
  .messages-channels-empty {
    display: flex;
    align-items: center;
    gap: 7px;
    width: calc(100% - 12px);
    margin: 2px 6px 4px;
    padding: 7px 9px;
    border: 1px dashed rgba(var(--msg-ink-rgb),0.16);
    border-radius: 8px;
    background: transparent;
    color: var(--msg-muted);
    font-size: 12.5px;
    transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
  }
  .messages-channels-empty:hover {
    background: color-mix(in srgb, var(--messages-accent) 6%, transparent);
    border-color: color-mix(in srgb, var(--messages-accent) 30%, transparent);
    color: var(--messages-accent);
  }

  /* ═══════════════════════════════════════════════════
     Messages — modal shell + create-channel modal
     ═══════════════════════════════════════════════════ */
  .messages-modal {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(var(--msg-shadow-rgb),0.42);
    backdrop-filter: blur(2px);
    animation: messagesModalFade 0.14s ease-out;
  }
  .messages-modal[hidden] { display: none; }
  @keyframes messagesModalFade { from { opacity: 0; } to { opacity: 1; } }
  .messages-modal-card {
    width: min(440px, 100%);
    max-height: min(86vh, 660px);
    display: flex;
    flex-direction: column;
    background: var(--msg-surface);
    border-radius: 14px;
    border: 1px solid rgba(var(--msg-ink-rgb),0.1);
    box-shadow: 0 24px 60px rgba(var(--msg-shadow-rgb),0.28);
    overflow: hidden;
    animation: messagesModalPop 0.16s ease-out;
  }
  @keyframes messagesModalPop { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }
  .messages-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(var(--msg-ink-rgb),0.08);
  }
  .messages-modal-title { margin: 0; font-size: 15px; font-weight: 700; color: var(--msg-ink); }
  .messages-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--msg-muted);
    transition: background-color 0.12s ease, color 0.12s ease;
  }
  .messages-modal-close:hover { background: rgba(var(--msg-ink-rgb),0.07); color: var(--msg-ink); }
  .channel-create-form { display: flex; flex-direction: column; min-height: 0; padding: 14px 16px 16px; gap: 14px; }
  .channel-create-field { display: flex; flex-direction: column; gap: 6px; min-height: 0; }
  .channel-create-label { font-size: 12px; font-weight: 600; color: var(--msg-muted); }
  .channel-create-name-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 9px 11px;
    border: 1px solid rgba(var(--msg-ink-rgb),0.14);
    border-radius: 9px;
    transition: border-color 0.12s ease, box-shadow 0.12s ease;
  }
  .channel-create-name-wrap:focus-within {
    border-color: var(--messages-accent);
    box-shadow: 0 0 0 3px var(--messages-composer-focus-ring);
  }
  .channel-create-hash { font-size: 16px; font-weight: 600; color: var(--msg-dim); }
  .channel-create-name { flex: 1; border: none; outline: none; font-size: 14px; color: var(--msg-ink); background: transparent; }
  .channel-create-members-head { display: flex; align-items: center; justify-content: space-between; }
  .channel-create-count { font-size: 11.5px; font-weight: 600; color: var(--messages-accent); }
  .channel-create-search {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid rgba(var(--msg-ink-rgb),0.12);
    border-radius: 8px;
    font-size: 13px;
    color: var(--msg-ink);
    outline: none;
  }
  .channel-create-search:focus { border-color: var(--messages-accent); }
  .channel-create-members-scroll {
    flex: 1;
    min-height: 120px;
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid rgba(var(--msg-ink-rgb),0.08);
    border-radius: 9px;
    padding: 4px;
  }
  .channel-create-members-loading,
  .channel-create-empty { display: flex; align-items: center; gap: 8px; padding: 16px; color: var(--msg-dim); font-size: 13px; }
  .channel-create-member {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 9px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.12s ease;
  }
  .channel-create-member:hover { background: rgba(var(--msg-ink-rgb),0.05); }
  .channel-create-member input { position: absolute; opacity: 0; pointer-events: none; }
  .channel-create-member-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    border-radius: 7px;
    overflow: hidden;
    background: rgba(var(--msg-ink-rgb),0.07);
    color: var(--msg-muted);
    font-size: 12px;
    font-weight: 700;
  }
  .channel-create-member-avatar img { width: 100%; height: 100%; object-fit: cover; }
  .channel-create-member-name { flex: 1; min-width: 0; font-size: 13.5px; color: var(--msg-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .channel-create-member-check {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--messages-accent);
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.12s ease, transform 0.12s ease;
  }
  .channel-create-member input:checked ~ .channel-create-member-check { opacity: 1; transform: scale(1); }
  .channel-create-member input:checked ~ .channel-create-member-avatar { background: color-mix(in srgb, var(--messages-accent) 16%, transparent); color: var(--messages-accent); }
  .channel-create-footer { display: flex; justify-content: flex-end; gap: 8px; }
  .channel-create-cancel {
    padding: 8px 14px;
    border: 1px solid rgba(var(--msg-ink-rgb),0.14);
    border-radius: 8px;
    background: var(--msg-surface);
    color: var(--msg-ink);
    font-size: 13px;
    font-weight: 500;
  }
  .channel-create-cancel:hover { background: rgba(var(--msg-ink-rgb),0.05); }
  .channel-create-submit {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    background: var(--messages-accent);
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    transition: background-color 0.12s ease, opacity 0.12s ease;
  }
  .channel-create-submit:hover:not(:disabled) { background: var(--messages-accent-hover); }
  .channel-create-submit:disabled { opacity: 0.5; cursor: not-allowed; }
  body.messages-modal-open { overflow: hidden; }

  /* ═══════════════════════════════════════════════════
     Messages — pop-out window chrome
     ═══════════════════════════════════════════════════ */
  .messages-index-shell--popout { display: flex; flex-direction: column; }
  .messages-popout-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    padding: 7px 12px;
    border-bottom: 1px solid rgba(var(--msg-ink-rgb),0.08);
    background: var(--msg-chrome);
    -webkit-app-region: drag;
  }
  .messages-popout-bar-title { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; color: var(--msg-ink); }
  .messages-popout-bar-actions { display: inline-flex; gap: 2px; -webkit-app-region: no-drag; }
  .messages-popout-bar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--msg-muted);
    transition: background-color 0.12s ease, color 0.12s ease;
  }
  .messages-popout-bar-btn:hover { background: rgba(var(--msg-ink-rgb),0.08); color: var(--msg-ink); }
  .messages-popout-bar-btn.is-pinned { background: color-mix(in srgb, var(--messages-accent) 14%, transparent); color: var(--messages-accent); }

  /* Dark variant — the huddle pop-out, which sits on the huddle's dark shell. */
  .messages-popout-bar--dark {
    border-bottom-color: rgba(255, 255, 255, 0.08);
    background: #171512;
  }
  .messages-popout-bar--dark .messages-popout-bar-title { color: rgba(255, 255, 255, 0.92); }
  .messages-popout-bar--dark .messages-popout-bar-btn { color: rgba(255, 255, 255, 0.6); }
  .messages-popout-bar--dark .messages-popout-bar-btn:hover { background: rgba(255, 255, 255, 0.12); color: #ffffff; }
  .popout-toast {
    position: fixed;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    padding: 8px 14px;
    border-radius: 9px;
    background: var(--msg-tooltip-bg);
    color: var(--msg-tooltip-ink);
    font-size: 12.5px;
    box-shadow: 0 10px 30px rgba(var(--msg-shadow-rgb),0.3);
    transition: opacity 0.3s ease;
  }

  /* ═══════════════════════════════════════════════════
     Messages — huddles (voice / screen-share calls)
     ═══════════════════════════════════════════════════ */
  .messages-huddle-trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    border: 1px solid rgba(var(--msg-ink-rgb),0.12);
    border-radius: 8px;
    background: var(--msg-surface);
    color: var(--msg-ink);
    font-size: 12.5px;
    font-weight: 600;
    transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
  }
  .messages-huddle-trigger:hover {
    background: rgba(var(--msg-ink-rgb),0.04);
    border-color: rgba(var(--msg-ink-rgb),0.2);
  }
  .messages-huddle-trigger.is-active {
    border-color: color-mix(in srgb, var(--messages-accent) 40%, transparent);
    background: color-mix(in srgb, var(--messages-accent) 8%, transparent);
    color: var(--messages-accent);
  }
  .messages-huddle-trigger-count:not(:empty) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 9999px;
    background: var(--messages-accent);
    color: #ffffff;
    font-size: 10.5px;
    font-weight: 700;
  }
  .messages-huddle-trigger-badge {
    position: absolute;
    top: -3px;
    left: -3px;
  }
  .huddle-live-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 9999px;
    background: #2EA86B;
    box-shadow: 0 0 0 0 rgba(46, 168, 107, 0.5);
    animation: huddlePulse 1.8s ease-out infinite;
  }
  @keyframes huddlePulse {
    0% { box-shadow: 0 0 0 0 rgba(46, 168, 107, 0.5); }
    70% { box-shadow: 0 0 0 6px rgba(46, 168, 107, 0); }
    100% { box-shadow: 0 0 0 0 rgba(46, 168, 107, 0); }
  }

  /* Expanded panel — bottom-right floating card */
  .huddle-panel {
    position: fixed;
    z-index: 130;
    right: 18px;
    bottom: 18px;
    width: min(340px, calc(100vw - 24px));
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    background: #1f1d1b;
    color: #ffffff;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    animation: huddlePop 0.18s ease-out;
  }
  @keyframes huddlePop { from { opacity: 0; transform: translateY(10px) scale(0.97); } to { opacity: 1; transform: none; } }
  .huddle-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  .huddle-panel-title { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; min-width: 0; }
  .huddle-panel-title span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .huddle-iconbtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
  }
  .huddle-iconbtn:hover { background: rgba(255, 255, 255, 0.16); }
  .huddle-iconbtn svg { width: 16px; height: 16px; }
  .huddle-screen {
    position: relative;
    background: #000000;
    aspect-ratio: 16 / 9;
  }
  .huddle-screen-video { width: 100%; height: 100%; object-fit: contain; background: #000; }
  .huddle-screen-label {
    position: absolute;
    left: 8px;
    bottom: 8px;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.55);
    font-size: 11px;
    font-weight: 600;
  }
  .huddle-tiles {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 14px;
  }
  .huddle-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 64px; }
  .huddle-tile-avatar {
    position: relative;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
  }
  .huddle-tile.is-self .huddle-tile-avatar { box-shadow: 0 0 0 2px #2EA86B; }
  .huddle-tile-avatar img { width: 100%; height: 100%; object-fit: cover; }
  .huddle-tile-mute {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 18px;
    height: 18px;
    border-radius: 9999px;
    background: #e0533d;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #1f1d1b;
  }
  .huddle-tile-mute svg { width: 10px; height: 10px; color: #fff; }
  .huddle-tile-name { font-size: 11px; font-weight: 500; max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .huddle-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 14px 8px;
  }
  .huddle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    transition: background-color 0.12s ease, transform 0.1s ease;
  }
  .huddle-btn:hover { background: rgba(255, 255, 255, 0.2); }
  .huddle-btn:active { transform: scale(0.94); }
  .huddle-btn svg { width: 20px; height: 20px; }
  .huddle-btn.is-off { background: #e0533d; }
  .huddle-btn.is-on { background: var(--messages-accent); }
  .huddle-btn--leave { background: #e0533d; }
  .huddle-btn--leave:hover { background: #c8442f; }
  .huddle-count { margin: 0; padding: 0 0 12px; text-align: center; font-size: 11.5px; color: rgba(255, 255, 255, 0.6); }

  /* Minimized — persistent floating footer toolbar */
  .huddle-bar {
    position: fixed;
    z-index: 130;
    right: 18px;
    bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px 8px 14px;
    border-radius: 9999px;
    background: #1f1d1b;
    color: #ffffff;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
    animation: huddlePop 0.16s ease-out;
  }
  .huddle-bar-info {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    background: transparent;
    color: #ffffff;
    font-size: 12.5px;
    font-weight: 600;
  }
  .huddle-bar-text { white-space: nowrap; }
  .huddle-bar-controls { display: inline-flex; align-items: center; gap: 6px; }
  .huddle-bar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
  }
  .huddle-bar-btn:hover { background: rgba(255, 255, 255, 0.2); }
  .huddle-bar-btn svg { width: 16px; height: 16px; }
  .huddle-bar-btn.is-off { background: #e0533d; }
  .huddle-bar-btn.is-on { background: var(--messages-accent); }
  .huddle-bar-btn--leave { background: #e0533d; }

  /* Placeholder bar left in the originating tab while the call is popped out */
  .huddle-bar--popped { background: #2b2724; }
  .huddle-bar-back {
    flex-shrink: 0;
    padding: 7px 13px;
    border: none;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
  }
  .huddle-bar-back:hover { background: rgba(255, 255, 255, 0.24); }

  /* ═══════════════════════════════════════════════════
     Huddle — pop-out window
     ═══════════════════════════════════════════════════ */
  /* Fixed to the viewport so the huddle fills its window whatever padding the
     app layout would otherwise impose. */
  .huddle-popout-shell {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    flex-direction: column;
    background: #1f1d1b;
    color: #ffffff;
    overflow: hidden;
  }
  .huddle-popout-stage { flex: 1; min-height: 0; display: flex; flex-direction: column; }

  /* The panel docks to the window instead of floating in a corner. */
  .huddle-panel--docked {
    position: static;
    flex: 1;
    width: 100%;
    min-height: 0;
    border-radius: 0;
    box-shadow: none;
    animation: none;
  }
  .huddle-panel--docked .huddle-tiles { flex: 1; align-content: flex-start; overflow-y: auto; }
  .huddle-panel--docked .huddle-screen { flex-shrink: 0; }
  .huddle-panel-actions { display: inline-flex; align-items: center; gap: 4px; }

  .huddle-popout-idle {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 24px;
    text-align: center;
  }
  .huddle-popout-idle-title { margin: 0; font-size: 14px; font-weight: 700; }
  .huddle-popout-idle-meta { margin: 0; font-size: 12px; color: rgba(255, 255, 255, 0.6); }
  .huddle-popout-idle-btn {
    margin-top: 10px;
    padding: 8px 16px;
    border: none;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    font-size: 12.5px;
    font-weight: 700;
  }
  .huddle-popout-idle-btn:hover { background: rgba(255, 255, 255, 0.24); }

  /* Huddle "ended" message card */
  .message-huddle-row { display: flex; justify-content: center; }
  .message-huddle-card {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--messages-accent) 7%, transparent);
    border: 1px solid color-mix(in srgb, var(--messages-accent) 18%, transparent);
  }
  .message-huddle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--messages-accent) 14%, transparent);
    color: var(--messages-accent);
    flex-shrink: 0;
  }
  .message-huddle-text { display: flex; flex-direction: column; line-height: 1.25; }
  .message-huddle-title { font-size: 13px; font-weight: 600; color: var(--msg-ink); }
  .message-huddle-meta { font-size: 11.5px; color: var(--msg-muted); }

  @media (max-width: 767px) {
    .huddle-panel { right: 10px; left: 10px; bottom: 10px; width: auto; }
    .huddle-bar { right: 10px; left: 10px; bottom: 10px; justify-content: space-between; }
    .messages-huddle-trigger-label { display: none; }
  }

  /* Lazy details-drawer frame — display:contents so the frame adds no box and
     the inner body keeps the drawer's existing scroll/layout behaviour. */
  turbo-frame.messages-details-frame { display: contents; }
  .messages-details-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
  }

  /* ═══════════════════════════════════════════════════
     Huddle invites — global banner + sidebar section
     ═══════════════════════════════════════════════════ */
  .huddle-invite-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #1f1d1b;
    color: #ffffff;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.32);
    transition: opacity 0.25s ease, transform 0.25s ease;
    animation: slideInDown 0.28s ease-out;
  }
  @keyframes slideInDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
  .huddle-invite-banner-dot { display: inline-flex; }
  .huddle-invite-banner-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
  .huddle-invite-banner-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .huddle-invite-banner-meta { font-size: 11.5px; color: rgba(255, 255, 255, 0.66); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .huddle-invite-banner-join {
    flex-shrink: 0;
    padding: 6px 14px;
    border: none;
    border-radius: 8px;
    background: #2EA86B;
    color: #ffffff;
    font-size: 12.5px;
    font-weight: 700;
  }
  .huddle-invite-banner-join:hover { background: #279c61; }
  .huddle-invite-banner-close {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 16px;
    line-height: 1;
  }
  .huddle-invite-banner-close:hover { background: rgba(255, 255, 255, 0.2); }

  .messages-huddles-section-title { color: var(--msg-ink); cursor: default; gap: 6px; }
  .messages-huddle-invite {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 1px 6px;
    padding: 7px 9px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--messages-accent) 7%, transparent);
    border: 1px solid color-mix(in srgb, var(--messages-accent) 18%, transparent);
    transition: background-color 0.12s ease, border-color 0.12s ease;
  }
  .messages-huddle-invite:hover {
    background: color-mix(in srgb, var(--messages-accent) 12%, transparent);
    border-color: color-mix(in srgb, var(--messages-accent) 30%, transparent);
  }
  .messages-huddle-invite-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    border-radius: 8px;
    background: color-mix(in srgb, var(--messages-accent) 16%, transparent);
    color: var(--messages-accent);
  }
  .messages-huddle-invite-icon svg { width: 16px; height: 16px; }
  .messages-huddle-invite-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
  .messages-huddle-invite-title { font-size: 13px; font-weight: 600; color: var(--msg-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .messages-huddle-invite-meta { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--msg-muted); }
  .messages-huddle-invite-join {
    flex-shrink: 0;
    padding: 4px 11px;
    border-radius: 7px;
    background: var(--messages-accent);
    color: #ffffff;
    font-size: 11.5px;
    font-weight: 700;
  }

  /* Mobile conversation parity — header/live-strip/composer are fixed-height
     bookends around the scrolling stream (matches desktop structure). */
  @media (max-width: 767px) {
    .mobile-message-container .messages-conversation-header {
      flex-shrink: 0;
      position: sticky;
      top: 0;
      z-index: 11;
      background: var(--msg-surface);
      /* The .mobile-message-container already adds the safe-area inset, so the
         header must NOT add it again — the generic mobile rule's
         `padding-top: calc(10px + env(safe-area-inset-top))` was doubling it
         and leaving a large white gap above the header on the native app. */
      padding-top: 10px;
    }
    .mobile-message-container .messages-live-strip { flex-shrink: 0; }
    .mobile-message-container .message-scroll-container { padding: 4px 0 8px; }
    /* The huddle panel/toolbar sit above the composer on small screens. */
    .mobile-message-container .messages-conversation-header-actions { gap: 2px; }
  }

  /* ═══════════════════════════════════════════════════
     Native-app messages index (full-screen conversation list)
     ═══════════════════════════════════════════════════ */
  .mobile-messages-index {
    display: flex;
    flex-direction: column;
    background: var(--msg-surface);
  }
  @media (max-width: 1023px) {
    .mobile-messages-index {
      position: fixed;
      inset: 0;
      /* Flush to the top + iOS safe-area inset (no web navbar on the native
         app) so there's no white gap and the header / create button clear the
         status bar and stay tappable. */
      top: 0;
      height: 100dvh;
      max-height: 100dvh;
      padding-top: env(safe-area-inset-top, 0px);
    }
    body:has(.mobile-messages-index) { overflow: hidden; }
  }
  .mobile-messages-index-header {
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px 10px;
    border-bottom: 1px solid rgba(var(--msg-ink-rgb),0.07);
    background: var(--msg-surface);
  }
  .mobile-messages-index-title { margin: 0; font-size: 20px; font-weight: 700; color: var(--msg-ink); letter-spacing: -0.02em; }
  .mobile-messages-index-compose {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    color: var(--messages-accent);
    background: color-mix(in srgb, var(--messages-accent) 10%, transparent);
  }
  .mobile-messages-index-compose:active { transform: scale(0.94); }
  .mobile-messages-index-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  }
  .mobile-messages-index-list { display: flex; flex-direction: column; }

  /* ── Recent-people widget (mirrors new-message quick picks) ── */
  .mobile-messages-widget { padding: 12px 4px 10px; border-bottom: 1px solid rgba(var(--msg-ink-rgb),0.06); }
  .mobile-messages-widget-label {
    margin: 0 0 8px 14px; font-size: 11px; font-weight: 600; letter-spacing: 0.04em;
    text-transform: uppercase; color: var(--msg-faint);
  }
  .mobile-messages-widget-row {
    display: flex; gap: 16px; padding: 0 14px 2px; overflow-x: auto;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .mobile-messages-widget-row::-webkit-scrollbar { display: none; }
  .mobile-messages-person { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 60px; flex-shrink: 0; }
  .mobile-messages-person-avatar {
    width: 52px; height: 52px; border-radius: 9999px; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 1px 3px rgba(var(--msg-shadow-rgb),0.12);
  }
  .mobile-messages-person-avatar img { width: 100%; height: 100%; object-fit: cover; }
  .mobile-messages-person-fallback {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    background: color-mix(in srgb, var(--messages-accent) 16%, var(--msg-surface));
    color: var(--messages-accent); font-size: 19px; font-weight: 700;
  }
  .mobile-messages-person:active .mobile-messages-person-avatar { transform: scale(0.95); }
  .mobile-messages-person-name {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    max-width: 100%;
    font-size: 11.5px;
    color: var(--msg-ink);
    text-align: center;
    line-height: 1.2;
  }
  .mobile-messages-person-name-text {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mobile-messages-person-name .messages-list-status {
    margin-left: 0;
    min-width: 28px;
    min-height: 28px;
    justify-content: center;
  }

  /* ── Channels + DMs in the sidebar aesthetic ── */
  .mobile-messages-sidebar { padding: 8px 8px 4px; }
  .mobile-messages-section { margin-top: 4px; }
  .mobile-messages-sidebar .messages-sidebar-section-title { padding: 8px 8px 4px; }
  .mobile-messages-sidebar .messages-thread-row { padding-top: 3px; padding-bottom: 3px; }
  .mobile-messages-dm-empty { padding: 14px 12px 6px; text-align: center; }
  .mobile-messages-dm-empty p { margin: 0 0 8px; font-size: 13px; color: var(--msg-muted); }
  .mobile-messages-dm-empty-cta {
    display: inline-block; padding: 7px 14px; border-radius: 8px; font-size: 13px; font-weight: 600;
    color: var(--messages-accent); background: color-mix(in srgb, var(--messages-accent) 10%, transparent);
  }

  /* Inbox "Messages" tab — recent chats in the messages-index aesthetic. */
  .mobile-inbox-messages { padding-top: 2px; }
  .mobile-inbox-messages .mobile-messages-sidebar { padding: 4px 12px 2px; }

  .mobile-thread-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(var(--msg-ink-rgb),0.05);
    color: inherit;
    text-decoration: none;
    transition: background-color 0.12s ease;
  }
  .mobile-thread-row:active { background: rgba(var(--msg-ink-rgb),0.05); }
  .mobile-thread-avatar {
    position: relative;
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 9999px;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2383E2, #6940CE);
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
  }
  .mobile-thread-avatar.is-channel {
    background: color-mix(in srgb, var(--messages-accent) 12%, var(--msg-well));
    color: var(--messages-accent);
    font-size: 20px;
    font-weight: 700;
  }
  .mobile-thread-avatar img { width: 100%; height: 100%; object-fit: cover; }
  .mobile-thread-unread {
    position: absolute;
    top: -1px;
    right: -1px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 9999px;
    background: var(--messages-accent);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--msg-surface);
  }
  .mobile-thread-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
  .mobile-thread-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
  .mobile-thread-name { font-size: 15px; font-weight: 500; color: var(--msg-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-thread-name.is-unread { font-weight: 700; }
  .mobile-thread-time { flex-shrink: 0; font-size: 12px; color: var(--msg-quiet); font-variant-numeric: tabular-nums; }
  .mobile-thread-time.is-unread { color: var(--messages-accent); font-weight: 600; }
  .mobile-thread-snippet { font-size: 13px; color: var(--msg-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-thread-snippet.is-unread { color: var(--msg-ink); }
  .mobile-thread-you { color: var(--msg-quiet); }
  .mobile-thread-chevron { width: 16px; height: 16px; flex-shrink: 0; color: var(--msg-line-ink); }
  .mobile-messages-index-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 64px 32px;
    gap: 6px;
  }
  .mobile-messages-index-empty-icon { font-size: 34px; }
  .mobile-messages-index-empty h3 { margin: 8px 0 0; font-size: 16px; font-weight: 700; color: var(--msg-ink); }
  .mobile-messages-index-empty p { margin: 0; font-size: 13px; color: var(--msg-muted); }
  .mobile-messages-index-empty-cta {
    margin-top: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 10px;
    background: var(--messages-accent);
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
  }

  /* ═══════════════════════════════════════════════════
     Schedule send — split send button + scheduled strip
     ═══════════════════════════════════════════════════ */
  .messages-send-split {
    position: relative;
    display: inline-flex;
    align-items: stretch;
    border-radius: 6px;
    overflow: visible;
  }
  .messages-send-split.is-busy { opacity: 0.65; pointer-events: none; }
  /* The Send half loses its right radius so the caret sits flush against it. */
  .messages-send-button--split {
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
  }
  .messages-send-caret {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    padding: 0;
    border: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.28);
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
    background: var(--messages-accent);
    color: #ffffff;
    cursor: pointer;
    transition: background-color 0.15s ease;
  }
  .messages-send-caret:hover { background: var(--messages-accent-hover); }
  .messages-send-caret:disabled { cursor: not-allowed; opacity: 0.6; }
  .messages-send-caret:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--messages-accent) 50%, white);
    outline-offset: 2px;
  }

  /* The composer clips its overflow; the schedule menu opens above it, so the
     controller unclips the box while the menu is open (see schedule_send). */
  .messages-composer.is-schedule-open {
    overflow: visible;
  }
  .messages-schedule-popover {
    position: absolute;
    z-index: 70;
    right: 0;
    bottom: calc(100% + 8px);
    width: 268px;
    max-width: calc(100vw - 28px);
    padding: 10px;
    border-radius: 12px;
    background: var(--msg-surface);
    border: 1px solid rgba(var(--msg-ink-rgb),0.1);
    box-shadow: 0 12px 32px rgba(var(--msg-shadow-rgb),0.14);
  }
  .messages-schedule-popover[hidden] { display: none; }
  .messages-schedule-title {
    margin: 2px 4px 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--msg-dim);
  }
  .messages-schedule-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 7px 8px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.12s ease;
  }
  .messages-schedule-option:hover:not(:disabled) { background: rgba(var(--msg-ink-rgb),0.05); }
  .messages-schedule-option:disabled { opacity: 0.4; cursor: not-allowed; }
  .messages-schedule-option-label { font-size: 13px; color: var(--msg-ink); }
  .messages-schedule-option-time {
    font-size: 12px;
    color: var(--msg-muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }
  .messages-schedule-divider {
    height: 1px;
    margin: 6px 4px;
    background: rgba(var(--msg-ink-rgb),0.08);
  }
  .messages-schedule-fields {
    display: flex;
    gap: 8px;
    padding: 2px 4px 0;
  }
  .messages-schedule-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1 1 0;
    min-width: 0;
  }
  .messages-schedule-field-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--msg-dim);
  }
  .messages-schedule-field-input {
    width: 100%;
    min-width: 0;
    padding: 6px 8px;
    border: 1px solid rgba(var(--msg-ink-rgb),0.14);
    border-radius: 8px;
    font-size: 13px;
    color: var(--msg-ink);
    background: var(--msg-surface);
  }
  .messages-schedule-field-input:focus {
    outline: none;
    border-color: var(--messages-accent);
    box-shadow: 0 0 0 3px var(--messages-composer-focus-ring);
  }
  .messages-schedule-confirm {
    width: calc(100% - 8px);
    margin: 10px 4px 0;
    padding: 8px 12px;
    border: 0;
    border-radius: 8px;
    background: var(--messages-accent);
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.12s ease;
  }
  .messages-schedule-confirm:hover { background: var(--messages-accent-hover); }
  .messages-schedule-hint {
    margin: 8px 4px 0;
    font-size: 11px;
    line-height: 1.4;
    color: var(--msg-dim);
  }
  .messages-schedule-hint--recipient { color: var(--msg-muted); }
  .messages-schedule-status {
    margin: 8px 4px 0;
    font-size: 12px;
    line-height: 1.4;
    color: #2EA86B;
  }
  .messages-schedule-status.is-error { color: var(--msg-danger-ink); }
  .messages-schedule-status[hidden] { display: none; }

  /* The sender's parked messages, sitting directly under the transcript in the
     same gutter as a message row so they read as the tail of the conversation.
     The container collapses to nothing when there's nothing scheduled. */
  .messages-scheduled-container { display: block; }
  .messages-scheduled-stack {
    padding: 2px 0 6px;
  }
  .messages-scheduled-row {
    position: relative;
    padding: 8px 12px;
  }
  /* iOS draws a scheduled message with a blue outline around the bubble: it's
     in the conversation, it's yours, and it hasn't gone out. Same idea here,
     drawn around the message body so the row still matches the transcript. */
  .messages-scheduled-outline {
    margin-top: 2px;
    padding: 8px 11px;
    border: 1.5px solid var(--messages-accent);
    border-radius: 12px;
    background: color-mix(in srgb, var(--messages-accent) 4%, var(--msg-surface));
  }
  .messages-scheduled-row.is-sending .messages-scheduled-outline {
    border-style: dashed;
    opacity: 0.65;
  }
  .messages-scheduled-row.is-editing { padding-bottom: 12px; }
  .messages-scheduled-empty { color: var(--msg-dim); font-style: italic; }

  .messages-scheduled-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 1px 7px 1px 5px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--messages-accent) 11%, transparent);
    color: var(--messages-accent);
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
  }
  .messages-scheduled-pill svg { width: 12px; height: 12px; }

  .messages-scheduled-attachments {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 4px 0 0;
    font-size: 11.5px;
    color: var(--msg-dim);
  }

  .messages-scheduled-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    /* Revealed on hover on the desktop; always visible where there's no hover
       (see the pointer query below), because a hidden control on a touch
       screen is no control at all. */
    opacity: 0;
    transition: opacity 0.12s ease;
  }
  .messages-scheduled-row:hover .messages-scheduled-actions,
  .messages-scheduled-row:focus-within .messages-scheduled-actions {
    opacity: 1;
  }
  .messages-scheduled-action {
    padding: 3px 9px;
    border: 1px solid rgba(var(--msg-ink-rgb),0.12);
    border-radius: 6px;
    background: var(--msg-surface);
    font-size: 12px;
    font-weight: 500;
    color: var(--msg-ink);
    cursor: pointer;
    transition: background-color 0.12s ease, color 0.12s ease;
  }
  .messages-scheduled-action:hover { background: rgba(var(--msg-ink-rgb),0.05); }
  .messages-scheduled-action:disabled { opacity: 0.5; cursor: not-allowed; }
  .messages-scheduled-action--danger { color: var(--msg-danger-ink); border-color: rgba(212, 69, 59, 0.24); }
  .messages-scheduled-action--danger:hover { background: rgba(212, 69, 59, 0.07); }

  @media (hover: none) {
    .messages-scheduled-actions { opacity: 1; }
  }

  /* Inline editor */
  .messages-scheduled-edit-error {
    margin: 0 0 8px;
    padding: 6px 9px;
    border-radius: 8px;
    background: rgba(212, 69, 59, 0.08);
    color: var(--msg-danger-deep);
    font-size: 12.5px;
    line-height: 1.4;
  }
  /* Date + time side by side under the text. */
  .messages-scheduled-edit-when {
    display: flex;
    gap: 8px;
    margin-top: 8px;
  }

  /* ═══════════════════════════════════════════════════
     Profile hovercard (Slack-style avatar preview)
     ═══════════════════════════════════════════════════ */
  /* Avatars become buttons so they're keyboard-reachable — strip the button
     chrome so the transcript looks exactly as it did before. */
  .messages-avatar-trigger-button {
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    line-height: 0;
    border-radius: 8px;
  }
  .messages-avatar-trigger-button:focus-visible,
  .messages-conversation-avatar.is-clickable:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--messages-accent) 45%, transparent);
    outline-offset: 2px;
  }
  .messages-conversation-avatar.is-clickable { cursor: pointer; }

  .messages-profile-card-layer {
    position: fixed;
    /* Above the details drawer (40) and the composer's popovers (120), below
       the huddle bar (130) — an in-progress call stays reachable. */
    z-index: 125;
  }
  .messages-profile-card {
    position: relative;
    width: 288px;
    max-width: calc(100vw - 24px);
    padding: 16px;
    border-radius: 14px;
    background: var(--msg-surface);
    border: 1px solid rgba(var(--msg-ink-rgb),0.1);
    box-shadow: 0 18px 44px rgba(var(--msg-shadow-rgb),0.18);
    font-family: 'FixelText', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  }
  .messages-profile-card-close {
    position: absolute;
    top: 8px;
    right: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--msg-dim);
    cursor: pointer;
  }
  .messages-profile-card-close:hover { background: rgba(var(--msg-ink-rgb),0.06); color: var(--msg-ink); }
  .messages-profile-card-head { display: flex; align-items: center; gap: 12px; }
  .messages-profile-card-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(var(--msg-ink-rgb),0.06);
  }
  .messages-profile-card-photo { width: 100%; height: 100%; object-fit: cover; }
  .messages-profile-card-initial { font-size: 20px; font-weight: 700; color: var(--msg-muted); }
  .messages-profile-card-identity { min-width: 0; }
  .messages-profile-card-name {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--msg-ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .messages-profile-card-handle {
    margin: 1px 0 0;
    font-size: 12.5px;
    color: var(--msg-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .messages-profile-card-presence {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 5px 0 0;
    font-size: 12px;
    color: var(--msg-muted);
  }
  .messages-profile-card-status {
    margin: 12px 0 0;
    padding: 7px 9px;
    border-radius: 8px;
    background: rgba(var(--msg-ink-rgb),0.04);
    font-size: 13px;
    color: var(--msg-ink);
  }
  .messages-profile-card-bio {
    margin: 10px 0 0;
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--msg-muted);
  }
  .messages-profile-card-time {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 12px 0 0;
    font-size: 12.5px;
    color: var(--msg-ink);
    font-variant-numeric: tabular-nums;
  }
  .messages-profile-card-time svg { flex-shrink: 0; color: var(--msg-dim); }
  .messages-profile-card-time-zone {
    color: var(--msg-dim);
    font-size: 11.5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .messages-profile-card-actions {
    display: flex;
    gap: 6px;
    margin-top: 14px;
  }
  .messages-profile-card-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex: 1 1 0;
    padding: 7px 10px;
    border: 1px solid rgba(var(--msg-ink-rgb),0.12);
    border-radius: 8px;
    background: var(--msg-surface);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--msg-ink);
    text-align: center;
    transition: background-color 0.12s ease;
  }
  .messages-profile-card-button:hover { background: rgba(var(--msg-ink-rgb),0.05); }
  .messages-profile-card-button--primary {
    background: var(--messages-accent);
    border-color: transparent;
    color: #ffffff;
  }
  .messages-profile-card-button--primary:hover { background: var(--messages-accent-hover); }
  .messages-profile-card-connect {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(var(--msg-ink-rgb),0.08);
  }

  /* ─── Profile hovercard on phones: a bottom sheet, not a popover ───
     A 288px card anchored to a 36px avatar has nowhere to go on a 375px
     screen, and a sheet matches the overlays the native app already uses. */
  .messages-profile-card-layer.is-sheet {
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
  }
  .messages-profile-card-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(var(--msg-shadow-rgb),0.38);
    /* Dragging the scrim must dismiss-or-nothing, never scroll the transcript
       underneath it. */
    touch-action: none;
    animation: messages-profile-card-fade 0.16s ease-out;
  }
  .messages-profile-card-layer.is-sheet .messages-profile-card {
    width: 100%;
    max-width: 100%;
    border-radius: 18px 18px 0 0;
    /* Clear the home indicator / gesture bar. */
    padding: 22px 18px calc(18px + env(safe-area-inset-bottom, 0px));
    /* Never taller than the screen; long bios scroll inside the sheet. */
    max-height: min(78vh, 560px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    /* Scrolling to the end of the sheet must not hand the gesture to the
       conversation behind it. */
    overscroll-behavior: contain;
    box-shadow: 0 -10px 40px rgba(var(--msg-shadow-rgb),0.22);
    animation: messages-profile-card-rise 0.2s cubic-bezier(0.32, 0.72, 0, 1);
  }
  /* Grab handle, drawn rather than marked up. */
  .messages-profile-card-layer.is-sheet .messages-profile-card::before {
    content: "";
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 4px;
    border-radius: 999px;
    background: rgba(var(--msg-ink-rgb),0.18);
  }
  /* Bigger touch targets on the sheet's controls. */
  .messages-profile-card-layer.is-sheet .messages-profile-card-close {
    width: 34px;
    height: 34px;
    top: 14px;
    right: 12px;
  }
  .messages-profile-card-layer.is-sheet .messages-profile-card-avatar {
    width: 64px;
    height: 64px;
  }
  .messages-profile-card-layer.is-sheet .messages-profile-card-actions {
    flex-wrap: wrap;
  }
  .messages-profile-card-layer.is-sheet .messages-profile-card-button {
    min-height: 44px;
    font-size: 14px;
  }
  /* The sheet owns the screen while it's open — stop the transcript behind the
     scrim from scrolling under the user's finger on iOS. */
  body.messages-profile-card-open {
    overflow: hidden;
  }

  @keyframes messages-profile-card-rise {
    from { transform: translateY(14%); opacity: 0.6; }
    to   { transform: translateY(0); opacity: 1; }
  }
  @keyframes messages-profile-card-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
  }
  @media (prefers-reduced-motion: reduce) {
    .messages-profile-card-layer.is-sheet .messages-profile-card,
    .messages-profile-card-backdrop {
      animation: none;
    }
  }

  /* Error surface for the scheduled-message actions. Lives on <body> so a
     turbo-frame reload can't wipe it, and replaces window.alert(), which the
     native app's WKWebView may never show. */
  .messages-inline-toast {
    position: fixed;
    left: 50%;
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    /* Above everything else in the messaging UI — an error the user can't see
       is the same as no error at all. */
    z-index: 140;
    max-width: min(420px, calc(100vw - 32px));
    padding: 11px 16px;
    border-radius: 10px;
    background: var(--msg-toast-bg);
    color: var(--msg-toast-ink);
    font-size: 13px;
    line-height: 1.4;
    text-align: center;
    box-shadow: 0 10px 30px rgba(var(--msg-shadow-rgb),0.26);
    animation: messages-inline-toast-in 0.18s ease-out;
  }
  @keyframes messages-inline-toast-in {
    from { opacity: 0; transform: translate(-50%, 8px); }
    to   { opacity: 1; transform: translate(-50%, 0); }
  }
  @media (prefers-reduced-motion: reduce) {
    .messages-inline-toast { animation: none; }
  }

  @media (max-width: 767px) {
    /* The mobile conversation is a flex column (header / stream / composer);
       the parked rows are a flex item between the stream and the composer, so
       pin their height instead of letting the stream squeeze them. */
    .messages-scheduled-container {
      flex: 0 0 auto;
    }
    .messages-scheduled-stack {
      /* Never let a pile of parked messages eat the transcript. */
      max-height: 46vh;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      overscroll-behavior: contain;
    }
    .messages-scheduled-row {
      padding: 8px 10px;
    }
    /* No hover on a phone, so the row's actions are always out — and sized for
       a thumb. */
    .messages-scheduled-actions {
      opacity: 1;
      gap: 8px;
      margin-top: 8px;
    }
    .messages-scheduled-action {
      flex: 1 1 0;
      min-height: 40px;
      font-size: 13px;
    }
    .messages-scheduled-edit-when {
      gap: 8px;
    }

    /* Schedule menu: a full-width panel above the composer rather than a 268px
       popover pinned to the caret — same fixed placement the composer's emoji
       picker already uses on phones. Capped in height and scrollable so it
       still fits with the keyboard up. */
    .messages-schedule-popover:not([hidden]) {
      position: fixed;
      left: 10px;
      right: 10px;
      bottom: calc(76px + env(safe-area-inset-bottom, 0px));
      width: auto;
      max-width: none;
      max-height: min(56vh, 420px);
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      z-index: 120;
    }
    .messages-schedule-option {
      min-height: 44px;
    }
    .messages-schedule-option-label {
      font-size: 14px;
    }
    .messages-schedule-field-input {
      min-height: 44px;
      /* < 16px makes iOS Safari zoom the page on focus. */
      font-size: 16px;
    }
    .messages-schedule-confirm {
      min-height: 44px;
      font-size: 15px;
    }
    .messages-send-caret {
      width: 40px;
    }
  }

/* ═══════════════════════════════════════════════════
   Native app — header chrome sits flush.

   Turbo Native already draws a nav bar above the WebView. A conversation
   header that closes itself with a hairline then reads as a second bar
   directly under the real one, so in the app the header carries no surface
   or edge of its own and runs into the conversation behind it.

   `.native-app` is stamped on <body> by the layouts only when `mobile_app?`
   is true (see MobileAppHelper#native_app_body_class), so none of this
   reaches the web.
   ═══════════════════════════════════════════════════ */
.native-app .messages-conversation-header,
.native-app .mobile-message-container .messages-conversation-header,
.native-app .messages-compose-header {
  background: transparent;
  border-bottom-color: transparent;
}

/* The messages index header sits at the top of its own full-screen surface;
   in the app the nav bar above it already marks that edge. */
.native-app .mobile-messages-index-header {
  background: transparent;
  border-bottom-color: transparent;
}

/* ═══════════════════════════════════════════════════
   Optimistic message rows.

   The composer paints your message the moment you send it, before the
   server has answered (see message_form_controller#send). A pending row is
   the real row's twin, dimmed a little so the difference is legible without
   being loud; it steps aside when the saved row arrives over the thread's
   stream.

   A send that fails keeps its row — with the text still in it — and offers
   a retry. Dropping what someone wrote because the network blinked is worse
   than any amount of visual noise.
   ═══════════════════════════════════════════════════ */
.message-row--pending { opacity: 0.62; }
.message-row--pending .message-row-content { color: inherit; }

.message-row-time--pending {
  font-style: italic;
  color: var(--msg-quiet);
}

.message-row-pending-attachments {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--msg-muted);
}

.message-row--failed { opacity: 1; }
.message-row--failed .message-row-time--pending {
  font-style: normal;
  color: var(--msg-danger-alt);
  font-weight: 600;
}

.message-row-failed {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  font-size: 12px;
}
.message-row-failed.hidden { display: none; }
.message-row-failed__text { color: var(--msg-danger-alt); }
.message-row-failed__retry,
.message-row-failed__discard {
  border: 0;
  background: none;
  padding: 0;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.message-row-failed__retry { color: var(--messages-accent, #2383E2); }
.message-row-failed__discard { color: var(--msg-muted); }

/* A retry that is already running. Dimmed and unclickable rather than removed,
   so the press that landed is visible and a second one is impossible — the
   silence after a press is what had people tapping Retry over and over. */
.message-row-failed__retry:disabled {
  color: var(--msg-quiet);
  cursor: default;
  pointer-events: none;
}

/* A row on its way out — dimmed the moment Delete is tapped, restored if the
   request fails. */
.message-row--removing {
  opacity: 0.35;
  pointer-events: none;
  transition: opacity 0.12s ease;
}

/* ── Messages polish: 44px tap targets + visible keyboard focus ──
   Header icon buttons, the Channels section toggle/add, the empty-state
   CTAs and the Focus trigger were 22–35px tall on phones. */
.messages-sidebar-iconbtn,
.messages-sidebar-compose {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.messages-sidebar-section-toggle,
.messages-channels-empty,
.messages-sidebar-empty-cta,
.messages-focus-trigger,
.messages-avatar-trigger {
  min-height: 44px;
}
.messages-sidebar-iconbtn:focus-visible,
.messages-sidebar-compose:focus-visible,
.messages-sidebar-section-toggle:focus-visible,
.messages-channels-empty:focus-visible,
.messages-sidebar-empty-cta:focus-visible,
.messages-focus-trigger:focus-visible,
.messages-avatar-trigger:focus-visible {
  outline: 2px solid hsl(var(--p));
  outline-offset: 2px;
}
.messages-sidebar-empty-cta { display: inline-flex; align-items: center; }

/* Sidebar row second line (Telegram-style): last-message preview + stamp. */
.message-thread-time {
  flex: none;
  font-size: 11px;
  line-height: 14px;
  color: rgba(var(--msg-ink-rgb), 0.5);
  font-variant-numeric: tabular-nums;
}
.message-thread-time.is-unread { color: var(--messages-accent); font-weight: 600; }
.message-thread-preview {
  margin: 1px 0 0;
  font-size: 12px;
  line-height: 16px;
  color: rgba(var(--msg-ink-rgb), 0.58);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.message-thread-preview.is-unread { color: rgba(var(--msg-ink-rgb), 0.86); font-weight: 600; }

/* ─── Transcript: new-messages divider, jump-to-latest ─── */
.messages-new-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 16px;
  color: var(--messages-accent, #d94f4a);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.messages-new-divider::before,
.messages-new-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: currentColor;
  opacity: 0.45;
}

.messages-scroll-host { position: relative; }
.messages-jump-latest {
  position: absolute;
  right: 16px;
  bottom: 12px;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: var(--btn, #171717);
  color: var(--btn-ink, #fbfbfa);
  box-shadow: 0 2px 10px rgba(0, 25, 53, 0.18);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.messages-jump-latest[hidden] { display: none; }
.messages-jump-latest__count[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .messages-jump-latest:not([hidden]) { animation: messages-jump-in 0.18s ease-out; }
  @keyframes messages-jump-in { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
}
.messages-sidebar-threads--empty:not(:empty) + .messages-sidebar-empty { display: none; }
#dash-nav li {
    border-bottom: solid;
    margin: auto;
}

#dash-nav li.inactive {
    border-bottom: none;
}

#dash-nav {
    min-width: 75%;
    text-align: center;
    margin: auto;
}


@media only screen and (max-width: 790px) {

#dash-nav {
  min-width: 100%;
  text-align: center;
  margin: auto;
  display: block;
}

}
.login-with-btn {
  transition: background-color 0.3s, box-shadow 0.3s;
  padding: 12px 16px 12px 42px;
  border: none;
  border-radius: 3px;
  box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.04), 0 1px 1px rgba(0, 0, 0, 0.25);
  color: #757575;
  font-size: 14px;
  font-weight: 500;
  font-family: 'FixelText', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background-color: white;
  background-repeat: no-repeat;
  background-position: 12px 11px;
  min-width: 48%;
}

.login-with-x-btn {
  color: #fff;
  background-image: url(https://res.cloudinary.com/designs-9th/image/upload/v1700812960/x_logo_whobu4.webp);
  background-color: #000000;
  background-repeat: no-repeat;
  background-position: 12px 15px;
  background-size: 13%;
}

.login-with-linkedin-btn {
  color: #fff;
  background-image: url(https://res.cloudinary.com/designs-9th/image/upload/v1700849677/LinkedIn_logo_initials_c5usjf.png);
  background-color: #0a66c2;
  background-repeat: no-repeat;
  background-position: 12px 11px 5px;
  background-size: 12%;
}

.login-with-zoom-btn {
  color: #fff;
  background-image: url(https://res.cloudinary.com/designs-9th/image/upload/v1706327388/m0ve/5e8ce318664eae0004085461.png);
  background-color: #2d8cff;
  background-repeat: no-repeat;
  background-position: 12px 11px 5px;
  background-size: 12%;
}

.login-with-outlook-btn {
  color: #fff;
  background-image: url(https://res.cloudinary.com/designs-9th/image/upload/v1713147410/m0ve/Microsoft_Office_Outlook__2013_2019_.svg.png);
  background-color: #034fa0;
  background-repeat: no-repeat;
  background-position: 12px 11px 5px;
  background-size: 12%;
}
.login-with-hey-btn {
  color: #fff;
  background-image: url(https://res.cloudinary.com/designs-9th/image/upload/v1715100169/icons/hey_calendar_logo.jpg), linear-gradient(135deg, rgb(85, 34, 250) 0%, rgb(0, 116, 228) 100%);
  background-repeat: no-repeat;
  background-position: 12px 11px 5px, center;
  background-size: 12%, cover;
}


.login-with-google-icon-btn {
  color: #fff;
  background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTcuNiA5LjJsLS4xLTEuOEg5djMuNGg0LjhDMTMuNiAxMiAxMyAxMyAxMiAxMy42djIuMmgzYTguOCA4LjggMCAwIDAgMi42LTYuNnoiIGZpbGw9IiM0Mjg1RjQiIGZpbGwtcnVsZT0ibm9uemVybyIvPjxwYXRoIGQ9Ik05IDE4YzIuNCAwIDQuNS0uOCA2LTIuMmwtMy0yLjJhNS40IDUuNCAwIDAgMS04LTIuOUgxVjEzYTkgOSAwIDAgMCA4IDV6IiBmaWxsPSIjMzRBODUzIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48cGF0aCBkPSJNNCAxMC43YTUuNCA1LjQgMCAwIDEgMC0zLjRWNUgxYTkgOSAwIDAgMCAwIDhsMy0yLjN6IiBmaWxsPSIjRkJCQzA1IiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48cGF0aCBkPSJNOSAzLjZjMS4zIDAgMi41LjQgMy40IDEuM0wxNSAyLjNBOSA5IDAgMCAwIDEgNWwzIDIuNGE1LjQgNS40IDAgMCAxIDUtMy43eiIgZmlsbD0iI0VBNDMzNSIgZmlsbC1ydWxlPSJub256ZXJvIi8+PHBhdGggZD0iTTAgMGgxOHYxOEgweiIvPjwvZz48L3N2Zz4=);
  background-color: white;
  background-repeat: no-repeat;
  background-position: 12px 11px 5px;
  background-size: 12%;
}


.login-with-instagram-btn {
  color: #757575;
  background-image: url(https://res.cloudinary.com/designs-9th/image/upload/v1700849681/Instagram_logo_2022.svg_wbiogl.png);
  background-color: white;
  background-repeat: no-repeat;
  background-position: 12px 11px 5px;
  background-size: 12%;
  
}

.login-with-google-btn {
  transition: background-color 0.3s, box-shadow 0.3s;
  padding: 12px 19px 12px 35px;
  border: none;
  border-radius: 3px;
  box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.04), 0 1px 1px rgba(0, 0, 0, 0.25);
  color: #757575;
  font-size: 15px;
  font-weight: 600;
  font-family: 'FixelText', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTcuNiA5LjJsLS4xLTEuOEg5djMuNGg0LjhDMTMuNiAxMiAxMyAxMyAxMiAxMy42djIuMmgzYTguOCA4LjggMCAwIDAgMi42LTYuNnoiIGZpbGw9IiM0Mjg1RjQiIGZpbGwtcnVsZT0ibm9uemVybyIvPjxwYXRoIGQ9Ik05IDE4YzIuNCAwIDQuNS0uOCA2LTIuMmwtMy0yLjJhNS40IDUuNCAwIDAgMS04LTIuOUgxVjEzYTkgOSAwIDAgMCA4IDV6IiBmaWxsPSIjMzRBODUzIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48cGF0aCBkPSJNNCAxMC43YTUuNCA1LjQgMCAwIDEgMC0zLjRWNUgxYTkgOSAwIDAgMCAwIDhsMy0yLjN6IiBmaWxsPSIjRkJCQzA1IiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48cGF0aCBkPSJNOSAzLjZjMS4zIDAgMi41LjQgMy40IDEuM0wxNSAyLjNBOSA5IDAgMCAwIDEgNWwzIDIuNGE1LjQgNS40IDAgMCAxIDUtMy43eiIgZmlsbD0iI0VBNDMzNSIgZmlsbC1ydWxlPSJub256ZXJvIi8+PHBhdGggZD0iTTAgMGgxOHYxOEgweiIvPjwvZz48L3N2Zz4=);
  background-color: white;
  background-repeat: no-repeat;
  background-position: 90px 9px;
  background-size: 7%;
}


.login-with-apple-btn {
  color: #fff;
  background-image: url(https://res.cloudinary.com/designs-9th/image/upload/v1714170812/applelogo_ka4x0g.jpg);
  background-color: #000000;
  background-repeat: no-repeat;
  background-position: 12px 15px;
  background-size: 13%;
}

.login-with-android-btn {
  color: #fff;
  background-image: url(https://res.cloudinary.com/designs-9th/image/upload/v1714170903/android_xv0j9v.png);
  background-color: white;
  background-repeat: no-repeat;
  background-position: 12px 11px 5px;
  background-size: 12%;
}


.login-with-btn:hover {
  box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.04), 0 2px 4px rgba(0, 0, 0, 0.25);
}
.login-with-google-btn:active, .login-with-instagram-btn:active {
  background-color: #eeeeee;
}
.login-with-btn:focus {
  outline: none;
  box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.04), 0 2px 4px rgba(0, 0, 0, 0.25), 0 0 0 3px #c8dafc;
}
/* Manual address entry fallback when Google Places is unavailable */

.places--manual .pac-container,
.places-manual-input + .pac-container {
  display: none !important;
}

.places--manual gmp-place-autocomplete,
.places--manual gmp-internal-attribution,
.places--manual [class*="gmp-"] {
  display: none !important;
}

.places-manual-input {
  background-image: none !important;
}

.places-manual-hint {
  margin-top: 0.375rem;
  font-size: 12px;
  line-height: 1.4;
  color: #787774;
}

.dark .places-manual-hint {
  color: #9b9a97;
}

.turbolinks-progress-bar, .turbo-progress-bar {
  background-color: #d6b72f !important;
}

#recaptcha_error {
  color: red;
}

  .required:before {
    content:" *";
    color: red;
  }

.field_with_errors input {
    border: solid 1px red;
}

.field_with_errors {
    margin: 0px !important;
    padding: 0px !important;
    display: block;
    position: relative;
    float: left;
    width: 100%;
}

body, html {
  height: 100vh !important;
}

body {
  height: 100vh !important;
  overflow-x: hidden;
}

/* Light custimaztions */
 
.primary-bg {
background-color: #CFB431;
}

.primary-color-ovr {
   color: #6c5c1c !important;
}

a.primary-bg:hover, a.primary-bg:focus, button.primary-bg:hover, button.primary-bg:focus {
    background-color: #E4DAAA;
    color: #000;
}

 .text-center a:hover, p a {
   text-decoration-line: underline !important;
   text-decoration-style: dotted !important;
 }
 

  .text-center a:hover,  p a:hover {
   text-decoration-line: underline !important;
   text-decoration-style: solid !important;
 }

 li a:active, li label:active {
    background-color: #E4DAAA !important;
    color: #000;
}
select:focus, select:active,
textarea:focus, 
textarea:active, 
input[type='text']:focus, 
input[type='text']:active, 
input[type='email']:focus, 
input[type='email']:active, 
input[type='password']:focus, 
input[type='password']:active, 
input[type='number']:focus, 
input[type='number']:active, 
input[type='tel']:focus, 
input[type='tel']:active, 
input[type='url']:focus, 
input[type='url']:active, 
input[type='search']:focus, 
input[type='search']:active, 
input[type='date']:focus, 
input[type='date']:active, 
input[type='time']:focus, 
input[type='time']:active, 
input[type='datetime']:focus, 
input[type='datetime']:active, 
input[type='datetime-local']:focus, 
input[type='datetime-local']:active, 
input[type='month']:focus, 
input[type='month']:active, 
input[type='week']:focus, 
input[type='week']:active, 
input[type='color']:focus, 
input[type='color']:active, 
input[type='file']:focus, 
input[type='file']:active, 
input[type='range']:focus, 
input[type='range']:active, 
input[type='checkbox']:focus, 
input[type='checkbox']:active, 
input[type='image']:focus, 
input[type='image']:active, 
input[type='file']:focus,
input[type='file']:active {
  outline: none !important;
  border-color: rgba(207, 180, 49, 0.55) !important;
  box-shadow: 0 0 0 3px rgba(207, 180, 49, 0.22), 0 0 8px rgba(207, 180, 49, 0.28) !important;
  transition: box-shadow 150ms ease, border-color 150ms ease;
}



multi-select:focus, multi-select:active, input.dropdown-input, input.dropdown-input:focus, input.dropdown-input:active, input.dropdown-input:focus-within, input.dropdown-input:focus-visible {
  outline-color: transparent !important;
  border: none;
  box-shadow: none;
  outline-offset: none;
  
}


.primary.select:focus, .primary.select:active, .primary.textarea:focus, .primary.textarea:active, .primary.input:focus, .primary.input:active, .primary.input:focus-within, .primary.input:focus-visible  {
  outline: none !important;
  border-color: rgba(207, 180, 49, 0.55) !important;
  box-shadow: 0 0 0 3px rgba(207, 180, 49, 0.22), 0 0 8px rgba(207, 180, 49, 0.28) !important;
  transition: box-shadow 150ms ease, border-color 150ms ease;
}

.brand-text-color {
  color: #CFB431;
}

.primary-color { color: #6c5c1c !important;}
a.primary-color:hover { text-decoration: underline; } 

#master-nav-drop { z-index: 999 !important  }

.toggle-custom-label {
  position: relative;
  cursor: pointer;
}
.toggle-custom-label:before {
  position: absolute;
  top: 0.125rem;
  left: 0.125rem;
  display: block;
  content: "";
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 9999%;
  background-color: white;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 40%;
  background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23a0aec0" stroke-width="6" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>');
  transition: transform 0.15s cubic-bezier(0, 0, 0.2, 1);
  transform: translateX(0);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.toggle-custom-label.toggle-lg:before {
  width: 2.25rem;
  height: 2.25rem;
}
.toggle-custom-checkbox.toggle-lg:checked + .toggle-custom-label.toggle-lg:before { 
   transform: translateX(2.5rem); 
}
.toggle-custom-checkbox:checked + .toggle-custom-label:before {
  transform: translateX(1.5rem);
  background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23a0aec0" stroke-width="6" stroke-linecap="round" stroke-linejoin="round" class="feather feather-check"><polyline points="20 6 9 17 4 12"></polyline></svg>');
}

.toggle-custom.slim .toggle-custom-label:before {
  top: -0.15rem;
  left: 0;
}
.toggle-custom.slim .toggle-custom-checkbox:checked + .toggle-custom-label:before {
  transform: translateX(1.75rem);
}
.toggle-custom.colour .toggle-custom-label {
  background-color: #feb2b2;
}
.toggle-custom.colour .toggle-custom-checkbox:checked + .toggle-custom-label {
  background-color: #9ae6b4;
}

.avatar.large.online:before {
    top: 0%;
}

.text-primary {
  color: #d6b72f !important;
}

.text-brand {
  color: #d6b72f !important;
}

.border-color-primary {
  border-color: #d6b72f !important;
}
/* Strada — hide elements for registered bridge components */

/*
 * Hide elements with "hide-on-native" when strada is registered.
 */
[data-bridge-platform] .hide-on-native {
  display: none;
}

/*
 * Hide the submit button when the "form" component is registered.
 */
[data-bridge-components~=form] [data-controller~=bridge--form] [type=submit] {
  display: none;
}

/*
 * Hide when the "nav-button" component is registered.
 */
[data-bridge-components~=nav-button] [data-controller~=bridge--nav-button] {
  display: none;
}

/*
 * Hide when the "menu" component is registered.
 */
[data-bridge-components~=menu] [data-controller~=bridge--menu] {
  display: none;
}

/*
 * Hide when the "flash-message" component is registered.
 */
[data-bridge-components~=flash-message] [data-controller~=bridge--flash-message] {
  display: none;
}
/**
 * tom-select.css (v2.4.3)
 * Copyright (c) contributors
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
 * file except in compliance with the License. You may obtain a copy of the License at:
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under
 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
 * ANY KIND, either express or implied. See the License for the specific language
 * governing permissions and limitations under the License.
 *
 */
.ts-control {
  border: 1px solid #d0d0d0;
  padding: 8px 8px;
  width: 100%;
  overflow: hidden;
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  box-shadow: none;
  border-radius: 3px;
  display: flex;
  flex-wrap: wrap;
}
.ts-wrapper.multi.has-items .ts-control {
  padding: calc(8px - 2px - 0) 8px calc(8px - 2px - 3px - 0);
}
.full .ts-control {
  background-color: #fff;
}
.disabled .ts-control, .disabled .ts-control * {
  cursor: default !important;
}
.focus .ts-control {
  box-shadow: none;
}
.ts-control > * {
  vertical-align: baseline;
  display: inline-block;
}
.ts-wrapper.multi .ts-control > div {
  cursor: pointer;
  margin: 0 3px 3px 0;
  padding: 2px 6px;
  background: #f2f2f2;
  color: #303030;
  border: 0 solid #d0d0d0;
}
.ts-wrapper.multi .ts-control > div.active {
  background: #e8e8e8;
  color: #303030;
  border: 0 solid #cacaca;
}
.ts-wrapper.multi.disabled .ts-control > div, .ts-wrapper.multi.disabled .ts-control > div.active {
  color: rgb(124.5, 124.5, 124.5);
  background: white;
  border: 0 solid white;
}
.ts-control > input {
  flex: 1 1 auto;
  min-width: 7rem;
  display: inline-block !important;
  padding: 0 !important;
  min-height: 0 !important;
  max-height: none !important;
  max-width: 100% !important;
  margin: 0 !important;
  text-indent: 0 !important;
  border: 0 none !important;
  background: none !important;
  line-height: inherit !important;
  -webkit-user-select: auto !important;
     -moz-user-select: auto !important;
      -ms-user-select: auto !important;
          user-select: auto !important;
  box-shadow: none !important;
}
.ts-control > input::-ms-clear {
  display: none;
}
.ts-control > input:focus {
  outline: none !important;
}
.has-items .ts-control > input {
  margin: 0 4px !important;
}
.ts-control.rtl {
  text-align: right;
}
.ts-control.rtl.single .ts-control:after {
  left: 15px;
  right: auto;
}
.ts-control.rtl .ts-control > input {
  margin: 0 4px 0 -2px !important;
}
.disabled .ts-control {
  opacity: 0.5;
  background-color: #fafafa;
}
.input-hidden .ts-control > input {
  opacity: 0;
  position: absolute;
  left: -10000px;
}

.ts-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  z-index: 10;
  border: 1px solid #d0d0d0;
  background: #fff;
  margin: 0.25rem 0 0;
  border-top: 0 none;
  box-sizing: border-box;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border-radius: 0 0 3px 3px;
}
.ts-dropdown [data-selectable] {
  cursor: pointer;
  overflow: hidden;
}
.ts-dropdown [data-selectable] .highlight {
  background: rgba(125, 168, 208, 0.2);
  border-radius: 1px;
}
.ts-dropdown .option,
.ts-dropdown .optgroup-header,
.ts-dropdown .no-results,
.ts-dropdown .create {
  padding: 5px 8px;
}
.ts-dropdown .option, .ts-dropdown [data-disabled], .ts-dropdown [data-disabled] [data-selectable].option {
  cursor: inherit;
  opacity: 0.5;
}
.ts-dropdown [data-selectable].option {
  opacity: 1;
  cursor: pointer;
}
.ts-dropdown .optgroup:first-child .optgroup-header {
  border-top: 0 none;
}
.ts-dropdown .optgroup-header {
  color: #303030;
  background: #fff;
  cursor: default;
}
.ts-dropdown .active {
  background-color: #f5fafd;
  color: #495c68;
}
.ts-dropdown .active.create {
  color: #495c68;
}
.ts-dropdown .create {
  color: rgba(48, 48, 48, 0.5);
}
.ts-dropdown .spinner {
  display: inline-block;
  width: 30px;
  height: 30px;
  margin: 5px 8px;
}
.ts-dropdown .spinner::after {
  content: " ";
  display: block;
  width: 24px;
  height: 24px;
  margin: 3px;
  border-radius: 50%;
  border: 5px solid #d0d0d0;
  border-color: #d0d0d0 transparent #d0d0d0 transparent;
  animation: lds-dual-ring 1.2s linear infinite;
}
@keyframes lds-dual-ring {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.ts-dropdown-content {
  overflow: hidden auto;
  max-height: 200px;
  scroll-behavior: smooth;
}

.ts-wrapper.plugin-drag_drop .ts-dragging {
  color: transparent !important;
}
.ts-wrapper.plugin-drag_drop .ts-dragging > * {
  visibility: hidden !important;
}

.plugin-checkbox_options:not(.rtl) .option input {
  margin-right: 0.5rem;
}

.plugin-checkbox_options.rtl .option input {
  margin-left: 0.5rem;
}

/* stylelint-disable function-name-case */
.plugin-clear_button {
  --ts-pr-clear-button: 1em;
}
.plugin-clear_button .clear-button {
  opacity: 0;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: calc(8px - 6px);
  margin-right: 0 !important;
  background: transparent !important;
  transition: opacity 0.5s;
  cursor: pointer;
}
.plugin-clear_button.form-select .clear-button, .plugin-clear_button.single .clear-button {
  right: max(var(--ts-pr-caret), 8px);
}
.plugin-clear_button.focus.has-items .clear-button, .plugin-clear_button:not(.disabled):hover.has-items .clear-button {
  opacity: 1;
}

.ts-wrapper .dropdown-header {
  position: relative;
  padding: 10px 8px;
  border-bottom: 1px solid #d0d0d0;
  background: color-mix(#fff, #d0d0d0, 85%);
  border-radius: 3px 3px 0 0;
}
.ts-wrapper .dropdown-header-close {
  position: absolute;
  right: 8px;
  top: 50%;
  color: #303030;
  opacity: 0.4;
  margin-top: -12px;
  line-height: 20px;
  font-size: 20px !important;
}
.ts-wrapper .dropdown-header-close:hover {
  color: black;
}

.plugin-dropdown_input.focus.dropdown-active .ts-control {
  box-shadow: none;
  border: 1px solid #d0d0d0;
}
.plugin-dropdown_input .dropdown-input {
  border: 1px solid #d0d0d0;
  border-width: 0 0 1px;
  display: block;
  padding: 8px 8px;
  box-shadow: none;
  width: 100%;
  background: transparent;
}
.plugin-dropdown_input .items-placeholder {
  border: 0 none !important;
  box-shadow: none !important;
  width: 100%;
}
.plugin-dropdown_input.has-items .items-placeholder, .plugin-dropdown_input.dropdown-active .items-placeholder {
  display: none !important;
}

.ts-wrapper.plugin-input_autogrow.has-items .ts-control > input {
  min-width: 0;
}
.ts-wrapper.plugin-input_autogrow.has-items.focus .ts-control > input {
  flex: none;
  min-width: 4px;
}
.ts-wrapper.plugin-input_autogrow.has-items.focus .ts-control > input::-ms-input-placeholder {
  color: transparent;
}
.ts-wrapper.plugin-input_autogrow.has-items.focus .ts-control > input::placeholder {
  color: transparent;
}

.ts-dropdown.plugin-optgroup_columns .ts-dropdown-content {
  display: flex;
}
.ts-dropdown.plugin-optgroup_columns .optgroup {
  border-right: 1px solid #f2f2f2;
  border-top: 0 none;
  flex-grow: 1;
  flex-basis: 0;
  min-width: 0;
}
.ts-dropdown.plugin-optgroup_columns .optgroup:last-child {
  border-right: 0 none;
}
.ts-dropdown.plugin-optgroup_columns .optgroup::before {
  display: none;
}
.ts-dropdown.plugin-optgroup_columns .optgroup-header {
  border-top: 0 none;
}

.ts-wrapper.plugin-remove_button .item {
  display: inline-flex;
  align-items: center;
}
.ts-wrapper.plugin-remove_button .item .remove {
  color: inherit;
  text-decoration: none;
  vertical-align: middle;
  display: inline-block;
  padding: 0 6px;
  border-radius: 0 2px 2px 0;
  box-sizing: border-box;
}
.ts-wrapper.plugin-remove_button .item .remove:hover {
  background: rgba(0, 0, 0, 0.05);
}
.ts-wrapper.plugin-remove_button.disabled .item .remove:hover {
  background: none;
}
.ts-wrapper.plugin-remove_button .remove-single {
  position: absolute;
  right: 0;
  top: 0;
  font-size: 23px;
}

.ts-wrapper.plugin-remove_button:not(.rtl) .item {
  padding-right: 0 !important;
}
.ts-wrapper.plugin-remove_button:not(.rtl) .item .remove {
  border-left: 1px solid #d0d0d0;
  margin-left: 6px;
}
.ts-wrapper.plugin-remove_button:not(.rtl) .item.active .remove {
  border-left-color: #cacaca;
}
.ts-wrapper.plugin-remove_button:not(.rtl).disabled .item .remove {
  border-left-color: white;
}

.ts-wrapper.plugin-remove_button.rtl .item {
  padding-left: 0 !important;
}
.ts-wrapper.plugin-remove_button.rtl .item .remove {
  border-right: 1px solid #d0d0d0;
  margin-right: 6px;
}
.ts-wrapper.plugin-remove_button.rtl .item.active .remove {
  border-right-color: #cacaca;
}
.ts-wrapper.plugin-remove_button.rtl.disabled .item .remove {
  border-right-color: white;
}

:root {
  --ts-pr-clear-button: 0px;
  --ts-pr-caret: 0px;
  --ts-pr-min: .75rem;
}

.ts-wrapper.single .ts-control, .ts-wrapper.single .ts-control input {
  cursor: pointer;
}

.ts-control:not(.rtl) {
  padding-right: max(var(--ts-pr-min), var(--ts-pr-clear-button) + var(--ts-pr-caret)) !important;
}

.ts-control.rtl {
  padding-left: max(var(--ts-pr-min), var(--ts-pr-clear-button) + var(--ts-pr-caret)) !important;
}

.ts-wrapper {
  position: relative;
}

.ts-dropdown,
.ts-control,
.ts-control input {
  color: #303030;
  font-family: inherit;
  font-size: 13px;
  line-height: 18px;
}

.ts-control,
.ts-wrapper.single.input-active .ts-control {
  background: #fff;
  cursor: text;
}

.ts-hidden-accessible {
  border: 0 !important;
  clip: rect(0 0 0 0) !important;
  -webkit-clip-path: inset(50%) !important;
          clip-path: inset(50%) !important;
  overflow: hidden !important;
  padding: 0 !important;
  position: absolute !important;
  width: 1px !important;
  white-space: nowrap !important;
}
/*# sourceMappingURL=tom-select.css.map */

trix-editor {
  border: 1px solid #bbb;
  border-radius: 3px;
  margin: 0;
  padding: 0.4em 0.6em;
  min-height: 5em;
  outline: none;
}

trix-toolbar * {
  box-sizing: border-box;
}
trix-toolbar .trix-button-row {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  overflow-x: auto;
}
trix-toolbar .trix-button-group {
  display: flex;
  margin-bottom: 10px;
  border: 1px solid #bbb;
  border-top-color: #ccc;
  border-bottom-color: #888;
  border-radius: 3px;
}
trix-toolbar .trix-button-group:not(:first-child) {
  margin-left: 1.5vw;
}
@media (max-width: 768px) {
  trix-toolbar .trix-button-group:not(:first-child) {
    margin-left: 0;
  }
}
trix-toolbar .trix-button-group-spacer {
  flex-grow: 1;
}
@media (max-width: 768px) {
  trix-toolbar .trix-button-group-spacer {
    display: none;
  }
}
trix-toolbar .trix-button {
  position: relative;
  float: left;
  color: rgba(0, 0, 0, 0.6);
  font-size: 0.75em;
  font-weight: 600;
  white-space: nowrap;
  padding: 0 0.5em;
  margin: 0;
  outline: none;
  border: none;
  border-bottom: 1px solid #ddd;
  border-radius: 0;
  background: transparent;
}
trix-toolbar .trix-button:not(:first-child) {
  border-left: 1px solid #ccc;
}
trix-toolbar .trix-button.trix-active {
  background: #cbeefa;
  color: rgb(0, 0, 0);
}
trix-toolbar .trix-button:not(:disabled) {
  cursor: pointer;
}
trix-toolbar .trix-button:disabled {
  color: rgba(0, 0, 0, 0.125);
}
@media (max-width: 768px) {
  trix-toolbar .trix-button {
    letter-spacing: -0.01em;
    padding: 0 0.3em;
  }
}
trix-toolbar .trix-button--icon {
  font-size: inherit;
  width: 2.6em;
  height: 1.6em;
  max-width: calc(0.8em + 4vw);
  text-indent: -9999px;
}
@media (max-width: 768px) {
  trix-toolbar .trix-button--icon {
    height: 2em;
    max-width: calc(0.8em + 3.5vw);
  }
}
trix-toolbar .trix-button--icon::before {
  display: inline-block;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  opacity: 0.6;
  content: "";
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}
@media (max-width: 768px) {
  trix-toolbar .trix-button--icon::before {
    right: 6%;
    left: 6%;
  }
}
trix-toolbar .trix-button--icon.trix-active::before {
  opacity: 1;
}
trix-toolbar .trix-button--icon:disabled::before {
  opacity: 0.125;
}
trix-toolbar .trix-button--icon-attach::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M10.5%2018V7.5c0-2.25%203-2.25%203%200V18c0%204.125-6%204.125-6%200V7.5c0-6.375%209-6.375%209%200V18%22%20stroke%3D%22%23000%22%20stroke-width%3D%222%22%20stroke-miterlimit%3D%2210%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E");
  top: 8%;
  bottom: 4%;
}
trix-toolbar .trix-button--icon-bold::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M6.522%2019.242a.5.5%200%200%201-.5-.5V5.35a.5.5%200%200%201%20.5-.5h5.783c1.347%200%202.46.345%203.24.982.783.64%201.216%201.562%201.216%202.683%200%201.13-.587%202.129-1.476%202.71a.35.35%200%200%200%20.049.613c1.259.56%202.101%201.742%202.101%203.22%200%201.282-.483%202.334-1.363%203.063-.876.726-2.132%201.12-3.66%201.12h-5.89ZM9.27%207.347v3.362h1.97c.766%200%201.347-.17%201.733-.464.38-.291.587-.716.587-1.27%200-.53-.183-.928-.513-1.198-.334-.273-.838-.43-1.505-.43H9.27Zm0%205.606v3.791h2.389c.832%200%201.448-.177%201.853-.497.399-.315.614-.786.614-1.423%200-.62-.22-1.077-.63-1.385-.418-.313-1.053-.486-1.905-.486H9.27Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-button--icon-italic::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M9%205h6.5v2h-2.23l-2.31%2010H13v2H6v-2h2.461l2.306-10H9V5Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-button--icon-link::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M18.948%205.258a4.337%204.337%200%200%200-6.108%200L11.217%206.87a.993.993%200%200%200%200%201.41c.392.39%201.027.39%201.418%200l1.623-1.613a2.323%202.323%200%200%201%203.271%200%202.29%202.29%200%200%201%200%203.251l-2.393%202.38a3.021%203.021%200%200%201-4.255%200l-.05-.049a1.007%201.007%200%200%200-1.418%200%20.993.993%200%200%200%200%201.41l.05.049a5.036%205.036%200%200%200%207.091%200l2.394-2.38a4.275%204.275%200%200%200%200-6.072Zm-13.683%2013.6a4.337%204.337%200%200%200%206.108%200l1.262-1.255a.993.993%200%200%200%200-1.41%201.007%201.007%200%200%200-1.418%200L9.954%2017.45a2.323%202.323%200%200%201-3.27%200%202.29%202.29%200%200%201%200-3.251l2.344-2.331a2.579%202.579%200%200%201%203.631%200c.392.39%201.027.39%201.419%200a.993.993%200%200%200%200-1.41%204.593%204.593%200%200%200-6.468%200l-2.345%202.33a4.275%204.275%200%200%200%200%206.072Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-button--icon-strike::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M6%2014.986c.088%202.647%202.246%204.258%205.635%204.258%203.496%200%205.713-1.728%205.713-4.463%200-.275-.02-.536-.062-.781h-3.461c.398.293.573.654.573%201.123%200%201.035-1.074%201.787-2.646%201.787-1.563%200-2.773-.762-2.91-1.924H6ZM6.432%2010h3.763c-.632-.314-.914-.715-.914-1.273%200-1.045.977-1.739%202.432-1.739%201.475%200%202.52.723%202.617%201.914h2.764c-.05-2.548-2.11-4.238-5.39-4.238-3.145%200-5.392%201.719-5.392%204.316%200%20.363.04.703.12%201.02ZM4%2011a1%201%200%201%200%200%202h15a1%201%200%201%200%200-2H4Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-button--icon-quote::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M4.581%208.471c.44-.5%201.056-.834%201.758-.995C8.074%207.17%209.201%207.822%2010%208.752c1.354%201.578%201.33%203.555.394%205.277-.941%201.731-2.788%203.163-4.988%203.56a.622.622%200%200%201-.653-.317c-.113-.205-.121-.49.16-.764.294-.286.567-.566.791-.835.222-.266.413-.54.524-.815.113-.28.156-.597.026-.908-.128-.303-.39-.524-.72-.69a3.02%203.02%200%200%201-1.674-2.7c0-.905.283-1.59.72-2.088Zm9.419%200c.44-.5%201.055-.834%201.758-.995%201.734-.306%202.862.346%203.66%201.276%201.355%201.578%201.33%203.555.395%205.277-.941%201.731-2.789%203.163-4.988%203.56a.622.622%200%200%201-.653-.317c-.113-.205-.122-.49.16-.764.294-.286.567-.566.791-.835.222-.266.412-.54.523-.815.114-.28.157-.597.026-.908-.127-.303-.39-.524-.72-.69a3.02%203.02%200%200%201-1.672-2.701c0-.905.283-1.59.72-2.088Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-button--icon-heading-1::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21.5%207.5v-3h-12v3H14v13h3v-13h4.5ZM9%2013.5h3.5v-3h-10v3H6v7h3v-7Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-button--icon-code::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3.293%2011.293a1%201%200%200%200%200%201.414l4%204a1%201%200%201%200%201.414-1.414L5.414%2012l3.293-3.293a1%201%200%200%200-1.414-1.414l-4%204Zm13.414%205.414%204-4a1%201%200%200%200%200-1.414l-4-4a1%201%200%201%200-1.414%201.414L18.586%2012l-3.293%203.293a1%201%200%200%200%201.414%201.414Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-button--icon-bullet-list::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5%207.5a1.5%201.5%200%201%200%200-3%201.5%201.5%200%200%200%200%203ZM8%206a1%201%200%200%201%201-1h11a1%201%200%201%201%200%202H9a1%201%200%200%201-1-1Zm1%205a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm0%206a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm-2.5-5a1.5%201.5%200%201%201-3%200%201.5%201.5%200%200%201%203%200ZM5%2019.5a1.5%201.5%200%201%200%200-3%201.5%201.5%200%200%200%200%203Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-button--icon-number-list::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3%204h2v4H4V5H3V4Zm5%202a1%201%200%200%201%201-1h11a1%201%200%201%201%200%202H9a1%201%200%200%201-1-1Zm1%205a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm0%206a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm-3.5-7H6v1l-1.5%202H6v1H3v-1l1.667-2H3v-1h2.5ZM3%2017v-1h3v4H3v-1h2v-.5H4v-1h1V17H3Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-button--icon-undo::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3%2014a1%201%200%200%200%201%201h6a1%201%200%201%200%200-2H6.257c2.247-2.764%205.151-3.668%207.579-3.264%202.589.432%204.739%202.356%205.174%205.405a1%201%200%200%200%201.98-.283c-.564-3.95-3.415-6.526-6.825-7.095C11.084%207.25%207.63%208.377%205%2011.39V8a1%201%200%200%200-2%200v6Zm2-1Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-button--icon-redo::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21%2014a1%201%200%200%201-1%201h-6a1%201%200%201%201%200-2h3.743c-2.247-2.764-5.151-3.668-7.579-3.264-2.589.432-4.739%202.356-5.174%205.405a1%201%200%200%201-1.98-.283c.564-3.95%203.415-6.526%206.826-7.095%203.08-.513%206.534.614%209.164%203.626V8a1%201%200%201%201%202%200v6Zm-2-1Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-button--icon-decrease-nesting-level::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5%206a1%201%200%200%201%201-1h12a1%201%200%201%201%200%202H6a1%201%200%200%201-1-1Zm4%205a1%201%200%201%200%200%202h9a1%201%200%201%200%200-2H9Zm-3%206a1%201%200%201%200%200%202h12a1%201%200%201%200%200-2H6Zm-3.707-5.707a1%201%200%200%200%200%201.414l2%202a1%201%200%201%200%201.414-1.414L4.414%2012l1.293-1.293a1%201%200%200%200-1.414-1.414l-2%202Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-button--icon-increase-nesting-level::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5%206a1%201%200%200%201%201-1h12a1%201%200%201%201%200%202H6a1%201%200%200%201-1-1Zm4%205a1%201%200%201%200%200%202h9a1%201%200%201%200%200-2H9Zm-3%206a1%201%200%201%200%200%202h12a1%201%200%201%200%200-2H6Zm-2.293-2.293%202-2a1%201%200%200%200%200-1.414l-2-2a1%201%200%201%200-1.414%201.414L3.586%2012l-1.293%201.293a1%201%200%201%200%201.414%201.414Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-dialogs {
  position: relative;
}
trix-toolbar .trix-dialog {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  font-size: 0.75em;
  padding: 15px 10px;
  background: #fff;
  box-shadow: 0 0.3em 1em #ccc;
  border-top: 2px solid #888;
  border-radius: 5px;
  z-index: 5;
}
trix-toolbar .trix-input--dialog {
  font-size: inherit;
  font-weight: normal;
  padding: 0.5em 0.8em;
  margin: 0 10px 0 0;
  border-radius: 3px;
  border: 1px solid #bbb;
  background-color: #fff;
  box-shadow: none;
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}
trix-toolbar .trix-input--dialog.validate:invalid {
  box-shadow: #F00 0px 0px 1.5px 1px;
}
trix-toolbar .trix-button--dialog {
  font-size: inherit;
  padding: 0.5em;
  border-bottom: none;
}
trix-toolbar .trix-dialog--link {
  max-width: 600px;
}
trix-toolbar .trix-dialog__link-fields {
  display: flex;
  align-items: baseline;
}
trix-toolbar .trix-dialog__link-fields .trix-input {
  flex: 1;
}
trix-toolbar .trix-dialog__link-fields .trix-button-group {
  flex: 0 0 content;
  margin: 0;
}

trix-editor [data-trix-mutable]:not(.attachment__caption-editor) {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

trix-editor [data-trix-mutable] ::-moz-selection, trix-editor [data-trix-mutable]::-moz-selection,
trix-editor [data-trix-cursor-target]::-moz-selection {
  background: none;
}
trix-editor [data-trix-mutable] ::selection, trix-editor [data-trix-mutable]::selection,
trix-editor [data-trix-cursor-target]::selection {
  background: none;
}

trix-editor [data-trix-mutable].attachment__caption-editor:focus::-moz-selection {
  background: highlight;
}
trix-editor [data-trix-mutable].attachment__caption-editor:focus::selection {
  background: highlight;
}

trix-editor [data-trix-mutable].attachment.attachment--file {
  box-shadow: 0 0 0 2px highlight;
  border-color: transparent;
}
trix-editor [data-trix-mutable].attachment img {
  box-shadow: 0 0 0 2px highlight;
}
trix-editor .attachment {
  position: relative;
}
trix-editor .attachment:hover {
  cursor: default;
}
trix-editor .attachment--preview .attachment__caption:hover {
  cursor: text;
}
trix-editor .attachment__progress {
  position: absolute;
  z-index: 1;
  height: 20px;
  top: calc(50% - 10px);
  left: 5%;
  width: 90%;
  opacity: 0.9;
  transition: opacity 200ms ease-in;
}
trix-editor .attachment__progress[value="100"] {
  opacity: 0;
}
trix-editor .attachment__caption-editor {
  display: inline-block;
  width: 100%;
  margin: 0;
  padding: 0;
  font-size: inherit;
  font-family: inherit;
  line-height: inherit;
  color: inherit;
  text-align: center;
  vertical-align: top;
  border: none;
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}
trix-editor .attachment__toolbar {
  position: absolute;
  z-index: 1;
  top: -0.9em;
  left: 0;
  width: 100%;
  text-align: center;
}
trix-editor .trix-button-group {
  display: inline-flex;
}
trix-editor .trix-button {
  position: relative;
  float: left;
  color: #666;
  white-space: nowrap;
  font-size: 80%;
  padding: 0 0.8em;
  margin: 0;
  outline: none;
  border: none;
  border-radius: 0;
  background: transparent;
}
trix-editor .trix-button:not(:first-child) {
  border-left: 1px solid #ccc;
}
trix-editor .trix-button.trix-active {
  background: #cbeefa;
}
trix-editor .trix-button:not(:disabled) {
  cursor: pointer;
}
trix-editor .trix-button--remove {
  text-indent: -9999px;
  display: inline-block;
  padding: 0;
  outline: none;
  width: 1.8em;
  height: 1.8em;
  line-height: 1.8em;
  border-radius: 50%;
  background-color: #fff;
  border: 2px solid highlight;
  box-shadow: 1px 1px 6px rgba(0, 0, 0, 0.25);
}
trix-editor .trix-button--remove::before {
  display: inline-block;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  opacity: 0.7;
  content: "";
  background-image: url("data:image/svg+xml,%3Csvg%20height%3D%2224%22%20width%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M19%206.41%2017.59%205%2012%2010.59%206.41%205%205%206.41%2010.59%2012%205%2017.59%206.41%2019%2012%2013.41%2017.59%2019%2019%2017.59%2013.41%2012z%22%2F%3E%3Cpath%20d%3D%22M0%200h24v24H0z%22%20fill%3D%22none%22%2F%3E%3C%2Fsvg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 90%;
}
trix-editor .trix-button--remove:hover {
  border-color: #333;
}
trix-editor .trix-button--remove:hover::before {
  opacity: 1;
}
trix-editor .attachment__metadata-container {
  position: relative;
}
trix-editor .attachment__metadata {
  position: absolute;
  left: 50%;
  top: 2em;
  transform: translate(-50%, 0);
  max-width: 90%;
  padding: 0.1em 0.6em;
  font-size: 0.8em;
  color: #fff;
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 3px;
}
trix-editor .attachment__metadata .attachment__name {
  display: inline-block;
  max-width: 100%;
  vertical-align: bottom;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
trix-editor .attachment__metadata .attachment__size {
  margin-left: 0.2em;
  white-space: nowrap;
}

.trix-content {
  line-height: 1.5;
  overflow-wrap: break-word;
  word-break: break-word;
}
.trix-content * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
.trix-content h1 {
  font-size: 1.2em;
  line-height: 1.2;
}
.trix-content blockquote {
  border: 0 solid #ccc;
  border-left-width: 0.3em;
  margin-left: 0.3em;
  padding-left: 0.6em;
}
.trix-content [dir=rtl] blockquote,
.trix-content blockquote[dir=rtl] {
  border-width: 0;
  border-right-width: 0.3em;
  margin-right: 0.3em;
  padding-right: 0.6em;
}
.trix-content li {
  margin-left: 1em;
}
.trix-content [dir=rtl] li {
  margin-right: 1em;
}
.trix-content pre {
  display: inline-block;
  width: 100%;
  vertical-align: top;
  font-family: monospace;
  font-size: 0.9em;
  padding: 0.5em;
  white-space: pre;
  background-color: #eee;
  overflow-x: auto;
}
.trix-content img {
  max-width: 100%;
  height: auto;
}
.trix-content .attachment {
  display: inline-block;
  position: relative;
  max-width: 100%;
}
.trix-content .attachment a {
  color: inherit;
  text-decoration: none;
}
.trix-content .attachment a:hover, .trix-content .attachment a:visited:hover {
  color: inherit;
}
.trix-content .attachment__caption {
  text-align: center;
}
.trix-content .attachment__caption .attachment__name + .attachment__size::before {
  content: " •";
}
.trix-content .attachment--preview {
  width: 100%;
  text-align: center;
}
.trix-content .attachment--preview .attachment__caption {
  color: #666;
  font-size: 0.9em;
  line-height: 1.2;
}
.trix-content .attachment--file {
  color: #333;
  line-height: 1;
  margin: 0 2px 2px 2px;
  padding: 0.4em 1em;
  border: 1px solid #bbb;
  border-radius: 5px;
}
.trix-content .attachment-gallery {
  display: flex;
  flex-wrap: wrap;
  position: relative;
}
.trix-content .attachment-gallery .attachment {
  flex: 1 0 33%;
  padding: 0 0.5em;
  max-width: 33%;
}
.trix-content .attachment-gallery.attachment-gallery--2 .attachment, .trix-content .attachment-gallery.attachment-gallery--4 .attachment {
  flex-basis: 50%;
  max-width: 50%;
}
/*
 * We need to override trix.css’s image gallery styles to accommodate the
 * <action-text-attachment> element we wrap around attachments. Otherwise,
 * images in galleries will be squished by the max-width: 33%; rule.


*/


trix-editor {
  border: 1px solid #bbb;
  border-radius: 3px;
  margin: 0;
  padding: 0.4em 0.6em;
  min-height: 5em;
  outline: none;
}

trix-toolbar * {
  box-sizing: border-box;
}

trix-toolbar .trix-button-row {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  overflow-x: auto;
}

trix-toolbar .trix-button-group {
  display: flex;
  margin-bottom: 10px;
  border: 1px solid #bbb;
  border-top-color: #ccc;
  border-bottom-color: #888;
  border-radius: 3px;
}

trix-toolbar .trix-button-group:not(:first-child) {
  margin-left: 1.5vw;
}

@media (max-width: 768px) {
  trix-toolbar .trix-button-group:not(:first-child) {
    margin-left: 0;
  }
}

trix-toolbar .trix-button-group-spacer {
  flex-grow: 1;
}

@media (max-width: 768px) {
  trix-toolbar .trix-button-group-spacer {
    display: none;
  }
}

trix-toolbar .trix-button {
  position: relative;
  float: left;
  color: rgba(0, 0, 0, 0.6);
  font-size: 0.75em;
  font-weight: 600;
  white-space: nowrap;
  padding: 0 0.5em;
  margin: 0;
  outline: none;
  border: none;
  border-bottom: 1px solid #ddd;
  border-radius: 0;
  background: transparent;
}

trix-toolbar .trix-button:not(:first-child) {
  border-left: 1px solid #ccc;
}

trix-toolbar .trix-button.trix-active {
  background: #cbeefa;
  color: black;
}

trix-toolbar .trix-button:not(:disabled) {
  cursor: pointer;
}

trix-toolbar .trix-button:disabled {
  color: rgba(0, 0, 0, 0.125);
}

@media (max-width: 768px) {
  trix-toolbar .trix-button {
    letter-spacing: -0.01em;
    padding: 0 0.3em;
  }
}

trix-toolbar .trix-button--icon {
  font-size: inherit;
  width: 2.6em;
  height: 1.6em;
  max-width: calc(0.8em + 4vw);
  text-indent: -9999px;
}

@media (max-width: 768px) {
  trix-toolbar .trix-button--icon {
    height: 2em;
    max-width: calc(0.8em + 3.5vw);
  }
}

trix-toolbar .trix-button--icon::before {
  display: inline-block;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  opacity: 0.6;
  content: "";
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

@media (max-width: 768px) {
  trix-toolbar .trix-button--icon::before {
    right: 6%;
    left: 6%;
  }
}

trix-toolbar .trix-button--icon.trix-active::before {
  opacity: 1;
}

trix-toolbar .trix-button--icon:disabled::before {
  opacity: 0.125;
}

trix-toolbar .trix-dialogs {
  position: relative;
}

trix-toolbar .trix-dialog {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  font-size: 0.75em;
  padding: 15px 10px;
  background: #fff;
  box-shadow: 0 0.3em 1em #ccc;
  border-top: 2px solid #888;
  border-radius: 5px;
  z-index: 5;
}

trix-toolbar .trix-input--dialog {
  font-size: inherit;
  font-weight: normal;
  padding: 0.5em 0.8em;
  margin: 0 10px 0 0;
  border-radius: 3px;
  border: 1px solid #bbb;
  background-color: #fff;
  box-shadow: none;
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

trix-toolbar .trix-input--dialog.validate:invalid {
  box-shadow: #F00 0px 0px 1.5px 1px;
}

trix-toolbar .trix-button--dialog {
  font-size: inherit;
  padding: 0.5em;
  border-bottom: none;
}

trix-toolbar .trix-dialog--link {
  max-width: 600px;
}

trix-toolbar .trix-dialog__link-fields {
  display: flex;
  align-items: baseline;
}

trix-toolbar .trix-dialog__link-fields .trix-input {
  flex: 1;
}

trix-toolbar .trix-dialog__link-fields .trix-button-group {
  flex: 0 0 content;
  margin: 0;
}

trix-editor [data-trix-mutable]:not(.attachment__caption-editor) {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

trix-editor [data-trix-mutable]::-moz-selection,
trix-editor [data-trix-cursor-target]::-moz-selection,
trix-editor [data-trix-mutable] ::-moz-selection {
  background: none;
}

trix-editor [data-trix-mutable]::selection,
trix-editor [data-trix-cursor-target]::selection,
trix-editor [data-trix-mutable] ::selection {
  background: none;
}

trix-editor .attachment__caption-editor:focus[data-trix-mutable]::-moz-selection {
  background: highlight;
}

trix-editor .attachment__caption-editor:focus[data-trix-mutable]::selection {
  background: highlight;
}

trix-editor [data-trix-mutable].attachment.attachment--file {
  box-shadow: 0 0 0 2px highlight;
  border-color: transparent;
}

trix-editor [data-trix-mutable].attachment img {
  box-shadow: 0 0 0 2px highlight;
}

trix-editor .attachment {
  position: relative;
}

trix-editor .attachment:hover {
  cursor: default;
}

trix-editor .attachment--preview .attachment__caption:hover {
  cursor: text;
}

trix-editor .attachment__progress {
  position: absolute;
  z-index: 1;
  height: 20px;
  top: calc(50% - 10px);
  left: 5%;
  width: 90%;
  opacity: 0.9;
  transition: opacity 200ms ease-in;
}

trix-editor .attachment__progress[value="100"] {
  opacity: 0;
}

trix-editor .attachment__caption-editor {
  display: inline-block;
  width: 100%;
  margin: 0;
  padding: 0;
  font-size: inherit;
  font-family: inherit;
  line-height: inherit;
  color: inherit;
  text-align: center;
  vertical-align: top;
  border: none;
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

trix-editor .attachment__toolbar {
  position: absolute;
  z-index: 1;
  top: -0.9em;
  left: 0;
  width: 100%;
  text-align: center;
}

trix-editor .trix-button-group {
  display: inline-flex;
}

trix-editor .trix-button {
  position: relative;
  float: left;
  color: #666;
  white-space: nowrap;
  font-size: 80%;
  padding: 0 0.8em;
  margin: 0;
  outline: none;
  border: none;
  border-radius: 0;
  background: transparent;
}

trix-editor .trix-button:not(:first-child) {
  border-left: 1px solid #ccc;
}

trix-editor .trix-button.trix-active {
  background: #cbeefa;
}

trix-editor .trix-button:not(:disabled) {
  cursor: pointer;
}

trix-editor .trix-button--remove {
  text-indent: -9999px;
  display: inline-block;
  padding: 0;
  outline: none;
  width: 1.8em;
  height: 1.8em;
  line-height: 1.8em;
  border-radius: 50%;
  background-color: #fff;
  border: 2px solid highlight;
  box-shadow: 1px 1px 6px rgba(0, 0, 0, 0.25);
}

trix-editor .trix-button--remove::before {
  display: inline-block;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  opacity: 0.7;
  content: "";
  background-image: url("data:image/svg+xml,%3Csvg%20height%3D%2224%22%20width%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M19%206.41%2017.59%205%2012%2010.59%206.41%205%205%206.41%2010.59%2012%205%2017.59%206.41%2019%2012%2013.41%2017.59%2019%2019%2017.59%2013.41%2012z%22%2F%3E%3Cpath%20d%3D%22M0%200h24v24H0z%22%20fill%3D%22none%22%2F%3E%3C%2Fsvg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 90%;
}

trix-editor .trix-button--remove:hover {
  border-color: #333;
}

trix-editor .trix-button--remove:hover::before {
  opacity: 1;
}

trix-editor .attachment__metadata-container {
  position: relative;
}

trix-editor .attachment__metadata {
  position: absolute;
  left: 50%;
  top: 2em;
  transform: translate(-50%, 0);
  max-width: 90%;
  padding: 0.1em 0.6em;
  font-size: 0.8em;
  color: #fff;
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 3px;
}

trix-editor .attachment__metadata .attachment__name {
  display: inline-block;
  max-width: 100%;
  vertical-align: bottom;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

trix-editor .attachment__metadata .attachment__size {
  margin-left: 0.2em;
  white-space: nowrap;
}

.trix-content {
  line-height: 1.5;
  overflow-wrap: break-word;
  word-break: break-word;
}

.trix-content * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.trix-content blockquote {
  border: 0 solid #ccc;
  border-left-width: 0.3em;
  margin-left: 0.3em;
  padding-left: 0.6em;
}

.trix-content [dir=rtl] blockquote,
.trix-content blockquote[dir=rtl] {
  border-width: 0;
  border-right-width: 0.3em;
  margin-right: 0.3em;
  padding-right: 0.6em;
}

.trix-content li {
  margin-left: 1em;
}

.trix-content [dir=rtl] li {
  margin-right: 1em;
}

.trix-content pre {
  display: inline-block;
  width: 100%;
  vertical-align: top;
  font-family: monospace;
  font-size: 0.9em;
  padding: 0.5em;
  white-space: pre;
  background-color: #eee;
  overflow-x: auto;
}

.trix-content img {
  max-width: 100%;
  height: auto;
}

.trix-content .attachment {
  display: inline-block;
  position: relative;
  max-width: 100%;
}

.trix-content .attachment a {
  color: inherit;
  text-decoration: none;
}

.trix-content .attachment a:hover,
.trix-content .attachment a:visited:hover {
  color: inherit;
}

.trix-content .attachment__caption {
  text-align: center;
}

.trix-content .attachment__caption .attachment__name+.attachment__size::before {
  content: ' \2022 ';
}

.trix-content .attachment--preview {
  width: 100%;
  text-align: center;
}

.trix-content .attachment--preview .attachment__caption {
  color: #666;
  font-size: 0.9em;
  line-height: 1.2;
}

.trix-content .attachment--file {
  color: #333;
  line-height: 1;
  margin: 0 2px 2px 2px;
  padding: 0.4em 1em;
  border: 1px solid #bbb;
  border-radius: 5px;
}

.trix-content .attachment-gallery {
  display: flex;
  flex-wrap: wrap;
  position: relative;
}

.trix-content .attachment-gallery .attachment {
  flex: 1 0 33%;
  padding: 0 0.5em;
  max-width: 33%;
}

.trix-content .attachment-gallery.attachment-gallery--2 .attachment,
.trix-content .attachment-gallery.attachment-gallery--4 .attachment {
  flex-basis: 50%;
  max-width: 50%;
}



.trix-content .attachment-gallery>action-text-attachment,
.trix-content .attachment-gallery>.attachment {
  flex: 1 0 33%;
  padding: 0 0.5em;
  max-width: 33%;
}

trix-editor {
  width: 100%;
  min-width: 100%;
}

.trix-content .attachment-gallery.attachment-gallery--2>action-text-attachment,
.trix-content .attachment-gallery.attachment-gallery--2>.attachment,
.trix-content .attachment-gallery.attachment-gallery--4>action-text-attachment,
.trix-content .attachment-gallery.attachment-gallery--4>.attachment {
  flex-basis: 50%;
  max-width: 50%;
}

.trix-content action-text-attachment .attachment {
  padding: 0 !important;
  max-width: 100% !important;
}


.trix-content {
  line-height: 1.5;
  overflow-wrap: break-word;
  word-break: break-word;
}

.trix-content h1, .trix-editor h1 {
  font-size: 1.9em;
  padding-bottom: 10px;
  line-height: 1.2;
  font-weight: 500;
}

.trix-content a, .trix-editor a {
  color: blue;
  font-weight: 300;
  font-size: calc(0.50em + 0.5vw);
}

.trix-content blockquote {
  border: 0 solid #ccc;
  border-left-width: 0.3em;
  margin-left: 0.3em;
  padding-left: 0.6em;
}

.trix-content [dir=rtl] blockquote,
.trix-content blockquote[dir=rtl] {
  border-width: 0;
  border-right-width: 0.3em;
  margin-right: 0.3em;
  padding-right: 0.6em;
}

.trix-content li {
  margin-left: 1em;
}

.trix-content ul,
.trix-content ol {
  margin-left: 1em;
  padding: 10px;
}

.trix-content [dir=rtl] ul,
.trix-content [dir=rtl] ol {
  margin-left: 1em;
  padding: 10px;
}

.trix-content [dir=rtl] li {
  margin-right: 1em;
}

.trix-content pre {
  display: inline-block;
  width: 100%;
  vertical-align: top;
  font-family: monospace;
  font-size: 0.9em;
  padding: 0.5em;
  white-space: pre;
  background-color: rgb(30 41 59);
  overflow-x: auto;
}

.trix-content img {
  max-width: 100%;
  height: auto;
}

.trix-content .attachment {
  display: inline-block;
  position: relative;
  max-width: 100%;
}

.trix-content .attachment a {
  color: inherit;
  text-decoration: none;
}

.trix-content .attachment a:hover,
.trix-content .attachment a:visited:hover {
  color: inherit;
}

.trix-content .attachment__caption {
  text-align: center;
}

.trix-content .attachment__caption .attachment__name+.attachment__size::before {
  content: ' \2022 ';
}

.trix-content .attachment--preview {
  width: 100%;
  text-align: center;
}

.trix-content .attachment--preview .attachment__caption {
  color: #666;
  font-size: 0.9em;
  line-height: 1.2;
}

.trix-content .attachment--file {
  color: #333;
  line-height: 1;
  margin: 0 2px 2px 2px;
  padding: 0.4em 1em;
  border: 1px solid #bbb;
  border-radius: 5px;
}

.trix-content .attachment-gallery {
  display: flex;
  flex-wrap: wrap;
  position: relative;
}

.trix-content .attachment-gallery .attachment {
  flex: 1 0 33%;
  padding: 0 0.5em;
  max-width: 33%;
}

.trix-content .attachment-gallery.attachment-gallery--2 .attachment,
.trix-content .attachment-gallery.attachment-gallery--4 .attachment {
  flex-basis: 50%;
  max-width: 50%;
}
.social-share-button .ssb-icon {
  background-position: center center;
  background-repeat: no-repeat;
  background-size: 18px 18px;
  display: inline-block;
  height: 18px;
  width: 18px;
}

.social-share-button .ssb-twitter {
  background-image: url(/assets/social-share-button/twitter-5c7eebf52f8f6ee09fb179dce95ee709eaedc0de40514a4b30a53d874926cd51.svg);
}

.social-share-button .ssb-facebook {
  background-image: url(/assets/social-share-button/facebook-ff026d808da378c18d2de4d2df1d29f868d945d137bdfca27e861cfe9b16ab54.svg);
}

.social-share-button .ssb-google_bookmark {
  background-image: url(/assets/social-share-button/google_bookmark-131ca38ee28939ec1c29061e57aca9d453b0edc3237fc484cff9d0cf47ef3eff.svg);
}

.social-share-button .ssb-weibo {
  background-image: url(/assets/social-share-button/weibo-945f45de7fa460680be34db39c44b408dd17338a10a1a666d504bffd7a1d292e.svg);
}

.social-share-button .ssb-qq {
  background-image: url(/assets/social-share-button/qq-909e08911488246bf95c7e721cfced9d1781a2bb3f2186fbd96b233c46af51b9.svg);
}

.social-share-button .ssb-delicious {
  background-image: url(/assets/social-share-button/delicious-3b30084f180909b7476b2195173dc5f79cbad9ae6888188c2109ebc41c5c64c9.svg);
}

.social-share-button .ssb-linkedin {
  background-image: url(/assets/social-share-button/linkedin-9659650958cc7581a1790261fe0e73ba6928ec5d0d78eb31247f8b0c4972e589.svg);
}

.social-share-button .ssb-tumblr {
  background-image: url(/assets/social-share-button/tumblr-0b7b9f05f5a9e3799d2733b7adca1d508a7b1c05d38492b71f76eb4fa4ffc355.svg);
}

.social-share-button .ssb-pinterest {
  background-image: url(/assets/social-share-button/pinterest-eeb4908f0f584a70134cd084d1e6d1e8863cff21c004b2e1f40c587314a19b15.svg);
}

.social-share-button .ssb-douban {
  background-image: url(/assets/social-share-button/douban-71fc9f56cc9295336971ca1f403f6eb2ba59de9d730a952930de0f786646cfbf.svg);
}

.social-share-button .ssb-wechat {
  background-image: url(/assets/social-share-button/wechat-d3be0c57971f293aae057b7a20d9a0a19c1aa016df5c64532b91413622470372.svg);
}

.social-share-button .ssb-vkontakte {
  background-image: url(/assets/social-share-button/vkontakte-7edf9d4e1f7c82f41871c85430c02ab07fb7e1c9f70e81e5013345d392c3ca90.svg);
}

.social-share-button .ssb-odnoklassniki {
  background-image: url(/assets/social-share-button/odnoklassniki-640d05d31ec88b468ef27fc626d4e7f384b80607954b990c1a00bdfc4e03627b.svg);
}

.social-share-button .ssb-xing {
  background-image: url(/assets/social-share-button/xing-d413735746bb5fca5c34678531fd9ea565e8ce10842f2d8aee443ca08b66c58a.svg);
}

.social-share-button .ssb-email {
  background-image: url(/assets/social-share-button/email-c4f19b6432a6e9a388531031254bf43d90cf853b33d0fb72e5ac239bcbbbe86b.svg);
}

.social-share-button .ssb-reddit {
  background-image: url(/assets/social-share-button/reddit-70f4ae56b71a9490a100a08cfd67a815affe9ee665bb3615e1dd1f387b865748.svg);
}

.social-share-button .ssb-hacker_news {
  background-image: url(/assets/social-share-button/hacker_news-40341ca62f7b73e25dc9bae06542da6555c7e3db1e43ac3aa2ee3c206927ee26.svg);
}

.social-share-button .ssb-telegram {
  background-image: url(/assets/social-share-button/telegram-23046845a6fb13f7754c8eea5c362f858262ef1b72ef2e15a6becaec9aed6ab6.svg);
}

.social-share-button .ssb-whatsapp_app,
.social-share-button .ssb-whatsapp_web {
  background-image: url(/assets/social-share-button/whatsapp-ece233927e522cb01d25296c4559edd4d38548722b955a450a6ddfb4f3084f62.svg);
}

.ss-wechat-dialog {
  width: 300px;
  position: fixed;
  background: #fff;
  padding: 15px;
  border-radius: 3px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.15);
  z-index: 11001;
  font-size: 14px;
  line-height: 1.2em;
}

.ss-wechat-dialog .wechat-popup-header {
  font-weight: bold;
}

.ss-wechat-dialog .wechat-dialog-qr {
  text-align: center;
  margin: 25px 0;
}

.ss-wechat-dialog .wechat-popup-close {
  width: 16px;
  height: 16px;
  position: absolute;
  right: 10px;
  top: 10px;
  color: #999;
  text-decoration: none;
  font-size: 16px;
}

.ss-wechat-dialog .wechat-popup-footer {
  text-align: left;
  line-height: 22px;
  color: #666;
}
.richer-text table {
  border-collapse: collapse;
  margin: 0;
  overflow: hidden;
  table-layout: fixed;
  width: 100%;
}

richer-text-editor {
  max-width: 100% !important;
}

richer-text-editor .text-editor-wrapper > div {
  max-width: 100% !important;
}

.richer-text table td,
.richer-text table th {
  border: 2px solid #ced4da;
  box-sizing: border-box;
  min-width: 1em;
  padding: 3px 5px;
  position: relative;
  vertical-align: top;
}

.richer-text table td>*,
.richer-text table th>* {
  margin-top: 0;
  margin-bottom: 0;
}

.richer-text table th {
  background-color: #f1f3f5;
  font-weight: bold;
  text-align: left;
}

.richer-text p {
  margin: 0;
}

.richer-text img {
  width: auto;
}

.richer-text blockquote {
  border-left: 2px solid #ced4da;
  margin: 1rem 0.5rem;
  padding: 0 0 0 10px;
}

/* Embedded players (YouTube, Vimeo, Loom, Spotify) written by the document
   editor. The width/height attributes stay as a fallback; aspect-ratio keeps
   the frame in shape at any column width. */
.richer-text iframe {
  max-width: 100%;
  border: 0;
  border-radius: 0.5rem;
  margin: 1rem 0;
  display: block;
}

.richer-text iframe.rich-embed-video {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
}

.richer-text iframe.rich-embed-audio {
  width: 100%;
  height: 152px;
}
/* app/assets/stylesheets/mentions.css */

/* Smooth transitions for dropdown */
[data-mention-target="dropdown"] {
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Custom scrollbar for dropdown */
[data-mention-target="dropdown"]::-webkit-scrollbar {
  width: 6px;
}

[data-mention-target="dropdown"]::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

[data-mention-target="dropdown"]::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 10px;
}

[data-mention-target="dropdown"]::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Highlight mentioned users in displayed content */
.mention {
  @apply text-blue-600 font-medium hover:text-blue-800 hover:underline cursor-pointer;
}

/* Mobile responsive adjustments */
@media (max-width: 640px) {
  [data-mention-target="dropdown"] {
    max-width: calc(100vw - 2rem) !important;
  }
}
@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes fade-out {
  to {
    opacity: 0;
  }
}

@keyframes slide-from-right {
  from {
    transform: translateX(60px);
  }
}

@keyframes slide-up {
  from {
    transform: translateY(130px);
  }
}

@keyframes slide-to-left {
  to {
    transform: translateX(-30px);
  }
}


/* app/assets/stylesheets/application.css or your main stylesheet */
.message-slide-in {
  animation: messageSlideIn 0.3s ease-out;
}

.message-slide-out {
  animation: messageSlideOut 0.3s ease-in forwards;
}

@keyframes messageSlideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes messageSlideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}
/* ==========================================================================
   Desktop app (Electron shell) chrome
   Scoped to body.desktop-app, which the layouts set when the request comes
   from the app (DesktopAppHelper#desktop_app?). Nothing here applies on the
   web or in the native mobile app.

   The app window has no title bar of its own — hiddenInset on macOS, a Window
   Controls Overlay on Windows — so there is nothing for the OS to drag the
   window by. A page has to volunteer that: an element marked
   `-webkit-app-region: drag` is the only thing that makes a chromeless window
   movable. This file draws it, and keeps everything the app pins to the top of
   the viewport out from under it.

   The signed-in top bar lives IN that native strip — Claude's arrangement,
   the island sitting in the traffic-light band rather than stacked under it.
   A 15px gutter sits above the island so the pill is not flush with the
   window edge, and the same 15px sits under the strip, so a full-height
   scroller still starts just under the window controls. Only the bar
   lives in the header.
   ========================================================================== */

body.desktop-app {
  --desktop-titlebar-height: 38px;
  /* Keep in step with TITLEBAR_HEIGHT in the desktop repo
     (github.com/9thdesigns/move-desktop-app, src/config.js): the shell
     sizes the Windows caption buttons from it, and its own fallback strip too. */

  /* Air above the nav island, and between the native strip and the first
     line of app content. The titlebar itself stays 38px — this does not
     grow the drag region, it only insets the pill and starts the page a
     hair lower. */
  --desktop-content-gutter: 15px;
  --desktop-content-offset: calc(var(--desktop-titlebar-height) + var(--desktop-content-gutter));

  /* Room the Back/Forward cluster occupies, after the traffic lights
     (macOS) or from the left edge (Windows). html[data-desktop-platform]
     (set by the layout) retunes the two insets per OS. */
  --desktop-traffic-inset: 78px;
  --desktop-history-width: 64px;
  --desktop-caption-inset: 0px;
  --desktop-nav-left: calc(var(--desktop-traffic-inset) + var(--desktop-history-width));
  --desktop-nav-right: calc(var(--desktop-caption-inset) + 8px);

  /* The strip sits over the top of the viewport; page content starts below it.
     The top bar is taken out of flow (position: fixed, below) so this is the
     only offset the page pays — the native-header gutter, not header-plus-bar. */
  padding-top: var(--desktop-content-offset);
  box-sizing: border-box;

  /* The island lives IN the titlebar. Web occupancy would double-pad
     every glass header under a strip the page has already cleared. */
  --mv-nav-offset: 0px;
  --mv-header-safe: 0px;
}

html[data-desktop-platform="darwin"] body.desktop-app,
body.desktop-app[data-desktop-platform="darwin"] {
  --desktop-traffic-inset: 78px;
  --desktop-caption-inset: 0px;
}

html[data-desktop-platform="win32"] body.desktop-app,
body.desktop-app[data-desktop-platform="win32"] {
  --desktop-traffic-inset: 10px;
  --desktop-caption-inset: 140px;
}

/* The draggable strip under the macOS traffic lights / Windows caption
   buttons.

   It has to be opaque. Only the first screenful sits below it: the page
   scrolls underneath, so a transparent strip would show scrolled content in
   exactly the band where the window paints its controls over the web view,
   leaving live text running under the buttons. The colour is the page's own
   background rather than a fixed grey, so the strip reads as part of the
   window on light and dark screens alike.
   desktop_titlebar_controller copies the computed background onto
   --desktop-titlebar-bg when it connects; the value below covers the first
   paint and any page whose JavaScript does not run.

   z-index sits under the island (so the island is clickable) in document
   order: the shell's preload pins .desktop-titlebar at the top of the
   stack with !important, so the island and history meet it there rather
   than trying to climb past it. */
body.desktop-app .desktop-titlebar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--desktop-titlebar-height);
  z-index: 2147483647;
  background-color: var(--desktop-titlebar-bg, #f2f2f2);
  -webkit-app-region: drag;
  -webkit-user-select: none;
  user-select: none;
  pointer-events: auto;
}

/* Anything pinned to the top of the *window* has to sit under the strip
   rather than behind it: page headers, toasts.

   This is opt-in, and deliberately so. Matching `.sticky.top-0` outright also
   catches every card, drawer and panel header that sticks inside its own
   scrolling box — the calendar list headers, the mailbox composer, the space
   tabs. Those stick to the top of their container, not the window, and giving
   them this offset opens a 38px hole at the top of the container instead.
   Whether an element sticks to the window depends on whether any ancestor
   scrolls, which no selector can express, so desktop_titlebar_controller works
   it out per element and adds this class to the ones that qualify.

   With no JavaScript nothing is marked, and a page header can end up behind
   the strip. That is the safe failure: the strip is opaque either way, so
   content still never shows through under the window controls. */
body.desktop-app .desktop-top-inset {
  top: var(--desktop-content-offset);
}

/* Interactive controls never live inside the strip, but if one is ever placed
   there it must stay clickable. */
body.desktop-app .desktop-titlebar * {
  -webkit-app-region: no-drag;
}

/* The Electron preload paints a full-width drag overlay at max z-index so
   the window stays movable when a modal is up. That overlay would swallow
   clicks on the island now sitting in the same band, so on pages that draw
   their own titlebar it becomes a pass-through: .desktop-titlebar is what
   the user drags by, and the history cluster / island receive the click.
   Children with pointer-events: auto (the cluster, below) still fire. */
body.desktop-app #move-desktop-drag-strip {
  pointer-events: none;
  -webkit-app-region: no-drag;
}

/* ──────────────────────────────────────────────────────────────────────────
   Back / Forward — Claude's cluster, after the traffic lights.

   Positioned in the native strip, not in the page. no-drag so a press is a
   click; the rest of the strip stays the window's handle. z-index matches
   the strip (the preload pins it at the top of the stack) so document
   order — this nav is a sibling after the strip — puts the buttons on top.
   ────────────────────────────────────────────────────────────────────────── */

body.desktop-app .desktop-history {
  position: fixed;
  top: 0;
  left: var(--desktop-traffic-inset);
  height: var(--desktop-titlebar-height);
  width: var(--desktop-history-width);
  z-index: 2147483647;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 4px;
  box-sizing: border-box;
  -webkit-app-region: no-drag;
  pointer-events: auto;
  -webkit-user-select: none;
  user-select: none;
}

body.desktop-app .desktop-history__btn {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  flex: 0 0 28px;
  -webkit-app-region: no-drag;
}

body.desktop-app .desktop-history__btn svg {
  width: 14px;
  height: 14px;
  display: block;
}

body.desktop-app .desktop-history__btn:hover:not(:disabled) {
  background: rgba(31, 31, 31, 0.075);
  color: #1f1f1f;
}

body.desktop-app .desktop-history__btn:active:not(:disabled) {
  transform: scale(0.92);
}

body.desktop-app .desktop-history__btn:disabled {
  opacity: 0.28;
  cursor: default;
}

html.dark body.desktop-app .desktop-history__btn,
html[data-theme="dark"] body.desktop-app .desktop-history__btn {
  color: #9b9a97;
}

html.dark body.desktop-app .desktop-history__btn:hover:not(:disabled),
html[data-theme="dark"] body.desktop-app .desktop-history__btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.86);
}

@media (prefers-reduced-motion: reduce) {
  body.desktop-app .desktop-history__btn:active:not(:disabled) { transform: none; }
}

/* ──────────────────────────────────────────────────────────────────────────
   The signed-in top bar — in the native strip, not under it

   `position: fixed` takes it out of the body's flow, so a 100dvh column
   still sizes against the titlebar padding alone. `top: 0` keeps the shell
   in the strip; `padding-top` is the 15px above the island (the desktop
   override used to push the whole bar under the strip, which is why it
   sat a full header below the window controls). The row stays 40px —
   the island's own height — so that gutter is visible rather than eaten
   by stretching the row to fill the strip. The shell stays
   `pointer-events: none` (its own rule) so empty titlebar either side of
   the island still hits .desktop-titlebar and drags the window; the
   island and the account rail opt back in, and are marked no-drag so a
   press on them is a click.

   z-index matches the strip. The preload pins .desktop-titlebar at the
   top of the stack with !important, so the island has to meet it there;
   it is later in the document, so it paints on top of the drag region
   and stays clickable.

   The selectors lead with `html…` or repeat `.desktop-app` because some
   of the rules they override live in a <style> inside the page, which
   comes later in the document than this sheet — they have to win on
   specificity rather than order.
   ────────────────────────────────────────────────────────────────────────── */

body.desktop-app .mv-topbar-shell {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: auto;
  padding-top: var(--desktop-content-gutter);
  padding-right: 0;
  padding-bottom: 0;
  padding-left: 0;
  z-index: 2147483647 !important;
  overflow: visible;
  /* The web sheet sizes the hide-transform from these. Desktop does not
     slide the shell (see below), but keeping them in step with the 38px
     row means a stray transform cannot park the peek in the wrong place. */
  --mv-bar-gap: 0px;
  --mv-bar-row: 38px;
  --mv-peek-gap: 0px;
}

body.desktop-app .mv-topbar__row {
  height: 38px;
  /* Floor the flanks at the history cluster (left) and the Windows caption
     buttons (right) so the island yields to them on a narrow window instead
     of sliding underneath. */
  grid-template-columns:
    minmax(var(--desktop-nav-left), 1fr)
    auto
    minmax(var(--desktop-nav-right), 1fr);
}

body.desktop-app .mv-topbar__aside {
  /* Caption buttons on Windows, plus a little air on every platform so the
     hide chevron is not flush with the window edge. */
  padding-right: calc(var(--desktop-caption-inset) + 14px);
}

body.desktop-app .mv-topbar,
body.desktop-app .mv-topbar__aside,
body.desktop-app .mv-topbar__collapse,
body.desktop-app .mv-topbar__peek,
body.desktop-app .event-nav-peek {
  -webkit-app-region: no-drag;
}

/* Collapsed: Configure My AI's height-0 shell, not the web's slide-away
   transform. A transformed ancestor makes position:fixed act like absolute,
   which is what parked the peek tab under the island instead of in the
   traffic-light band. */
html.mv-nav-hidden body.desktop-app .mv-topbar-shell,
html.event-nav-hidden body.desktop-app .mv-topbar-shell {
  transform: none;
  padding-top: 0;
  height: 0;
  overflow: visible;
}

html.mv-nav-hidden body.desktop-app .mv-topbar__row,
html.event-nav-hidden body.desktop-app .mv-topbar__row {
  height: 0;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}

/* Peek tab — CMA's floating grab, centred in the native strip. */
body.desktop-app .mv-topbar__peek {
  position: fixed;
  top: calc((var(--desktop-titlebar-height) - 24px) / 2);
  left: 50%;
  transform: translateX(-50%);
  margin-top: 0;
  width: 46px;
  height: 24px;
  border-radius: 0 0 10px 10px;
  z-index: 2147483647;
}

html.mv-nav-hidden body.desktop-app .mv-topbar__peek:hover {
  transform: translateX(-50%) translateY(2px);
}

/* Event show, calendar show and the space/group show pin the same nav with
   `position: fixed` while their auto-hiding chrome is in play
   (shared/_nav_collapse). Keep it in the strip, not under it. */
html.event-nav-managed body.desktop-app #application-nav,
html.event-nav-managed body.desktop-app nav.notion-nav-dark {
  top: 0;
  z-index: 2147483647;
}

/* The floating peek button those screens show once the nav has hidden itself
   is 26px tall; centre it in the strip so it does not hang into the page. */
body.desktop-app .event-nav-peek {
  top: calc((var(--desktop-titlebar-height) - 26px) / 2);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2147483647;
}

/* Signed-out screens (welcome, sign in, sign up, password reset) fill the
   window and centre vertically. */
body.desktop-app .desktop-center {
  min-height: calc(100dvh - var(--desktop-content-offset));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

body.desktop-app .desktop-center > * {
  width: 100%;
}

/* Neutralise the inner full-height wrappers and top margins the auth screens
   carry for the web, which would otherwise push them off centre or add a
   second screen height of scrolling. */
body.desktop-app .desktop-center .min-h-full,
body.desktop-app .desktop-center .min-h-screen,
body.desktop-app .desktop-center .h-screen {
  min-height: 0 !important;
  height: auto !important;
}

body.desktop-app .desktop-center .mt-24,
body.desktop-app .desktop-center .sm\:mt-20,
body.desktop-app .desktop-center .mt-6 {
  margin-top: 0 !important;
}

body.desktop-app .desktop-center .py-12 {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* A page's own chrome behaves like an app, not a document. */
body.desktop-app {
  -webkit-tap-highlight-color: transparent;
}

body.desktop-app img,
body.desktop-app a {
  -webkit-user-drag: none;
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *
































 */

 /* Global slight fade */
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.5s;
}

.back-to-top-container {
  position: absolute;
  top: 0;
  left: 0;
  height: 100vh;
  width: 1px; /* MS Edge requires a nominal dimension */
}

.back-to-top__button {
  position: fixed;
  bottom: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

.back-to-top-container--intersecting .back-to-top__button {
  opacity: 1;
  visibility: visible;
}

@max-width 768px {
  body, html {
    -ms-overflow-style: none !important;  /* Internet Explorer 10+ */
    scrollbar-width: none !important;  /* Firefox */
  }
  ::-webkit-scrollbar { 
    display: none !important;  /* Safari and Chrome */
  }

  ::-webkit-scrollbar {
    -webkit-appearance: none !important;
    width: 0 !important;
    height: 0 !important;
}

}


.display-scroll * {
  scrollbar-width: auto !important;
  -ms-overflow-style: auto !important;
}

.display-scroll::-webkit-scrollbar {
  -webkit-appearance: none;
  display: block;
  width: 8px;
  height: 8px;
}

.display-scroll::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.display-scroll::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

.display-scroll::-webkit-scrollbar-thumb:hover {
  background: #555;
}


/* Embed widget animations */
.animate-fade-in {
  animation: fadeIn 0.2s ease-in-out;
}

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

/* Embed scrollbar styling */
.task-embed-widget::-webkit-scrollbar {
  width: 6px;
}

.task-embed-widget::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.task-embed-widget::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.task-embed-widget::-webkit-scrollbar-thumb:hover {
  background: #a1a1a1;
}

/* Sortable drag and drop styles */
.sortable-dragging {
  opacity: 0.95;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: scale(1.02);
  z-index: 1000;
  position: relative;
}

.sortable-placeholder {
  background: #f3f4f6;
  border: 2px dashed #d1d5db;
  border-radius: 8px;
  margin-bottom: 0.75rem;
}

.handle,
.sortable-handle {
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.handle:active,
.sortable-handle:active {
  cursor: grabbing;
}

/* Prevent text selection during drag */
[data-sortable-item] {
  user-select: none;
}

[data-sortable-item] * {
  user-select: text;
}

[data-sortable-item] .handle,
[data-sortable-item] .sortable-handle {
  user-select: none;
}
/* ============================================================================
   HALO — DESKTOP AESTHETIC LAYER (v1)
   ============================================================================
   Loaded LAST from default.css so it can refine (not replace) the existing
   design system. It reuses the colors already established across the app:

     • Brand gold ........ #d6b72f / #CFB431 / #b89a23 (dark) / #E4DAAA (light)
     • Primary ink ....... #171717 (buttons / strong actions)
     • Notion text ....... #37352F  (primary copy)
     • Notion subtle ..... #787774  (secondary copy)
     • Surfaces .......... #ffffff on a #f2f2f2 canvas
     • Accent blue ....... #2383E2 / #3B82F6 (interactive highlights)

   GOAL (per product pillars): a calmer, lighter, more approachable surface —
   soft shadows, generous radius, smooth premium motion, instant feedback —
   without touching the global nav bar, the dashboard tab bar, or the primary
   sidebar navigation links.
   ============================================================================ */

:root {
  /* Reuse, don't redefine — alias the established palette into a halo-* scale
     so component rules read consistently. */
  --halo-ink:            #171717;
  --halo-text:           #37352F;
  --halo-text-subtle:    #787774;
  --halo-text-faint:     #9B9A97;
  --halo-gold:           #d6b72f;
  --halo-gold-strong:    #b89a23;
  --halo-gold-soft:      #E4DAAA;
  --halo-blue:           #2383E2;

  --halo-surface:        #ffffff;
  --halo-canvas:         #f2f2f2;
  --halo-hairline:       rgba(55, 53, 47, 0.08);
  --halo-hairline-soft:  rgba(55, 53, 47, 0.04);
  --halo-hover:          rgba(55, 53, 47, 0.05);
  --halo-active:         rgba(55, 53, 47, 0.09);
  /* The icon tile's raised fill on hover. It must read as ABOVE the pill's
     own hover fill, so it is a lightening on light and stays a lightening on
     dark — not the surface colour, which would invert with the theme. */
  --halo-ic-raise:       rgba(255, 255, 255, 0.9);

  /* Radius scale — soft, friendly corners. */
  --halo-radius-sm: 8px;
  --halo-radius:    12px;
  --halo-radius-lg: 16px;
  --halo-radius-pill: 100px;

  /* Calm, layered shadows rather than hard borders. */
  --halo-shadow-xs: 0 1px 2px rgba(15, 20, 25, 0.04);
  --halo-shadow-sm: 0 1px 3px rgba(15, 20, 25, 0.06), 0 0 0 1px rgba(15, 20, 25, 0.04);
  --halo-shadow:    0 4px 16px rgba(15, 20, 25, 0.06), 0 0 0 1px rgba(15, 20, 25, 0.04);
  --halo-shadow-lg: 0 12px 32px rgba(15, 20, 25, 0.10), 0 0 0 1px rgba(15, 20, 25, 0.05);

  /* Premium, expressive easing (pillars: trust + humanization). */
  --halo-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --halo-ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
  --halo-dur: 0.22s;
}

/* ============================================================================
   1. FLOATING HOME SIDEBAR ACTIONS  (greeting + quick-action pills)
   ============================================================================
   A light, floating greeting + quick-action button stack used at the top of
   the desktop dashboard home. Renders as a calm card of pill buttons. */

.halo-home {
  display: block;
}

.halo-home__greeting {
  margin: 4px 0 14px;
}
.halo-home__greeting h2 {
  font-size: 26px;
  line-height: 1.15;
  font-weight: 600 !important;
  letter-spacing: -0.02em;
  color: var(--halo-text);
  margin: 0;
}
.halo-home__greeting p {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--halo-text-subtle);
}

.halo-home__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 6px;
  padding: 0;
  list-style: none;
}

.halo-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--halo-text);
  background: var(--halo-surface);
  border: none;
  border-radius: var(--halo-radius-pill);
  box-shadow: var(--halo-shadow-sm);
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--halo-dur) var(--halo-ease),
              box-shadow var(--halo-dur) var(--halo-ease),
              background-color 0.15s ease;
  white-space: nowrap;
}
.halo-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--halo-shadow);
  background: #fff;
  text-decoration: none;
}
.halo-action-btn:active {
  transform: translateY(0) scale(0.98);
}
/* Accessible, premium focus ring (trust through polish). */
.halo-action-btn:focus-visible {
  outline: none;
  box-shadow: var(--halo-shadow), 0 0 0 3px rgba(184, 154, 35, 0.35);
}
.halo-action-btn svg,
.halo-action-btn i {
  width: 16px;
  height: 16px;
  font-size: 15px;
  color: var(--halo-text-subtle);
  flex-shrink: 0;
  /* Expressive icon micro-motion — the glyph feels alive on hover. */
  transition: transform 0.25s var(--halo-ease), color 0.15s ease;
}
.halo-action-btn:hover svg,
.halo-action-btn:hover i { color: var(--halo-text); transform: scale(1.12) rotate(-4deg); }
.halo-action-btn:active svg,
.halo-action-btn:active i { transform: scale(0.96); }

/* Primary (filled) variant — strong ink action, e.g. "New event". */
.halo-action-btn--primary {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: var(--halo-ink);
  box-shadow: 0 2px 6px rgba(15, 20, 25, 0.18);
}
/* Premium sheen — a soft light sweeps across the CTA on hover (Revolut-style
   polish) to signal a high-value, trustworthy primary action. */
.halo-action-btn--primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: skewX(-18deg);
  transition: none;
  pointer-events: none;
}
.halo-action-btn--primary:hover::after {
  animation: haloSheen 0.85s var(--halo-ease) forwards;
}
@keyframes haloSheen {
  from { left: -120%; }
  to   { left: 140%; }
}
.halo-action-btn--primary:hover {
  background: #262626;
  box-shadow: 0 6px 16px rgba(15, 20, 25, 0.22);
}
.halo-action-btn--primary:hover svg,
.halo-action-btn--primary:hover i { transform: scale(1.12) rotate(90deg); }
.halo-action-btn--primary svg,
.halo-action-btn--primary i,
.halo-action-btn--primary:hover svg,
.halo-action-btn--primary:hover i { color: rgba(255, 255, 255, 0.85); }

/* Gold accent variant — celebratory / brand action (e.g. Quick Setup). */
.halo-action-btn--gold {
  color: #4a3f10;
  background: var(--halo-gold-soft);
  box-shadow: inset 0 0 0 1px rgba(184, 154, 35, 0.35);
}
.halo-action-btn--gold:hover { background: #ecdfae; }
.halo-action-btn--gold svg,
.halo-action-btn--gold i { color: var(--halo-gold-strong); }

/* ── Soft variant ─────────────────────────────────────────────────────────
   Subtle, low-emphasis CTA — a faint tinted fill, no shadow, no lift. Used
   for the sidebar quick-actions ("Start something" / "Quick setup") so they
   read as calm, secondary actions rather than loud buttons. */
.halo-action-btn--soft {
  color: var(--halo-text);
  background: rgba(55, 53, 47, 0.045);
  box-shadow: none;
}
.halo-action-btn--soft:hover {
  background: rgba(55, 53, 47, 0.08);
  box-shadow: none;
  transform: none;
}
.halo-action-btn--soft:active { transform: scale(0.98); }
.halo-action-btn--soft .halo-ic { color: var(--halo-text-subtle); background: transparent; }
.halo-action-btn--soft:hover .halo-ic { color: var(--halo-text); }

/* ── "Start something" inline reveal ──────────────────────────────────────
   Toggles its create options open directly below the trigger, exactly like
   the category accordions. Native <details> — no JS. */
.halo-start__details { width: 100%; }
.halo-start__trigger { width: 100%; list-style: none; cursor: pointer; }
.halo-start__trigger::-webkit-details-marker { display: none; }
.halo-start__caret {
  width: 13px; height: 13px;
  margin-left: auto;
  color: var(--halo-text-subtle);
  flex-shrink: 0;
  transition: transform 0.25s var(--halo-ease);
}
.halo-start__details[open] > .halo-start__trigger .halo-start__caret { transform: rotate(180deg); }

.halo-start__menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 0 2px;
}
.halo-start__form { margin: 0; display: block; }
.halo-start__item { width: 100%; }
/* Smooth, staggered reveal when opened (mirrors the category reveal). */
.halo-start__details[open] > .halo-start__menu > .halo-start__item,
.halo-start__details[open] > .halo-start__menu > .halo-start__form {
  animation: haloNavReveal 0.3s var(--halo-ease) both;
}
.halo-start__details[open] > .halo-start__menu > *:nth-child(1) { animation-delay: 0.02s; }
.halo-start__details[open] > .halo-start__menu > *:nth-child(2) { animation-delay: 0.05s; }
.halo-start__details[open] > .halo-start__menu > *:nth-child(3) { animation-delay: 0.08s; }
.halo-start__details[open] > .halo-start__menu > *:nth-child(4) { animation-delay: 0.11s; }

[data-sidebar-toggle-collapsed-value="true"] .halo-start__caret { display: none; }

@media (prefers-reduced-motion: reduce) {
  .halo-start__caret { transition: none !important; }
  .halo-start__details[open] > .halo-start__menu > * { animation: none !important; }
}

/* ── Sidebar variant ──────────────────────────────────────────────────────
   Floating greeting + full-width button stack pinned to the top of the
   dashboard left sidebar (Basecamp home__sidebar pattern). */
.halo-home--sidebar {
  margin: 4px 8px 10px;
  padding: 14px;
  width: 232px;
  max-width: 100%;
  background: var(--halo-surface);
  border-radius: var(--halo-radius-lg);
  box-shadow: var(--halo-shadow);
}
.halo-home--sidebar .halo-home__greeting { margin: 0 0 12px; }
.halo-home--sidebar .halo-home__greeting h2 { font-size: 18px; line-height: 1.2; }
.halo-home--sidebar .halo-home__greeting p { font-size: 12.5px; margin-top: 3px; }

/* Vertical, full-width pills. */
.halo-home__actions--stack {
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 8px;
}
.halo-home__actions--stack > li { width: 100%; }
/* Compact CTAs — "New event" / "Quick setup" sit smaller than nav rows. */
.halo-home__actions--stack .halo-action-btn {
  width: 100%;
  justify-content: flex-start;
  gap: 8px;
  padding: 7px 12px;
  font-size: 13px;
  border-radius: var(--halo-radius);
}
.halo-home__actions--stack .halo-action-btn .halo-ic {
  width: 24px;
  height: 24px;
}
.halo-home__actions--stack .halo-action-btn .halo-ic-svg {
  width: 16px;
  height: 16px;
}

/* ── Ghost button variant ─────────────────────────────────────────────────
   Used for the categorized nav links so the ENTIRE sidebar (greeting +
   quick actions + nav) reads as one Halo section. Lighter than the filled
   pills: transparent, no shadow, subtle hover — same shape + motion. */
.halo-action-btn--ghost {
  width: 100%;
  justify-content: flex-start;
  gap: 13px;
  padding: 9px 13px;
  font-weight: 500;
  background: transparent;
  box-shadow: none;
  border-radius: var(--halo-radius);
}
.halo-action-btn--ghost {
  color: var(--halo-text);
  font-size: 14px;
  font-weight: 500;
}
.halo-action-btn--ghost:hover {
  background: var(--halo-hover);
  box-shadow: none;
  transform: none;
}
/* Icon tile lifts subtly on hover for a tactile, modern feel. */
.halo-action-btn--ghost:hover .halo-ic {
  background: var(--halo-ic-raise, rgba(255, 255, 255, 0.9));
  box-shadow: var(--halo-shadow-sm);
  color: var(--halo-text);
}
.halo-action-btn--ghost:hover .halo-ic-svg { transform: scale(1.06); }
.halo-action-btn--ghost:active { transform: scale(0.985); }

/* Icon slot — a soft rounded tile that carries the SVG glyph + badge. */
.halo-ic {
  position: relative;
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  border-radius: 9px;
  color: var(--halo-text-subtle);
  background: transparent;
  transition: background-color 0.15s ease, box-shadow var(--halo-dur) var(--halo-ease), color 0.15s ease;
}
.halo-ic-svg {
  width: 18px; height: 18px;
  display: block;
  transition: transform 0.2s var(--halo-ease);
}
/* Filled CTAs keep their light glyph and no tile chrome. */
.halo-action-btn--primary .halo-ic,
.halo-action-btn--gold .halo-ic { background: transparent; box-shadow: none; }
.halo-action-btn--primary .halo-ic { color: rgba(255, 255, 255, 0.92); }
.halo-action-btn--gold .halo-ic { color: var(--halo-gold-strong); }

.halo-badge {
  position: absolute;
  top: -4px; right: -4px;
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 16px; height: 16px; padding: 0 4px;
  font-size: 10px; font-weight: 700; line-height: 1;
  color: #fff; border-radius: 9999px;
  box-shadow: 0 0 0 2px var(--halo-surface);
}
/* Honor the `hidden` utility / JS toggle: .halo-badge's own `display` would
   otherwise tie with Tailwind's `.hidden` and win on source order, leaving a
   "0" badge visible when there's nothing to show. */
.halo-badge.hidden { display: none; }

/* ── Halo edge "nub" collapse toggle ──────────────────────────────────────
   A small round control that pops out of the card's right edge — like a
   button budding out of the Halo surface. It overlaps the edge (half on the
   card, half off) so it reads as part of the card, not a separate UI chip. */
.halo-home--sidebar { position: relative; }
.halo-rail-toggle {
  position: absolute;
  top: 18px;
  right: -13px;
  z-index: 20;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: none;
  border-radius: 9999px;
  color: var(--halo-text-subtle);
  background: var(--halo-surface);
  box-shadow: var(--halo-shadow);
  cursor: pointer;
  transition: transform 0.28s var(--halo-ease),
              box-shadow var(--halo-dur) var(--halo-ease),
              color 0.15s ease, background-color 0.15s ease;
}
/* The "pop": nub eases outward + scales up on hover, like it's budding out. */
.halo-rail-toggle:hover {
  color: var(--halo-text);
  background: #fff;
  box-shadow: var(--halo-shadow-lg);
  transform: translateX(2px) scale(1.12);
}
.halo-rail-toggle:active { transform: translateX(2px) scale(0.94); }
.halo-rail-toggle__chevron {
  width: 13px;
  height: 13px;
  transition: transform 0.32s var(--halo-ease);
}
/* Expanded: chevron points left ("collapse"). */
.halo-rail-toggle__chevron { transform: rotate(0deg); }

/* ── Collapsed rail — stays a FLOATING Halo card of icon pills ─────────────
   When collapsed, the section keeps its card chrome (surface + shadow +
   radius) and simply narrows to an icon rail. Greeting text + CTAs hide; the
   wave becomes the opener and nav links become centered icon pills. */
[data-sidebar-toggle-collapsed-value="true"] .halo-home--sidebar {
  width: 64px;
  margin: 4px 6px 10px;
  padding: 8px;
  border-radius: var(--halo-radius-lg);
  background: var(--halo-surface);
  box-shadow: var(--halo-shadow);
}
/* Nub flips to point right ("expand") and keeps its edge-pop position. */
[data-sidebar-toggle-collapsed-value="true"] .halo-rail-toggle__chevron {
  transform: rotate(180deg);
}
[data-sidebar-toggle-collapsed-value="true"] .halo-home__divider {
  display: block;
  margin: 8px 6px;
}
[data-sidebar-toggle-collapsed-value="true"] .halo-home--sidebar .halo-action-btn {
  width: 46px;
  height: 46px;
  padding: 0;
  margin: 0 auto;
  gap: 0;
  justify-content: center;
  border-radius: var(--halo-radius);
  box-shadow: none;
  transition: transform var(--halo-dur) var(--halo-ease),
              background-color 0.15s ease;
}
[data-sidebar-toggle-collapsed-value="true"] .halo-home--sidebar .halo-action-btn:hover {
  transform: translateY(-1px);
}
[data-sidebar-toggle-collapsed-value="true"] .halo-ic { width: 24px; height: 24px; }
[data-sidebar-toggle-collapsed-value="true"] .halo-ic-svg { width: 20px; height: 20px; }
[data-sidebar-toggle-collapsed-value="true"] .halo-group { margin-top: 0; }

/* ============================================================================
   2. MODERN PAGINATION  (Pagy nav — /all-calendars, /all-spaces, /all-events)
   ============================================================================
   Pagy 6 renders <nav class="pagy-nav pagination"> with <span class="page …">
   wrappers. This turns the default browser links into a calm, modern pill
   navigator that matches the rest of the surface. */

.pagy-nav.pagination,
nav.pagy-nav {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  padding: 4px;
  background: var(--halo-surface);
  border-radius: var(--halo-radius-pill);
  box-shadow: var(--halo-shadow-sm);
  font-size: 13px;
}

/* The .page elements are themselves <span>s; linked pages nest an <a>.
   The wrapper stays a zero-padding flex box and the visible pill lives on
   the <a> (links) or directly on the text-only span (active/disabled/gap). */
.pagy-nav .page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pagy-nav .page a,
.pagy-nav .page.active,
.pagy-nav .page.disabled,
.pagy-nav .page.gap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 11px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  color: var(--halo-text);
  text-decoration: none;
  border-radius: var(--halo-radius-pill);
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s var(--halo-ease);
}

.pagy-nav .page a:hover {
  background: var(--halo-hover);
  color: var(--halo-text);
  text-decoration: none;
}
.pagy-nav .page a:active { transform: scale(0.94); }

/* Current page — strong ink pill. */
.pagy-nav .page.active {
  background: var(--halo-ink);
  color: #fff;
  font-weight: 600;
  cursor: default;
}

/* Disabled prev / next. */
.pagy-nav .page.disabled {
  color: var(--halo-text-faint);
  cursor: not-allowed;
}

/* Gap "…" marker. */
.pagy-nav .page.gap {
  color: var(--halo-text-faint);
  background: transparent;
  cursor: default;
}

/* ============================================================================
   3. SCOPED SURFACE POLISH
   ============================================================================
   Gentle refinements applied only inside dashboard / list surfaces. These
   smooth motion and unify radius/shadow without altering structure, colors,
   the nav bar, the tab bar, or sidebar nav links. */

/* Smooth, premium hover lift for interactive cards on the dashboard. */
.dash-wrapper [data-sortable-item],
.dash-wrapper .feed-surface,
.halo-lift {
  transition: transform var(--halo-dur) var(--halo-ease),
              box-shadow var(--halo-dur) var(--halo-ease);
}
.halo-lift:hover {
  transform: translateY(-2px);
  box-shadow: var(--halo-shadow-lg);
}

/* List-page rows feel a touch more alive on hover (instant feedback pillar). */
.notifications-root .notification-row-base > div {
  transition: background-color 0.15s ease, box-shadow var(--halo-dur) var(--halo-ease),
              transform var(--halo-dur) var(--halo-ease);
}
.notifications-root .notification-row-base:hover > div {
  box-shadow: var(--halo-shadow-sm);
}

/* Reusable opt-in surface card. */
.halo-card {
  background: var(--halo-surface);
  border-radius: var(--halo-radius-lg);
  box-shadow: var(--halo-shadow-sm);
}

/* Reusable soft, page-entry fade for opted-in sections. */
@keyframes haloFadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.halo-fade-up { animation: haloFadeUp 0.45s var(--halo-ease) both; }

/* ============================================================================
   4. EXPRESSIVE MOTION & PERSONALITY  (humanization pillar)
   ============================================================================
   Small, delightful touches that make the surface feel alive and human
   rather than robotic — a friendly greeting wave and a springy, staggered
   entrance for grouped items. */

/* Friendly waving hand — waves ONCE on these triggers: first load + sidebar
   toggle (the .is-waving class, added/removed by sidebar_toggle_controller)
   and on hover of the wave button. Otherwise it rests still. */
.halo-wave {
  display: inline-block;
  transform-origin: 70% 80%;
}
.halo-wave.is-waving,
.halo-wave-btn:hover .halo-wave {
  animation: haloWave 1s var(--halo-ease) both;
}
@keyframes haloWave {
  0%   { transform: rotate(0deg); }
  15%  { transform: rotate(14deg); }
  30%  { transform: rotate(-8deg); }
  45%  { transform: rotate(14deg); }
  60%  { transform: rotate(-4deg); }
  75%  { transform: rotate(10deg); }
  100% { transform: rotate(0deg); }
}

/* Staggered, springy entrance for a group of children (e.g. action pills). */
.halo-stagger > * {
  opacity: 0;
  animation: haloPopIn 0.5s var(--halo-ease) both;
}
.halo-stagger > *:nth-child(1) { animation-delay: 0.05s; }
.halo-stagger > *:nth-child(2) { animation-delay: 0.11s; }
.halo-stagger > *:nth-child(3) { animation-delay: 0.17s; }
.halo-stagger > *:nth-child(4) { animation-delay: 0.23s; }
.halo-stagger > *:nth-child(5) { animation-delay: 0.29s; }
.halo-stagger > *:nth-child(6) { animation-delay: 0.35s; }
.halo-stagger > *:nth-child(7) { animation-delay: 0.41s; }
@keyframes haloPopIn {
  0%   { opacity: 0; transform: translateY(10px) scale(0.96); }
  70%  { opacity: 1; transform: translateY(-2px) scale(1.01); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Respect reduced-motion preferences (accessibility / calm). All Halo motion
   collapses to a static, instant state. */
@media (prefers-reduced-motion: reduce) {
  .halo-action-btn,
  .halo-action-btn svg,
  .halo-action-btn i,
  .halo-action-btn--primary::after,
  .pagy-nav .page a,
  .halo-lift,
  .halo-fade-up,
  .halo-wave,
  .halo-stagger > *,
  .notifications-root .notification-row-base > div {
    transition: none !important;
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
/* Events public show — soft hero fade + invitation layout.
   Scoped to .event-show; per-event color via --event-color / --event-text-color. */

/* ── Top banners ── */
.event-top-banner__card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  max-width: min(100%, 1360px);
  margin: 0 auto;
  padding: 0.7rem 0.9rem;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.04), 0 8px 22px -14px rgba(16, 24, 40, 0.18);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  font-family: 'FixelText', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}
.event-top-banner__icon {
  flex: 0 0 auto;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 0.9rem;
}
.event-top-banner__text { flex: 1 1 auto; min-width: 0; }
.event-top-banner__title { font-size: 0.86rem; font-weight: 650; letter-spacing: -0.01em; line-height: 1.25; }
.event-top-banner__sub { font-size: 0.74rem; line-height: 1.3; margin-top: 1px; opacity: 0.8; }
.event-top-banner__close {
  flex: 0 0 auto;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: currentColor;
  opacity: 0.6;
  background: rgba(120, 120, 128, 0.14);
  transition: opacity 0.15s, background 0.15s;
  border: none;
}
.event-top-banner__close:hover { opacity: 1; background: rgba(120, 120, 128, 0.24); }
.event-top-banner__card--amber { background: rgba(255, 247, 237, 0.85); color: #92400e; }
.event-top-banner__card--amber .event-top-banner__icon { background: rgba(251, 191, 36, 0.22); color: #b45309; }
.event-top-banner__card--rose { background: rgba(255, 241, 242, 0.85); color: #9f1239; }
.event-top-banner__card--rose .event-top-banner__icon { background: rgba(244, 63, 94, 0.18); color: #e11d48; }
.event-top-banner__card--slate { background: rgba(248, 250, 252, 0.85); color: #334155; }
.event-top-banner__card--slate .event-top-banner__icon { background: rgba(100, 116, 139, 0.16); color: #475569; }
.dark .event-top-banner__card--amber { background: rgba(120, 53, 15, 0.32); color: #fcd9a8; }
.dark .event-top-banner__card--rose { background: rgba(136, 19, 55, 0.32); color: #fecdd3; }
.dark .event-top-banner__card--slate { background: rgba(255, 255, 255, 0.06); color: #e2e8f0; }

/* ── Page shell ── */
.event-show {
  --event-show-max: 1120px;
  --event-show-gutter: 1.15rem;
  --event-show-radius: 20px;
  --event-show-card-radius: 16px;
  --event-show-section-pad: 1.25rem;
  --fact-lead: 3.25rem;
  --fact-gap: 0.85rem;
  --ink: #37352f;
  --ink-muted: #787774;
  --ink-faint: #9b9a97;
  --ground: #f2f2f2;
  --surface: #fff;
  position: relative;
  min-height: 100dvh;
  background: var(--ground);
  font-family: 'FixelText', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
.dark .event-show {
  --ground: #191919;
  --surface: #1f1f1f;
  --ink: #e8e8e6;
  --ink-muted: #9b9a97;
}

.event-show__shell {
  position: relative;
  z-index: 1;
  max-width: var(--event-show-max);
  margin: 0 auto;
  padding: 0 var(--event-show-gutter) 5.5rem;
}
@media (min-width: 768px) {
  .event-show {
    --event-show-gutter: 1.5rem;
    --event-show-section-pad: 1.5rem;
  }
}

/* ── Toolbar ── */
.event-show__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: max(env(safe-area-inset-top), 14px) 0 10px;
}
.event-show__toolbar-start,
.event-show__toolbar-end {
  display: flex;
  align-items: center;
  gap: 8px;
}
.event-show__toolbar-end { margin-left: auto; }

.event-show__toolbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(55, 53, 47, 0.08);
  cursor: pointer;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  box-shadow: 0 2px 10px rgba(15, 20, 25, 0.06);
  text-decoration: none;
}
.event-show__toolbtn:disabled { opacity: 0.45; cursor: not-allowed; }
.event-show__toolbtn--bookmark.is-active {
  color: var(--event-color);
  background: color-mix(in srgb, var(--event-color) 10%, #fff);
  border-color: color-mix(in srgb, var(--event-color) 24%, transparent);
}
.event-show__toolbtn--bookmark { display: none; }
@media (max-width: 767px) {
  .event-show__toolbtn--bookmark { display: inline-flex; }
}
.dark .event-show__toolbtn {
  background: rgba(40, 40, 40, 0.88);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--ink);
}

/* ── Hero — contained flyer on a blurred backdrop. Image keeps its
   ratio, is never cropped, and is hard-capped at 600px tall. ── */
.event-show__hero {
  margin: 0 -0.35rem;
}
@media (min-width: 768px) {
  .event-show__hero { margin: 0; }
}
.event-show__hero-frame {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: clamp(220px, 42vw, 320px);
  padding: 1rem 0.85rem;
  border-radius: calc(var(--event-show-radius) + 2px);
  background: color-mix(in srgb, var(--event-color) 28%, #cfcfcf);
  box-shadow:
    0 2px 8px rgba(15, 20, 25, 0.06),
    0 28px 72px -24px rgba(15, 20, 25, 0.28);
}
.event-show__hero--theme .event-show__hero-frame {
  min-height: clamp(140px, 28vw, 200px);
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--event-color) 85%, #fff) 0%,
    var(--event-color) 55%,
    color-mix(in srgb, var(--event-color) 70%, #000) 100%
  );
}

.event-show__hero-blur {
  position: absolute;
  inset: -22%;
  background-size: cover;
  background-position: center;
  filter: blur(48px) saturate(1.45) brightness(0.92);
  transform: scale(1.12);
  pointer-events: none;
}
.event-show__hero-blur::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.32) 82%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.14));
}

.event-show__hero-vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 85%, rgba(0, 0, 0, 0.22), transparent 58%);
}

.event-show__hero-media {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  max-height: min(68vh, 640px);
  line-height: 0;
}
.event-show__hero-photo {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(68vh, 640px);
  object-fit: contain;
  object-position: center;
  border-radius: 12px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.22) inset,
    0 16px 48px rgba(0, 0, 0, 0.32),
    0 4px 12px rgba(0, 0, 0, 0.18);
}

.event-show__hero-badge {
  position: absolute;
  z-index: 3;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--event-text-color, #fff);
  background: color-mix(in srgb, var(--event-color) 88%, #000);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
}
.event-show__hero-badge--past {
  background: rgba(24, 24, 27, 0.72);
  color: #f4f4f5;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.event-show__hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #4ade80;
  animation: event-live-pulse 2s ease infinite;
}

@media (min-width: 768px) {
  .event-show__hero-frame { padding: 1.25rem 1.15rem; min-height: clamp(260px, 36vw, 380px); }
  .event-show__hero-photo { border-radius: 14px; }
}
@media (max-width: 480px) {
  .event-show__hero-frame { padding: 0.75rem 0.65rem; }
  .event-show__hero-photo { border-radius: 10px; }
}

/* ── Invitation header ── */
.event-show__invite {
  position: relative;
  z-index: 3;
  margin: 0;
  padding: 0.15rem 0.1rem 0;
}

.event-show__invite-head {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.event-show__invite-top {
  display: none;
}

.event-show__countdown {
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--event-color);
  background: color-mix(in srgb, var(--event-color) 10%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--event-color) 22%, transparent);
}

.event-show__title {
  margin: 0;
  font-size: clamp(1.45rem, 2.8vw, 1.95rem);
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: 1.18;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.event-show__caption {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-muted);
}

.event-show__intro {
  margin: 0.35rem 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-muted);
}
.event-show__intro p:last-child {
  margin-bottom: 0;
}

/* Date / place / host — one 52px lead column so the rows line up */
.event-show__facts {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 1.1rem;
}

.event-show__when,
.event-show__place,
.event-show__host {
  display: grid;
  grid-template-columns: var(--fact-lead) minmax(0, 1fr);
  column-gap: var(--fact-gap);
  align-items: center;
}
.event-show__host {
  grid-template-columns: var(--fact-lead) minmax(0, 1fr) auto;
}

.event-show__cal {
  width: var(--fact-lead);
  min-height: var(--fact-lead);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(55, 53, 47, 0.08);
  box-shadow: 0 1px 2px rgba(15, 20, 25, 0.04), 0 8px 20px -14px rgba(15, 20, 25, 0.2);
}
.event-show__cal-month {
  display: block;
  padding: 5px 0 3px;
  text-align: center;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.1em;
  line-height: 1;
  color: var(--event-text-color, #fff);
  background: var(--event-color);
}
.event-show__cal-day {
  display: block;
  padding: 6px 0 7px;
  text-align: center;
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--ink);
  background: var(--surface);
}
.event-show__when-copy,
.event-show__place-text,
.event-show__host-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.event-show__when-date {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.event-show__when-time {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-muted);
}
.event-show__when-soon {
  margin: 2px 0 0;
  font-size: 12px;
  font-weight: 650;
  color: var(--event-color);
}

.event-show__place-icon {
  width: var(--fact-lead);
  height: var(--fact-lead);
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--event-color);
  background: color-mix(in srgb, var(--event-color) 10%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--event-color) 16%, transparent);
}
.event-show__place-text {
  font-size: 13px;
  line-height: 1.35;
  color: var(--ink-muted);
}
.event-show__place-text strong {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.event-show__place-sub {
  overflow-wrap: anywhere;
}

/* Host — same fact row as date and place, not a separate card */
.event-show__host {
  margin: 0;
  padding: 0;
  max-width: none;
  border-radius: 0;
  text-decoration: none;
  color: inherit;
  background: transparent;
  border: none;
  box-shadow: none;
  transition: color 0.15s ease;
}
.event-show__host:hover {
  transform: none;
  border-color: transparent;
  box-shadow: none;
}
.event-show__host:hover .event-show__host-name { color: var(--event-color); }
.event-show__host:active { transform: none; }
.event-show__host-lead {
  display: grid;
  place-items: center;
  width: var(--fact-lead);
  height: var(--fact-lead);
}
.event-show__host-avatar,
.event-show__host-fallback {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}
.event-show__host-fallback {
  display: grid;
  place-items: center;
  background: var(--event-color);
  color: var(--event-text-color, #fff);
  font-size: 1rem;
  font-weight: 700;
}
.event-show__host-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
}
.event-show__host-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.event-show__host-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.event-show__host-bio {
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--ink-muted);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.event-show__host-go {
  flex-shrink: 0;
  align-self: center;
  color: var(--ink-faint);
}
.dark .event-show__cal {
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}
.dark .event-show__host {
  background: transparent;
  border: none;
  box-shadow: none;
}
.dark .event-show__place-icon {
  background: color-mix(in srgb, var(--event-color) 16%, var(--surface));
}

/* Compact detail chips + actions row */
.event-show__details-row {
  margin-top: 1.35rem;
  padding-top: 0.15rem;
}
@media (min-width: 768px) {
  .event-show__details-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
  }
}

.event-show__chips {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: 36rem;
}
@media (min-width: 640px) {
  .event-show__chips {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.6rem;
  }
}
@media (min-width: 768px) {
  .event-show__details-row .event-show__chips {
    display: none;
  }
}
.event-show__chip {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid rgba(55, 53, 47, 0.07);
  box-shadow: 0 2px 10px -8px rgba(15, 20, 25, 0.12);
}
.event-show__chip--accent {
  background: color-mix(in srgb, var(--event-color) 6%, var(--surface));
  border-color: color-mix(in srgb, var(--event-color) 16%, transparent);
}
.dark .event-show__chip {
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}
.event-show__chip-icon {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  margin-top: 2px;
  color: var(--event-color);
}
.event-show__chip-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  font-size: 12px;
  line-height: 1.35;
  color: var(--ink-muted);
}
.event-show__chip-text strong {
  font-size: 13px;
  font-weight: 650;
  color: var(--ink);
}

/* Action row */
.event-show__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
  max-width: 28rem;
}
@media (min-width: 768px) {
  .event-show__details-row .event-show__actions {
    margin-top: 0;
    margin-left: auto;
    flex-shrink: 0;
    flex-wrap: nowrap;
    max-width: none;
    justify-content: flex-end;
  }
  .event-show__details-row .event-show__actions > .mv-btn--accent {
    flex: 0 1 auto;
    min-width: 130px;
  }
  .event-show__details-row .event-show__actions > .mv-btn--secondary {
    flex: 0 0 auto;
  }
}
@media (max-width: 767px) {
  .event-show__details-row .event-show__actions > .mv-btn--secondary {
    display: none;
  }
}

/* Primary / secondary CTAs → events/cta.css */

/* ── Board: cover | facts+tickets, about under the cover.
   Stacks on small screens. Preview frames override this in preview.css
   because they cannot rely on the browser viewport. ── */
.event-show__board {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.event-show__media,
.event-show__info,
.event-show__story {
  min-width: 0;
}
.event-show__info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.event-show__story {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 960px) {
  .event-show:not(.event-preview-page) .event-show__board {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
    grid-template-areas:
      "media info"
      "story info";
    column-gap: 2rem;
    row-gap: 1.5rem;
    align-items: start;
  }
  .event-show:not(.event-preview-page) .event-show__media { grid-area: media; }
  .event-show:not(.event-preview-page) .event-show__info {
    grid-area: info;
    position: sticky;
    top: 1.25rem;
    align-self: start;
  }
  .event-show:not(.event-preview-page) .event-show__story { grid-area: story; }
  .event-show:not(.event-preview-page) .event-show__title {
    font-size: clamp(1.5rem, 2.2vw, 1.95rem);
  }
  .event-show:not(.event-preview-page) .event-show__invite {
    padding-top: 0;
  }
}

.event-show__main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.event-show__section-block {
  margin-bottom: 0;
  scroll-margin-top: 1.5rem;
  padding: var(--event-show-section-pad);
  border-radius: var(--event-show-card-radius);
  background: var(--surface);
  border: 1px solid rgba(55, 53, 47, 0.07);
  box-shadow: 0 4px 18px -14px rgba(15, 20, 25, 0.12);
}
.dark .event-show__section-block {
  border-color: rgba(255, 255, 255, 0.08);
}
.event-show__section-block:last-child { margin-bottom: 0; }

.event-show__register {
  position: relative;
  scroll-margin-top: 1rem;
}
.event-show__register--pulse {
  animation: event-aside-pulse 0.9s ease;
}
.event-show__aside {
  position: relative;
  scroll-margin-top: 1rem;
}
.event-show__aside--pulse {
  animation: event-aside-pulse 0.9s ease;
}
@keyframes event-aside-pulse {
  0%, 100% { box-shadow: none; }
  40% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--event-color) 30%, transparent); }
}

/* ── Gallery — photos, GIFs and videos (Event#attachments) ──
   A calm grid: square tiles, three across on desktop and tablet, two on a
   phone. Tiles open the full-screen viewer; GIFs move, videos play muted. */
.event-show__gallery {
  margin: 0;
  padding: var(--event-show-section-pad);
  border-radius: var(--event-show-card-radius);
  background: var(--surface);
  border: 1px solid rgba(55, 53, 47, 0.07);
  box-shadow: 0 4px 18px -14px rgba(15, 20, 25, 0.12);
  scroll-margin-top: 1rem;
}
.dark .event-show__gallery { border-color: rgba(255, 255, 255, 0.08); }

.event-show__gallery-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem 0.75rem;
  margin-bottom: 0.9rem;
  padding: 0 0.1rem;
}
.event-show__gallery-heading {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.25rem 0.6rem;
  min-width: 0;
}
.event-show__gallery-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.event-show__gallery-count {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

.event-show__gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (max-width: 479px) {
  .event-show__gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
}
.event-show__gallery-grid--single {
  grid-template-columns: minmax(0, 1fr);
  max-width: 420px;
}
.event-show__gallery-cell {
  position: relative;
  min-width: 0;
}
.event-show__gallery-cell[hidden] { display: none; }

.event-show__gallery-item {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  border: none;
  padding: 0;
  margin: 0;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(55, 53, 47, 0.06);
  cursor: zoom-in;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.15s ease;
}
.event-show__gallery-grid--single .event-show__gallery-item { aspect-ratio: 4 / 3; }
.dark .event-show__gallery-item { background: rgba(255, 255, 255, 0.06); }
.event-show__gallery-item:hover { opacity: 0.92; }
.event-show__gallery-item:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
.event-show__gallery-media {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.event-show__gallery-badge {
  position: absolute;
  left: 6px;
  bottom: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: #fff;
  background: rgba(15, 15, 15, 0.62);
  pointer-events: none;
}
.event-show__gallery-more {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  background: rgba(15, 15, 15, 0.5);
  pointer-events: none;
}

/* Host controls — neutral ink, never the accent colour */
.event-show__gallery-add { margin: 0; }
.event-show__gallery-add-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid rgba(55, 53, 47, 0.16);
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.event-show__gallery-add-btn:hover { background: rgba(55, 53, 47, 0.05); }
.event-show__gallery-add-btn:focus-within {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
.event-show__gallery-add-btn.is-busy { opacity: 0.7; cursor: progress; }
.dark .event-show__gallery-add-btn { border-color: rgba(255, 255, 255, 0.16); }
.dark .event-show__gallery-add-btn:hover { background: rgba(255, 255, 255, 0.06); }
.event-show__gallery-add-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.event-show__gallery-add-error {
  margin: 6px 0 0;
  font-size: 12px;
  color: #b42318;
}
.dark .event-show__gallery-add-error { color: #fda29b; }
.event-show__gallery-empty {
  margin: 0;
  padding: 1.1rem 1rem;
  border: 1px dashed rgba(55, 53, 47, 0.18);
  border-radius: 10px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-muted);
}
.dark .event-show__gallery-empty { border-color: rgba(255, 255, 255, 0.16); }

.event-show__gallery-remove-form {
  position: absolute;
  top: 6px;
  right: 6px;
  margin: 0;
}
.event-show__gallery-remove {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 999px;
  background: rgba(15, 15, 15, 0.62);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease, background 0.15s ease;
}
.event-show__gallery-cell:hover .event-show__gallery-remove,
.event-show__gallery-remove:focus-visible { opacity: 1; }
.event-show__gallery-remove:hover { background: #b42318; }
.event-show__gallery-remove:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
@media (hover: none) {
  .event-show__gallery-remove { opacity: 1; }
}

/* ── Flyer: the cover is a button that opens the viewer ── */
.event-show__hero-open {
  position: relative;
  display: inline-flex;
  max-width: 100%;
  padding: 0;
  margin: 0;
  border: none;
  background: none;
  border-radius: 12px;
  cursor: zoom-in;
  line-height: 0;
}
.event-show__hero-open:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}
.event-show__hero-expand {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  color: #fff;
  background: rgba(15, 15, 15, 0.62);
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
}
.event-show__hero-open:hover .event-show__hero-expand,
.event-show__hero-open:focus-visible .event-show__hero-expand {
  opacity: 1;
  transform: none;
}
@media (hover: none) {
  .event-show__hero-expand { opacity: 0.92; transform: none; }
}

/* ── Story / content sections ── */
.event-show__story-head {
  margin-bottom: 0.85rem;
  padding: 0 0.15rem;
}
.event-show__story-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.event-show__story-lead {
  margin: 0.5rem 0 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-muted);
}

.event-show__section {
  margin-bottom: 0.75rem;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}
.event-show__section:last-child { margin-bottom: 0; }
.event-show__section--flush {
  padding-top: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}
.event-show__section--nested {
  margin-top: 0.75rem;
  padding: 1rem;
  border-radius: 12px;
  background: color-mix(in srgb, var(--event-color) 4%, var(--surface));
  border: 1px solid rgba(55, 53, 47, 0.06);
}
.dark .event-show__section { border-color: transparent; }
.dark .event-show__section--flush { background: transparent; }

.event-show__section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 0.85rem;
}

.event-show__prose { color: var(--ink-muted); }
.event-show__prose p { margin-bottom: 0.85rem; }

.event-show__callout {
  display: flex;
  gap: 0.85rem;
  padding: 0.95rem 1rem;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.45;
}
.event-show__callout strong {
  display: block;
  font-weight: 650;
  margin-bottom: 2px;
  color: var(--ink);
}
.event-show__callout p { margin: 0; color: var(--ink-muted); }
.event-show__callout-icon {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 2px;
}
.event-show__callout--info {
  background: color-mix(in srgb, var(--event-color) 8%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--event-color) 18%, transparent);
  color: var(--event-color);
}
.event-show__callout--warn {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #c2410c;
}

.event-show__meta-list { margin: 0; }
.event-show__meta-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(55, 53, 47, 0.06);
  font-size: 14px;
}
.event-show__meta-row:last-child { border-bottom: none; padding-bottom: 0; }
.event-show__meta-row dt { color: var(--ink-muted); font-weight: 500; margin: 0; }
.event-show__meta-row dd { color: var(--ink); font-weight: 650; margin: 0; text-align: right; }

.event-show__gallery-teaser { text-align: left; }
.event-show__gallery-copy {
  margin: 0 0 0.75rem;
  font-size: 14px;
  color: var(--ink-muted);
}
.event-show__gallery-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 650;
  color: var(--event-color);
  background: color-mix(in srgb, var(--event-color) 8%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--event-color) 22%, transparent);
  text-decoration: none;
  transition: background 0.2s ease;
}
/* hover → events/cta.css */

/* ── Tickets panel (Luma-style: neutral card, divider rows, one primary CTA) ── */
.event-show__tickets-card {
  position: relative;
  z-index: 1;
  background: var(--surface);
  border: 1px solid rgba(55, 53, 47, 0.08);
  border-radius: 18px;
  overflow: hidden;
  box-shadow:
    0 1px 2px rgba(15, 20, 25, 0.04),
    0 12px 40px -12px rgba(15, 20, 25, 0.12);
}
.dark .event-show__tickets-card { border-color: rgba(255, 255, 255, 0.08); }

.event-show__tickets-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.15rem 1rem;
  border-bottom: 1px solid rgba(55, 53, 47, 0.06);
  background: var(--surface);
}
.dark .event-show__tickets-head {
  border-color: rgba(255, 255, 255, 0.06);
}

.event-show__tickets-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.event-show__tickets-sub {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--ink-muted);
}
.event-show__tickets-sub strong { color: var(--event-color); font-weight: 700; }
.event-show__tickets-intro {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-muted);
  max-width: 28rem;
}

.event-show__tickets-status {
  flex-shrink: 0;
  padding: 4px 9px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: var(--ink-muted);
  background: rgba(55, 53, 47, 0.06);
}
.event-show__tickets-status--past {
  color: var(--ink-muted);
  background: rgba(55, 53, 47, 0.06);
}
.dark .event-show__tickets-status {
  background: rgba(255, 255, 255, 0.08);
}

.event-show__tickets-list {
  padding: 0;
}

.event-show__tickets-foot {
  padding: 0.85rem 1.15rem 1.15rem;
  border-top: none;
  background: var(--surface);
}
.dark .event-show__tickets-foot {
  border-color: rgba(255, 255, 255, 0.06);
}
/* .event-show__tickets-primary → events/cta.css */

.event-show__tickets-footnote {
  margin: 8px 0 0;
  text-align: center;
  font-size: 11px;
  color: var(--ink-faint);
}

.event-show__tickets-card--compact .event-show__tickets-head {
  border-bottom: none;
  padding-bottom: 0.5rem;
}
.event-show__tickets-card--compact .event-show__tickets-foot {
  padding-top: 0.35rem;
}
.event-show__tickets-list--compact {
  padding: 0 1.15rem;
}
.event-show__tickets-single-price {
  margin: 0;
  text-align: center;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.dark .event-show__tickets-card {
  background: var(--surface);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.35),
    0 12px 40px -12px rgba(0, 0, 0, 0.55);
}
.dark .event-show__tickets-head {
  background: var(--surface);
  border-color: rgba(255, 255, 255, 0.08);
}
.dark .event-show__tickets-foot {
  background: var(--surface);
}
.dark .event-show__payment-notice {
  background: rgba(120, 53, 15, 0.28);
  border-color: rgba(251, 191, 36, 0.22);
  color: #fde68a;
}
.dark .event-show__payment-notice strong {
  color: #fef3c7;
}
.dark .event-reg-option__mark {
  border-color: rgba(255, 255, 255, 0.22);
  background: var(--surface);
  box-shadow: inset 0 0 0 3px var(--surface);
}
.dark .event-show__hero-frame {
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.35),
    0 28px 72px -24px rgba(0, 0, 0, 0.65);
}
.dark .event-show__callout--warn {
  background: rgba(120, 53, 15, 0.22);
  border-color: rgba(251, 191, 36, 0.2);
  color: #fdba74;
}
.dark .event-show__callout--info {
  background: color-mix(in srgb, var(--event-color) 14%, var(--surface));
  border-color: color-mix(in srgb, var(--event-color) 28%, transparent);
}

.event-show__tickets-empty,
.event-show__expired {
  text-align: center;
  padding: 1.5rem 0.5rem 1.75rem;
}
.event-show__tickets-empty-title,
.event-show__expired-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.event-show__tickets-empty-copy,
.event-show__expired-copy {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-muted);
}
.event-show__expired-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: var(--ink-muted);
  background: var(--surface);
  border: 1px solid rgba(55, 53, 47, 0.08);
  box-shadow: 0 4px 14px -10px rgba(15, 20, 25, 0.2);
}

/* ── Registration options (Luma-style divider list + radio select) ── */
.event-reg-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  margin: 0;
  padding: 0.85rem 1.15rem;
  border: none;
  border-bottom: 1px solid rgba(55, 53, 47, 0.06);
  border-radius: 0;
  text-align: left;
  text-decoration: none;
  color: inherit;
  background: transparent;
  cursor: pointer;
  transition: background 0.15s ease;
  font: inherit;
}
.event-reg-option:last-child { border-bottom: none; margin-bottom: 0; }
/* hover / selected → events/cta.css */
.event-reg-option.is-featured .event-reg-option__name { font-weight: 700; }
.event-reg-option.is-disabled {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}
.dark .event-reg-option { border-color: rgba(255, 255, 255, 0.06); }

.event-reg-option__mark {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid rgba(55, 53, 47, 0.18);
  background: var(--surface);
  box-shadow: inset 0 0 0 3px var(--surface);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.event-reg-option.is-selected .event-reg-option__mark {
  border-color: var(--event-color);
  background: var(--event-color);
}
a.event-reg-option:not(.is-disabled) .event-reg-option__mark {
  border-radius: 8px;
  width: 8px;
  height: 8px;
  border: none;
  background: var(--ink-faint);
  box-shadow: none;
}

.event-reg-option__body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.event-reg-option__tag {
  display: inline-block;
  margin-bottom: 2px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--event-color);
}
.event-reg-option__name {
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.015em;
  color: var(--ink);
  line-height: 1.25;
}
.event-reg-option__desc {
  font-size: 12px;
  line-height: 1.35;
  color: var(--ink-muted);
}
.event-reg-option__meta {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-faint);
  text-align: right;
}
.event-reg-option__status {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-faint);
}
.event-reg-option__status--warn { color: #c2410c; }
.event-reg-option__status--muted { color: var(--ink-faint); font-weight: 500; }

.event-reg-option__aside {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
}
.event-reg-option__price {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: nowrap;
}

.event-show__payment-notice {
  display: flex;
  gap: 0.65rem;
  margin: 0.75rem 1.15rem 0;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.45;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

/* ── Legacy ticket cards (preview / other surfaces) ── */
.event-ticket-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: #fbfbfa;
  border: 1px solid rgba(55, 53, 47, 0.08);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 10px;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s ease, border-color 0.22s ease;
}
.event-ticket-card:last-child { margin-bottom: 0; }
.event-ticket-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--event-color) 30%, transparent);
  box-shadow: 0 10px 28px rgba(15, 20, 25, 0.1);
}
.event-ticket-card.is-featured {
  background: linear-gradient(145deg, color-mix(in srgb, var(--event-color) 6%, #fff) 0%, #fff 55%);
  border-color: color-mix(in srgb, var(--event-color) 28%, transparent);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--event-color) 12%, transparent);
}
.event-ticket-card.is-unavailable {
  opacity: 0.6;
  pointer-events: none;
  box-shadow: none;
}
.dark .event-ticket-card { background: #2a2a2a; }
.dark .event-ticket-card.is-featured {
  background: linear-gradient(145deg, color-mix(in srgb, var(--event-color) 14%, #2a2a2a) 0%, #2a2a2a 55%);
}

.event-ticket-card__ribbon {
  display: inline-block;
  margin-bottom: 8px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--event-color);
  background: color-mix(in srgb, var(--event-color) 12%, #fff);
}

.event-ticket-card__price {
  font-size: 1.35rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--event-color);
  line-height: 1.1;
}
.event-ticket-card__name {
  margin-top: 4px;
  font-size: 15px;
  font-weight: 650;
  color: var(--ink);
  line-height: 1.25;
}
.event-ticket-card__desc {
  margin-top: 4px;
  font-size: 13px;
  color: var(--ink-muted);
  line-height: 1.4;
}
.event-ticket-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.event-ticket-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.event-ticket-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 650;
}
.event-ticket-card__badge--ok {
  background: color-mix(in srgb, var(--event-color) 10%, #fff);
  color: var(--event-color);
  border: 1px solid color-mix(in srgb, var(--event-color) 22%, transparent);
}
.event-ticket-card__badge--warn { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.event-ticket-card__badge--danger { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.event-ticket-card__badge--muted { background: #f4f4f5; color: #52525b; border: 1px solid #e4e4e7; }

/* .event-ticket-card__cta → events/cta.css (.event-show__btn-*) */

/* Map + legacy meta in partials */
.event-show .event-meta-grid .event-meta-item {
  background: var(--surface);
  border: 1px solid rgba(55, 53, 47, 0.08);
  border-radius: 12px;
  min-height: 4.5rem;
  padding: 0.85rem;
}
.event-show .event-meta-icon {
  background: color-mix(in srgb, var(--event-color) 10%, #fff) !important;
  border: 1px solid color-mix(in srgb, var(--event-color) 22%, transparent);
}
.event-show .event-note--info {
  background: color-mix(in srgb, var(--event-color) 10%, #fff);
  border: 1px solid color-mix(in srgb, var(--event-color) 20%, transparent);
  border-radius: 12px;
}
.event-show .event-note--warning {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 12px;
}
.event-show .event-map-frame {
  border-radius: 18px;
  border: 1px solid rgba(15, 20, 25, 0.08);
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.04), 0 14px 36px -22px rgba(15, 23, 42, 0.4);
}
.dark .event-show .event-map-frame {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 40px -16px rgba(0, 0, 0, 0.55);
}

.event-show__payment-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  font-size: 13px;
  color: #92400e;
}
.event-show__payment-notice strong { display: block; font-weight: 650; margin-bottom: 2px; }

/* Share sheet → events/share_sheet.css (+ events/cta.css buttons) */

/* ══════════════════════════════════════════════════════════
   Event media lightbox — full-screen viewer (flyer + gallery)
   The whole image at its own aspect ratio, never cropped, on a
   near-black veil in both themes (photos read best on dark, like
   Notion's and the OS photo viewers). Chrome is quiet ink-on-glass.
   ══════════════════════════════════════════════════════════ */

.event-lb {
  --lb-ink: rgba(255, 255, 255, 0.94);
  --lb-muted: rgba(255, 255, 255, 0.6);
  --lb-btn: rgba(255, 255, 255, 0.1);
  --lb-btn-hover: rgba(255, 255, 255, 0.18);
  --lb-hairline: rgba(255, 255, 255, 0.14);
  --lb-veil: #111111;
  --lb-bar-h: 60px;
  --lb-drag: 0px;

  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  grid-template-rows: var(--lb-bar-h) minmax(0, 1fr);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  color: var(--lb-ink);
  outline: none;
  font-family: 'FixelText', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}
.dark .event-lb { --lb-veil: #0a0a0a; }
.event-lb.is-open { opacity: 1; visibility: visible; }
.event-lb[hidden] { display: none !important; }
.event-lb [hidden] { display: none !important; }

.event-lb__backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--lb-veil);
}

.event-lb__bar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: max(env(safe-area-inset-top), 10px) max(env(safe-area-inset-right), 14px) 10px max(env(safe-area-inset-left), 16px);
}
.event-lb__heading {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}
.event-lb__title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--lb-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.event-lb__count {
  font-size: 12.5px;
  color: var(--lb-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.event-lb__tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.event-lb__zoom {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
}

.event-lb__btn {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  padding: 0 8px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--lb-ink);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease;
}
.event-lb__btn:hover { background: var(--lb-btn-hover); }
.event-lb__btn:disabled { opacity: 0.35; cursor: default; background: transparent; }
.event-lb__btn--level { min-width: 52px; }
.event-lb__close { background: var(--lb-btn); border-radius: 999px; width: 40px; height: 40px; }
.event-lb__btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.event-lb__stage {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
  padding: 8px max(env(safe-area-inset-right), 72px) max(env(safe-area-inset-bottom), 36px) max(env(safe-area-inset-left), 72px);
  touch-action: none;
  cursor: default;
}
.event-lb__media {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  user-select: none;
  -webkit-user-drag: none;
  transform-origin: center center;
  translate: 0 var(--lb-drag);
  transition: transform 0.12s ease-out;
  cursor: zoom-in;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}
.event-lb.is-zoomed .event-lb__media { cursor: grab; transition: none; }
.event-lb.is-zoomed .event-lb__media:active { cursor: grabbing; }
.event-lb__media--video {
  width: min(100%, 1280px);
  max-height: 100%;
  background: #000;
  cursor: default;
}

.event-lb__nav {
  position: absolute;
  z-index: 3;
  top: 50%;
  translate: 0 -50%;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--lb-btn);
}
.event-lb__nav--prev { left: max(env(safe-area-inset-left), 16px); }
.event-lb__nav--next { right: max(env(safe-area-inset-right), 16px); }
.event-lb.is-zoomed .event-lb__nav { opacity: 0.35; }

.event-lb__hint {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: max(env(safe-area-inset-bottom), 10px);
  translate: -50% 0;
  margin: 0;
  font-size: 11.5px;
  color: var(--lb-muted);
  white-space: nowrap;
  pointer-events: none;
}
.event-lb.is-zoomed .event-lb__hint { opacity: 0; }

@media (max-width: 767px) {
  .event-lb { --lb-bar-h: 56px; }
  .event-lb__stage {
    padding: 4px max(env(safe-area-inset-right), 8px) max(env(safe-area-inset-bottom), 28px) max(env(safe-area-inset-left), 8px);
  }
  .event-lb__nav {
    top: auto;
    bottom: max(env(safe-area-inset-bottom), 8px);
    translate: none;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.12);
  }
  .event-lb__hint { display: none; }
  .event-lb__zoom .event-lb__btn--level { display: none; }
}

body.event-lb-open { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .event-lb,
  .event-lb__media,
  .event-lb__btn {
    transition: none !important;
    animation: none !important;
  }
}

/* ── Mobile sticky CTA + host nav ── */
.event-show__mobile-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid rgba(55, 53, 47, 0.08);
  box-shadow: 0 -8px 24px rgba(15, 20, 25, 0.08);
}
@media (max-width: 767px) {
  .event-show__mobile-cta.is-visible { display: block; }
  .event-show__mobile-cta.is-visible.is-hidden { display: none; }
  .event-show__title { font-size: 1.5rem; }
  .event-show__facts { gap: 0.95rem; margin-top: 1rem; }
}
/* mobile CTA button sizing → events/cta.css */

.event-show__host-nav {
  position: fixed;
  bottom: calc(76px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 35;
  display: flex;
  gap: 4px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(55, 53, 47, 0.1);
  box-shadow: 0 12px 28px rgba(15, 20, 25, 0.12);
}
.event-show__host-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  color: var(--ink-muted);
  transition: background 0.2s ease, color 0.2s ease;
}
.event-show__host-nav a:hover { background: rgba(120, 120, 128, 0.12); color: var(--event-color); }

/* ── Decoration + nav collapse ── */
.event-show .event-decoration-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}
.event-show .event-nav-peek {
  position: fixed;
  top: 9px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 140;
  display: none;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 26px;
  border: none;
  cursor: pointer;
  border-radius: 999px;
  color: #3f3f46;
  background: rgba(255, 255, 255, 0.7);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 6px 18px -8px rgba(15, 23, 42, 0.45);
}
html.event-nav-hidden .event-show .event-nav-peek { display: inline-flex; }

/* Hide legacy cinematic layout pieces */
.event-show__stage,
.event-show__sheet,
.event-show__pulse,
.event-show__nav,
.event-show__hero-overlay,
.event-show__dock,
.event-show__topbar,
.event-show__carousel,
.event-show__veil { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  .event-ticket-card,
  .event-show__gallery-item,
  .event-show__aside--pulse { transition: none; animation: none; }
  .event-show__tickets-live-dot { animation: none; }
}

/* ── Polish: 44px tap targets + visible keyboard focus on the event page ── */
.event-show__toolbtn { width: 44px; height: 44px; }
.event-show .event-nav-peek::after { content: ''; position: absolute; inset: -9px 0; } /* 44px hit area, same visual size */
.event-show__toolbtn:focus-visible,
.event-show .event-nav-peek:focus-visible {
  outline: 2px solid hsl(var(--p));
  outline-offset: 2px;
}

/* ── First-class RSVP (Going / Maybe / Can't go) — separate from tickets ── */
.event-rsvp {
  margin: 0.9rem 0 0.25rem;
}
.event-rsvp__chips { display: flex; gap: 8px; flex-wrap: wrap; }
.event-rsvp__form { display: inline-flex; }
.event-rsvp__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 0;
  background: var(--surface, #fff);
  box-shadow: inset 0 0 0 1px rgba(55, 53, 47, 0.18);
  color: var(--ink, #37352f);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 150ms ease-out, box-shadow 150ms ease-out;
}
.event-rsvp__chip svg { width: 16px; height: 16px; }
.event-rsvp__chip:hover { background: rgba(55, 53, 47, 0.06); }
.event-rsvp__chip.is-on {
  background: var(--ink, #37352f);
  box-shadow: inset 0 0 0 1.5px var(--ink, #37352f);
  color: var(--surface, #fff);
}
.event-rsvp__chip--going.is-on {
  background: #2f9d5c;
  box-shadow: inset 0 0 0 1.5px #2f9d5c;
  color: #fff;
}
.event-rsvp__chip:focus-visible { outline: 2px solid var(--ink, #37352f); outline-offset: 2px; }
.dark .event-rsvp__chip { box-shadow: inset 0 0 0 1px rgba(232, 232, 230, 0.25); }
.dark .event-rsvp__chip:hover { background: rgba(232, 232, 230, 0.08); }
.dark .event-rsvp__chip.is-on { background: #e8e8e6; color: #191919; box-shadow: inset 0 0 0 1.5px #e8e8e6; }
.dark .event-rsvp__chip--going.is-on { background: #2f9d5c; color: #fff; box-shadow: inset 0 0 0 1.5px #2f9d5c; }

.event-rsvp__guest-fields { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.event-rsvp__input {
  min-height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(55, 53, 47, 0.22);
  background: var(--surface, #fff);
  color: var(--ink, #37352f);
  font: inherit;
  font-size: 15px;
  flex: 1 1 150px;
}
.dark .event-rsvp__input { border-color: rgba(232, 232, 230, 0.25); }

.event-rsvp__counts {
  margin: 0.6rem 0 0;
  font-size: 13px;
  color: var(--ink-muted, #787774);
  font-variant-numeric: tabular-nums;
}
.event-rsvp__faces { display: flex; margin-top: 0.5rem; }
.event-rsvp__face {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(55, 53, 47, 0.12);
  color: var(--ink, #37352f);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600;
  overflow: hidden;
  border: 2px solid var(--surface, #fff);
  margin-left: -6px;
}
.event-rsvp__face:first-child { margin-left: 0; }
.event-rsvp__face img { width: 100%; height: 100%; object-fit: cover; }

/* ── Guest RSVP confirmation + event-unavailable pages (own tokens: they
      render outside .event-show) ── */
.event-rsvp-confirm, .event-unavailable {
  --page-ink: #37352f;
  --page-muted: #787774;
  --page-surface: #fff;
  min-height: 60dvh;
  display: flex; align-items: center; justify-content: center;
  padding: 2rem 1rem;
  font-family: 'FixelText', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}
.dark .event-rsvp-confirm, .dark .event-unavailable {
  --page-ink: #e8e8e6;
  --page-muted: #9b9a97;
  --page-surface: #1f1f1f;
}
.event-rsvp-confirm__card, .event-unavailable__card {
  max-width: 420px; width: 100%;
  background: var(--page-surface);
  border-radius: 20px;
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: 0 10px 30px rgba(21, 36, 58, 0.08);
}
.event-rsvp-confirm__check, .event-unavailable__icon {
  width: 48px; height: 48px; margin: 0 auto 0.9rem;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(47, 157, 92, 0.12); color: #2f9d5c;
}
.event-unavailable__icon { background: rgba(55, 53, 47, 0.08); color: var(--page-muted); }
.event-rsvp-confirm__check svg, .event-unavailable__icon svg { width: 24px; height: 24px; }
.event-rsvp-confirm__title, .event-unavailable__title {
  font-size: 20px; font-weight: 700; color: var(--page-ink); margin: 0 0 0.3rem;
}
.event-rsvp-confirm__event { font-size: 15px; color: var(--page-ink); margin: 0 0 0.4rem; font-weight: 500; }
.event-rsvp-confirm__hint, .event-unavailable__body { font-size: 14px; color: var(--page-muted); margin: 0 0 1.2rem; }
.event-rsvp-confirm__actions, .event-unavailable__actions {
  display: flex; flex-direction: column; gap: 10px; align-items: center;
}
.event-rsvp-confirm__actions > .mv-btn, .event-unavailable__actions > .mv-btn { width: 100%; }
.event-rsvp-confirm__link { font-size: 14px; color: var(--page-muted); text-decoration: underline; }

/* ─── RSVP card (docs/design/web/web-event-show.png) ─── */
.event-rsvp--card {
  background: var(--surface, #fff);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 1px 2px rgba(0, 25, 53, 0.04), inset 0 0 0 1px rgba(55, 53, 47, 0.09);
  display: flex; flex-direction: column; gap: 12px;
}
.dark .event-rsvp--card { background: #1c1c1e; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); }
.event-rsvp__title { margin: 0; font-size: 17px; line-height: 22px; font-weight: 700; color: var(--ink, #1f1f1f); }
.event-rsvp__sub { margin: 2px 0 0; font-size: 13px; line-height: 18px; color: var(--mute, #787774); }
.event-rsvp--card .event-rsvp__chips { display: grid; grid-template-columns: repeat(3, 1fr); }
.event-rsvp--card .event-rsvp__form, .event-rsvp--card .event-rsvp__form button { width: 100%; justify-content: center; }
.event-rsvp__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.event-rsvp__action {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; border-radius: 12px; background: var(--btn2, #f4f3ef); color: var(--btn2-ink, #37352f);
  font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer;
}
.event-rsvp__action:hover { background: var(--fill-2, #eceae4); text-decoration: none; }
.event-rsvp__action svg { width: 16px; height: 16px; }
.dark .event-rsvp__action { background: #35353c; color: rgba(255, 255, 255, 0.86); }
.event-rsvp__visibility {
  display: flex; align-items: center; gap: 8px; padding-top: 12px;
  border-top: 1px solid rgba(55, 53, 47, 0.08); font-size: 13px;
}
.dark .event-rsvp__visibility { border-top-color: rgba(255, 255, 255, 0.08); }
.event-rsvp__visibility svg { width: 16px; height: 16px; color: var(--ink2, #37352f); flex: none; }
.event-rsvp__vis-label { font-weight: 600; color: var(--ink, #1f1f1f); }
.event-rsvp__vis-meta { margin-left: auto; color: var(--mute, #787774); }
.event-rsvp--card .event-rsvp__counts { margin: 0; }
/* Event show — share sheet (scoped tokens; beats daisyUI .modal-box in dark mode) */

.event-show .event-show-share {
  --share-ink: #37352f;
  --share-muted: #787774;
  --share-surface: #ffffff;
  --share-well: color-mix(in srgb, var(--share-muted) 6%, var(--share-surface));
  --share-line: rgba(55, 53, 47, 0.1);
  --share-grabber: rgba(120, 120, 128, 0.32);
}

html.dark .event-show .event-show-share {
  --share-ink: #e8e8e6;
  --share-muted: #9b9a97;
  --share-surface: #1f1f1f;
  --share-well: rgba(255, 255, 255, 0.05);
  --share-line: rgba(255, 255, 255, 0.1);
  --share-grabber: rgba(255, 255, 255, 0.22);
  color-scheme: dark;
}

.event-show-share.modal {
  align-items: flex-end;
  z-index: 10050;
}

@media (min-width: 640px) {
  .event-show-share.modal {
    align-items: center;
  }
}

.event-show-share .modal-backdrop {
  background: rgba(12, 14, 18, 0.42);
  -webkit-backdrop-filter: blur(6px) saturate(120%);
  backdrop-filter: blur(6px) saturate(120%);
}

html.dark .event-show .event-show-share .modal-backdrop {
  background: rgba(0, 0, 0, 0.62);
}

.event-show .event-show-share .event-show-share__panel {
  width: 100%;
  max-width: 420px;
  max-height: min(90dvh, 640px);
  padding: 0;
  overflow: hidden;
  border-radius: 24px 24px 0 0;
  color: var(--share-ink);
  background-color: var(--share-surface);
  border: 1px solid var(--share-line);
  box-shadow:
    0 1px 2px rgba(15, 20, 25, 0.04),
    0 24px 56px -16px rgba(15, 20, 25, 0.22);
  -webkit-backdrop-filter: saturate(160%) blur(20px);
  backdrop-filter: saturate(160%) blur(20px);
}

@media (min-width: 640px) {
  .event-show .event-show-share .event-show-share__panel {
    border-radius: 20px;
  }
}

html.dark .event-show .event-show-share .event-show-share__panel {
  background-color: var(--share-surface);
  color: var(--share-ink);
  border-color: var(--share-line);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.35),
    0 28px 64px -20px rgba(0, 0, 0, 0.65);
}

.event-show-share .share-sheet {
  padding: 12px 16px calc(20px + env(safe-area-inset-bottom));
}

.event-show-share .share-sheet__grabber {
  display: block;
  width: 36px;
  height: 4px;
  margin: 4px auto 14px;
  border-radius: 999px;
  background: var(--share-grabber);
}

.event-show-share .share-sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.event-show-share .share-sheet__title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--share-ink);
}

.event-show-share .share-sheet__close {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--share-muted);
  background: var(--share-well);
  border: 1px solid var(--share-line);
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.event-show-share .share-sheet__close:hover {
  color: var(--share-ink);
  border-color: color-mix(in srgb, var(--event-color) 22%, var(--share-line));
  background: color-mix(in srgb, var(--event-color) 6%, var(--share-surface));
}

.event-show-share .share-sheet__close:active {
  transform: scale(0.96);
}

html.dark .event-show .event-show-share .share-sheet__close:hover {
  background: color-mix(in srgb, var(--event-color) 12%, var(--share-surface));
  border-color: color-mix(in srgb, var(--event-color) 24%, var(--share-line));
}

.event-show-share .share-sheet__apps {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 14px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.event-show-share .share-sheet__apps::-webkit-scrollbar {
  display: none;
}

.event-show-share .share-app {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--share-muted);
  font-size: 11px;
  font-weight: 600;
  transition: color 0.15s ease;
}

.event-show-share .share-app:hover {
  color: var(--share-ink);
}

.event-show-share .share-app__icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--c1), var(--c2));
  box-shadow: 0 6px 16px rgba(15, 20, 25, 0.14);
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.event-show-share .share-app__icon .share-app__glyph,
.event-show-share .share-app__icon > svg {
  display: block;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}

.event-show-share .share-app__icon--messages {
  border-radius: 14px;
  background: linear-gradient(160deg, #5ef878 0%, #34c759 48%, #2db84e 100%);
  box-shadow:
    0 6px 16px rgba(52, 199, 89, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.event-show-share .share-app__icon--messages .share-app__glyph {
  width: 32px;
  height: 32px;
}

.event-show-share .share-app:hover .share-app__icon {
  transform: translateY(-1px);
}

html.dark .event-show .event-show-share .share-app__icon {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
}

.event-show-share .share-sheet__link {
  display: flex;
  align-items: stretch;
  gap: 8px;
  padding: 6px 6px 6px 12px;
  border-radius: 12px;
  margin-bottom: 12px;
  background: var(--share-well);
  border: 1px solid var(--share-line);
}

.event-show-share .share-sheet__link input {
  flex: 1;
  min-width: 0;
  align-self: center;
  padding: 8px 0;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  color: var(--share-ink);
  outline: none;
}

.event-show-share .share-sheet__link input::selection {
  background: color-mix(in srgb, var(--event-color) 28%, transparent);
}

.event-show-share .share-sheet__link .share-sheet__copy {
  flex: none;
  align-self: center;
}
/* Event section CTAs — one primary/secondary system for show, checkout, share, maps. */

.event-show,
.event-show-share,
.event-checkout {
  --event-cta-radius: 12px;
  --event-cta-height: 48px;
  --event-cta-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --event-cta-primary-shadow:
    0 1px 2px rgba(15, 20, 25, 0.06),
    0 4px 14px color-mix(in srgb, var(--event-color, #4a5568) 34%, transparent);
  --event-cta-secondary-shadow: 0 2px 8px rgba(15, 20, 25, 0.05);
  --event-cta-line: rgba(55, 53, 47, 0.1);
}

html.dark .event-show,
html.dark .event-show .event-show-share,
html.dark .event-checkout,
.dark .event-show,
.dark .event-show-share,
.dark .event-checkout {
  --event-cta-line: rgba(255, 255, 255, 0.1);
  --event-cta-secondary-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
}

/* ── Primary / secondary / text CTAs are the shared .mv-btn system
   (move/buttons.css). The primary is .mv-btn--accent: show.html.erb and
   bookings/new.html.erb set --mv-accent* from the event colour with
   ButtonsHelper#mv_accent_style (AA ink), and the editor preview, whose
   colour changes live, maps the JS-set event colour/ink onto it here. ── */
.event-preview-page {
  --mv-accent: var(--event-color, #37352f);
  --mv-accent-ink: var(--event-text-color, #fff);
}

.event-show__actions > .mv-btn { flex: 1 1 160px; }
.event-show__mobile-cta .mv-btn,
.event-show__tickets-primary { width: 100%; }

.event-show__tickets-primary svg {
  flex-shrink: 0;
  transition: transform 0.18s var(--event-cta-ease);
}

.event-show__tickets-primary:hover svg {
  transform: translateX(2px);
}

/* Bookmarked: the secondary picks up the event colour as a tint. */
.event-show__actions > .mv-btn--secondary.is-active svg { color: var(--event-color); }

/* Inline pill on registration rows (waitlist, etc.): mv-btn--sm + this hook. */
a.event-reg-option .event-show__btn-inline {
  pointer-events: none;
}

/* Toolbar icon buttons — same hover language as secondary */
.event-show__toolbtn {
  transition:
    transform 0.18s var(--event-cta-ease),
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    color 0.18s ease;
}

.event-show__toolbtn:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--event-color) 22%, var(--event-cta-line));
  background: color-mix(in srgb, var(--event-color) 6%, var(--surface));
  box-shadow: var(--event-cta-secondary-shadow);
  color: var(--ink);
}

.event-show__toolbtn:active:not(:disabled) {
  transform: scale(0.96);
}

.dark .event-show__toolbtn {
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border-color: rgba(255, 255, 255, 0.08);
}

.dark .event-show__toolbtn:hover:not(:disabled) {
  background: color-mix(in srgb, var(--event-color) 10%, var(--surface));
  border-color: color-mix(in srgb, var(--event-color) 24%, rgba(255, 255, 255, 0.12));
}

/* Accent pill (gallery teaser) — secondary tint, not a third button style */
.event-show__gallery-link {
  transition:
    transform 0.18s var(--event-cta-ease),
    background 0.18s ease,
    border-color 0.18s ease;
}

.event-show__gallery-link:hover {
  border-color: color-mix(in srgb, var(--event-color) 32%, transparent);
  background: color-mix(in srgb, var(--event-color) 12%, var(--surface));
}

.event-show__gallery-link:active {
  transform: scale(0.98);
}

/* Registration tier rows */
.event-reg-option {
  transition: background 0.15s ease;
}

.event-reg-option:hover:not(.is-disabled) {
  background: color-mix(in srgb, var(--event-color) 5%, var(--surface));
}

.event-reg-option.is-selected {
  background: color-mix(in srgb, var(--event-color) 8%, var(--surface));
}

.dark .event-reg-option:hover:not(.is-disabled) {
  background: color-mix(in srgb, var(--event-color) 10%, var(--surface));
}

.dark .event-reg-option.is-selected {
  background: color-mix(in srgb, var(--event-color) 14%, var(--surface));
}

/* Share sheet done = full-width secondary (.mv-btn--secondary w-full). */

/* Legacy ticket cards (editor previews, older partials) */
.event-ticket-card__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  min-height: 38px;
  padding: 0 1rem;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
  transition:
    transform 0.18s var(--event-cta-ease),
    filter 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease;
}

.event-ticket-card__cta--waitlist {
  color: var(--event-color);
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--event-color) 32%, var(--event-cta-line));
  box-shadow: var(--event-cta-secondary-shadow);
}

.event-ticket-card__cta:not(.event-ticket-card__cta--waitlist) {
  border: none;
  color: var(--event-text-color, #fff);
  background: var(--event-color, #37352f);
  box-shadow: var(--event-cta-primary-shadow);
}

.event-ticket-card:hover .event-ticket-card__cta:not(.event-ticket-card__cta--waitlist) {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

/* Map / address block */
.event-show .event-address-block__directions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.event-show .event-address-block .mv-btn {
  flex: none;
}

.event-show .event-address-block__label {
  margin: 0 0 0.25rem;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.event-show .event-address-block__address {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
}

@media (prefers-reduced-motion: reduce) {
  .event-show__tickets-primary svg,
  .event-show__toolbtn,
  .event-show__gallery-link,
  .event-reg-option {
    transition: none;
  }

  .event-show__toolbtn:active,
  .event-show__gallery-link:active {
    transform: none;
  }
}

.dark .event-show__mobile-cta {
  background: rgba(25, 25, 25, 0.92);
  border-top-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.45);
}
/* Event form live preview — hover popover + device modal.
   The canvas reuses .event-show rules. Layout cannot follow the editor
   viewport, so each frame sets data-preview-layout and is scaled to fit. */

.event-preview-page.event-show {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  pointer-events: none;
  user-select: none;
  background: var(--ground);
}
.event-preview-page .event-show__shell {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2rem;
}
.event-preview-page .event-show__info {
  position: static;
}
.event-preview-page .event-show__toolbar {
  padding-top: 14px;
}
.event-preview-page .mv-btn,
.event-preview-page .event-show__toolbtn,
.event-preview-page .event-show__host {
  pointer-events: none;
  cursor: default;
}
.event-preview-page .event-show__mobile-cta {
  display: none;
  position: static;
  left: auto;
  right: auto;
  width: 100%;
  flex-shrink: 0;
  z-index: 2;
}

/* Forced layouts — independent of the editor viewport. */
.event-preview-page[data-preview-layout="desktop"] .event-show__board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  grid-template-areas:
    "media info"
    "story info";
  column-gap: 2rem;
  row-gap: 1.5rem;
  align-items: start;
}
.event-preview-page[data-preview-layout="desktop"] .event-show__media { grid-area: media; }
.event-preview-page[data-preview-layout="desktop"] .event-show__info {
  grid-area: info;
  position: static;
  align-self: start;
}
.event-preview-page[data-preview-layout="desktop"] .event-show__story { grid-area: story; }
.event-preview-page[data-preview-layout="desktop"] .event-show__title {
  font-size: 1.75rem;
}
.event-preview-page[data-preview-layout="desktop"] .event-show__hero--theme .event-show__hero-frame {
  min-height: 180px;
}
.event-preview-page[data-preview-layout="desktop"] .event-show__invite { padding-top: 0.35rem; }
.event-preview-page[data-preview-layout="desktop"] .event-show__toolbtn--bookmark { display: none; }
.event-preview-page[data-preview-layout="desktop"] .event-show__hero-frame { padding: 1.1rem 1rem; }
.event-preview-page[data-preview-layout="desktop"] .event-show__hero-photo { border-radius: 12px; }
.event-preview-page[data-preview-layout="desktop"] .event-show__shell {
  --event-show-gutter: 1.5rem;
  --event-show-section-pad: 1.5rem;
  max-width: none;
}

.event-preview-page[data-preview-layout="tablet"] .event-show__board {
  display: flex;
  flex-direction: column;
}
.event-preview-page[data-preview-layout="tablet"] .event-show__toolbtn--bookmark { display: none; }
.event-preview-page[data-preview-layout="tablet"] .event-show__hero-frame { padding: 1.1rem 1rem; }
.event-preview-page[data-preview-layout="tablet"] .event-show__shell {
  --event-show-gutter: 1.5rem;
  --event-show-section-pad: 1.5rem;
}

.event-preview-page[data-preview-layout="mobile"] .event-show__board {
  display: flex;
  flex-direction: column;
}
.event-preview-page[data-preview-layout="mobile"] .event-show__toolbtn--bookmark { display: inline-flex; }
.event-preview-page[data-preview-layout="mobile"] .event-show__mobile-cta.is-visible { display: block; }
.event-preview-page[data-preview-layout="mobile"] .event-show__title { font-size: 1.5rem; }
.event-preview-page[data-preview-layout="mobile"] .event-show__hero--theme .event-show__hero-frame {
  min-height: 140px;
}
.event-preview-page[data-preview-layout="tablet"] .event-show__hero--theme .event-show__hero-frame {
  min-height: 160px;
}
.event-preview-page[data-preview-layout="mobile"] .event-show__hero-frame { padding: 0.7rem 0.6rem; }
.event-preview-page[data-preview-layout="mobile"] .event-show__hero-photo { border-radius: 8px; }

.event-preview-empty {
  text-align: center;
  padding: 2rem 1rem;
}
.event-preview-empty p {
  margin: 0;
  font-size: 13px;
  color: var(--ink-muted);
}

/* ── Header trigger ── */
.event-preview-trigger { position: relative; }

/* ── Hover popover (fine pointer only) ── */
.event-preview-popover {
  position: fixed;
  z-index: 240;
  width: 280px;
  height: 440px;
  padding: 8px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  backdrop-filter: saturate(180%) blur(24px);
  border: 1px solid rgba(55, 53, 47, 0.1);
  box-shadow:
    0 18px 50px -16px rgba(15, 20, 25, 0.35),
    0 1px 0 rgba(255, 255, 255, 0.7) inset;
  overflow: hidden;
}
.event-preview-popover[hidden] { display: none !important; }
.event-preview-popover__clip {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 12px;
  background: #f2f2f2;
}
.event-preview-popover__scale {
  width: 390px;
  height: 844px;
  transform-origin: top left;
  transform: scale(calc(264 / 390));
}
.event-preview-popover .event-show__mobile-cta { display: none !important; }
.event-preview-popover .event-preview-page .event-show__shell { overflow: hidden; }
.dark .event-preview-popover {
  background: rgba(28, 28, 32, 0.92);
  border-color: rgba(255, 255, 255, 0.1);
}
.dark .event-preview-popover__clip { background: #191919; }

@media (hover: none), (pointer: coarse) {
  .event-preview-popover { display: none !important; }
}

/* ── Modal ── */
.event-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 260;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding:
    max(env(safe-area-inset-top), 12px)
    max(env(safe-area-inset-right), 12px)
    max(env(safe-area-inset-bottom), 12px)
    max(env(safe-area-inset-left), 12px);
  background: rgba(12, 14, 18, 0.5);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  backdrop-filter: blur(12px) saturate(140%);
}
.event-preview-modal[hidden] { display: none !important; }

.event-preview-modal__panel {
  display: flex;
  flex-direction: column;
  width: min(100%, 1180px);
  height: 100%;
  max-height: 100%;
  min-height: 0;
  border-radius: 22px;
  background: rgba(248, 248, 247, 0.97);
  -webkit-backdrop-filter: saturate(180%) blur(28px);
  backdrop-filter: saturate(180%) blur(28px);
  box-shadow: 0 40px 90px -30px rgba(8, 10, 14, 0.5);
  overflow: hidden;
}
.dark .event-preview-modal__panel {
  background: rgba(22, 22, 24, 0.97);
}

.event-preview-modal__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  flex-shrink: 0;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(55, 53, 47, 0.08);
}
.event-preview-modal__title {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #37352f;
}
.dark .event-preview-modal__title { color: #f4f4f5; }

.event-preview-devices {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  order: 3;
  flex: 1 1 100%;
  padding: 3px;
  border-radius: 12px;
  background: rgba(120, 120, 128, 0.14);
}
.event-preview-devices__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1 1 0;
  min-width: 40px;
  height: 36px;
  padding: 0 10px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #787774;
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.event-preview-devices__btn.is-active {
  background: #fff;
  color: #37352f;
  box-shadow: 0 1px 3px rgba(15, 20, 25, 0.12);
}
.event-preview-devices__btn:focus-visible {
  outline: 2px solid #37352f;
  outline-offset: 2px;
}
.dark .event-preview-devices__btn.is-active {
  background: #2a2a2e;
  color: #f4f4f5;
}
.event-preview-devices__label { display: none; }

.event-preview-modal__close {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border: none;
  border-radius: 999px;
  background: rgba(120, 120, 128, 0.16);
  color: #37352f;
  cursor: pointer;
}
.event-preview-modal__close:hover { background: rgba(120, 120, 128, 0.26); }
.dark .event-preview-modal__close { color: #e4e4e7; }

@media (min-width: 640px) {
  .event-preview-devices {
    order: 0;
    flex: 0 0 auto;
    margin-left: auto;
  }
  .event-preview-devices__btn { flex: 0 0 auto; }
  .event-preview-devices__label { display: inline; }
}

.event-preview-modal__stage {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 12px 20px;
  overflow: hidden;
}

/* Device frames — JS sets --preview-w / --preview-h / --preview-scale.
   The outer box is the scaled size; the inner page is the logical device. */
.event-preview-device {
  position: relative;
  flex-shrink: 0;
  width: calc(var(--preview-w, 1100px) * var(--preview-scale, 1));
  height: calc(var(--preview-h, 720px) * var(--preview-scale, 1));
  overflow: hidden;
  background: #1c1c1e;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}
.event-preview-device__inner {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  width: var(--preview-w, 1100px);
  height: var(--preview-h, 720px);
  transform: scale(var(--preview-scale, 1));
  transform-origin: top left;
  background: #1c1c1e;
}
.event-preview-device__screen {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  background: #f2f2f2;
}
.dark .event-preview-device__screen { background: #191919; }

.event-preview-device[data-device="desktop"] {
  border-radius: 14px;
}
.event-preview-device[data-device="desktop"] .event-preview-device__inner {
  border-radius: 14px;
}
.event-preview-device[data-device="desktop"] .event-preview-device__chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  flex-shrink: 0;
  padding: 0 14px;
  background: #2c2c2e;
}
.event-preview-device__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #3a3a3c;
}
.event-preview-device__dot:nth-child(1) { background: #ff5f57; }
.event-preview-device__dot:nth-child(2) { background: #febc2e; }
.event-preview-device__dot:nth-child(3) { background: #28c840; }
.event-preview-device__island { display: none; }
.event-preview-device[data-device="desktop"] .event-preview-device__screen {
  border-radius: 0 0 14px 14px;
}

.event-preview-device[data-device="tablet"] {
  border-radius: 22px;
  background: #1c1c1e;
}
.event-preview-device[data-device="tablet"] .event-preview-device__inner {
  padding: 14px;
  border-radius: 22px;
  box-sizing: border-box;
}
.event-preview-device[data-device="tablet"] .event-preview-device__chrome { display: none; }
.event-preview-device[data-device="tablet"] .event-preview-device__screen {
  border-radius: 12px;
}

.event-preview-device[data-device="mobile"] {
  border-radius: 36px;
}
.event-preview-device[data-device="mobile"] .event-preview-device__inner {
  padding: 12px 10px 14px;
  border-radius: 36px;
  box-sizing: border-box;
}
.event-preview-device[data-device="mobile"] .event-preview-device__chrome {
  display: flex;
  justify-content: center;
  flex-shrink: 0;
  padding-bottom: 8px;
}
.event-preview-device[data-device="mobile"] .event-preview-device__dot { display: none; }
.event-preview-device[data-device="mobile"] .event-preview-device__island { display: block; }
.event-preview-device__island {
  width: 92px;
  height: 22px;
  border-radius: 999px;
  background: #000;
}
.event-preview-device[data-device="mobile"] .event-preview-device__screen {
  border-radius: 24px;
}

.event-preview-device__home { display: none; }
.event-preview-device[data-device="mobile"] .event-preview-device__home {
  display: block;
  width: 108px;
  height: 4px;
  margin: 10px auto 0;
  flex-shrink: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
}

@media (max-width: 639px) {
  .event-preview-modal {
    padding: 0;
  }
  .event-preview-modal__panel {
    border-radius: 0;
    width: 100%;
    height: 100%;
  }
  .event-preview-modal__head {
    padding:
      max(env(safe-area-inset-top), 10px)
      12px
      10px;
  }
  .event-preview-modal__stage {
    padding: 8px 8px max(env(safe-area-inset-bottom), 12px);
    align-items: stretch;
    justify-content: center;
  }
  .event-preview-device[data-device="mobile"].is-flush {
    width: 100% !important;
    height: 100% !important;
    max-width: none;
    max-height: none;
    border-radius: 0;
    background: #111;
    box-shadow: none;
    --preview-scale: 1 !important;
    --preview-w: 100% !important;
    --preview-h: 100% !important;
  }
  .event-preview-device[data-device="mobile"].is-flush .event-preview-device__inner {
    position: relative;
    width: 100%;
    height: 100%;
    padding: 0;
    border-radius: 0;
    transform: none;
  }
  .event-preview-device[data-device="mobile"].is-flush .event-preview-device__chrome,
  .event-preview-device[data-device="mobile"].is-flush .event-preview-device__home {
    display: none;
  }
  .event-preview-device[data-device="mobile"].is-flush .event-preview-device__screen {
    border-radius: 0;
  }
}

body.event-preview-open { overflow: hidden; }
/* Public event registration / booking form — aligned with events/show tokens. */

.event-checkout {
  --ink: #37352f;
  --ink-muted: #787774;
  --ink-faint: #9b9a97;
  --line: rgba(55, 53, 47, 0.1);
  --line-soft: rgba(55, 53, 47, 0.06);
  --surface: #fff;
  --surface-muted: #f7f6f3;
  --surface-raised: #fbfbfa;
  --radius-card: 18px;
  --radius-control: 12px;
  --checkout-max: 540px;
  font-family: 'FixelText', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  color: var(--ink);
}

.dark .event-checkout {
  --ink: #e8e8e6;
  --ink-muted: #9b9a97;
  --ink-faint: #75746f;
  --line: rgba(255, 255, 255, 0.1);
  --line-soft: rgba(255, 255, 255, 0.06);
  --surface: #1f1f1f;
  --surface-muted: #232326;
  --surface-raised: #1c1c1e;
}

.event-checkout.app-page,
.event-checkout.app-page--full {
  max-width: none;
  padding: 1.25rem 1rem 2.5rem;
  background: var(--surface-muted);
}

@media (min-width: 640px) {
  .event-checkout.app-page,
  .event-checkout.app-page--full {
    padding: 2rem 1.5rem 3rem;
  }
}

html.dark .event-checkout.app-page,
html.dark .event-checkout.app-page--full {
  background: var(--d-canvas, #191919);
}

.event-checkout.app-page--clears-navbar {
  padding-top: 6rem;
}

.event-checkout__shell {
  max-width: var(--checkout-max);
  margin: 0 auto;
}

.event-checkout__back {
  margin-bottom: 1.25rem;
}

.event-checkout__back svg {
  flex-shrink: 0;
}

.event-checkout__footer-back .event-checkout__back {
  margin-bottom: 0;
}

/* Event summary */
.event-checkout__summary {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.event-checkout__cover {
  flex-shrink: 0;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--line-soft);
}

@media (min-width: 640px) {
  .event-checkout__cover {
    width: 3.5rem;
    height: 3.5rem;
  }
}

.event-checkout__summary-body {
  min-width: 0;
  flex: 1;
}

.event-checkout__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.event-checkout__title a {
  color: inherit;
  text-decoration: none;
}

.event-checkout__title a:hover {
  color: var(--event-color);
}

.event-checkout__meta {
  margin-top: 0.35rem;
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink-muted);
}

.event-checkout__meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
}

.event-checkout__meta-dot {
  display: none;
  color: var(--line);
}

@media (min-width: 640px) {
  .event-checkout__meta-row {
    align-items: center;
  }
  .event-checkout__meta-dot {
    display: inline;
  }
}

.event-checkout__host {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
  font-size: 12px;
  color: var(--ink-muted);
}

.event-checkout__host a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.event-checkout__host a:hover {
  color: var(--event-color);
}

/* Selected ticket row */
.event-checkout__ticket-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  border-radius: var(--radius-control);
  border: 1px solid var(--line-soft);
  background: var(--surface);
}

.event-checkout__ticket-name {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.event-checkout__ticket-name span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-checkout__ticket-price {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

/* Callouts */
.event-checkout__callout {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.75rem 0.85rem;
  margin-bottom: 0.85rem;
  border-radius: var(--radius-control);
  font-size: 12px;
  line-height: 1.45;
  border: 1px solid transparent;
}

.event-checkout__callout-title {
  font-weight: 650;
  margin: 0 0 2px;
}

.event-checkout__callout p {
  margin: 0;
}

.event-checkout__callout--amber {
  color: #92400e;
  background: rgba(255, 247, 237, 0.9);
  border-color: rgba(251, 191, 36, 0.35);
}

.event-checkout__callout--green {
  color: #166534;
  background: rgba(240, 253, 244, 0.95);
  border-color: rgba(34, 197, 94, 0.25);
}

.dark .event-checkout__callout--amber {
  color: #fcd9a8;
  background: rgba(120, 53, 15, 0.28);
  border-color: rgba(251, 191, 36, 0.2);
}

.dark .event-checkout__callout--green {
  color: #bbf7d0;
  background: rgba(20, 83, 45, 0.28);
  border-color: rgba(34, 197, 94, 0.18);
}

.event-checkout__terms {
  margin-bottom: 1rem;
  font-size: 11px;
  line-height: 1.5;
  color: var(--ink-faint);
}

.event-checkout__terms strong {
  color: var(--ink-muted);
  font-weight: 600;
}

/* Form card */
.event-checkout__card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow:
    0 1px 2px rgba(15, 20, 25, 0.04),
    0 12px 40px -12px rgba(15, 20, 25, 0.1);
}

.dark .event-checkout__card {
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 40px -12px rgba(0, 0, 0, 0.35);
}

.event-checkout__card-head {
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface);
}

.event-checkout__card-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.event-checkout__card-sub {
  margin: 4px 0 0;
  font-size: 11px;
  color: var(--ink-faint);
}

.event-checkout__card-body {
  padding: 1.15rem;
}

.event-checkout__fields {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.event-checkout__field label,
.event-checkout__label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
}

.event-checkout__label-hint {
  font-weight: 450;
  color: var(--ink-faint);
}

.event-checkout__hint {
  margin: 0 0 0.5rem;
  font-size: 11px;
  line-height: 1.45;
  color: var(--ink-faint);
}

.event-checkout__input,
.event-checkout__select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
  font-size: 14px;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.event-checkout__input::placeholder {
  color: var(--ink-faint);
}

.event-checkout__input:focus,
.event-checkout__select:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--event-color) 45%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--event-color) 18%, transparent);
}

.event-checkout__input--qty {
  width: 5rem;
  text-align: center;
}

.event-checkout__input-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.event-checkout__input-row .event-checkout__input {
  flex: 1;
}

.event-checkout__phone-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 0.5rem;
}

.event-checkout__sublabel {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 11px;
  color: var(--ink-faint);
}

.event-checkout__status {
  margin-top: 0.35rem;
  font-size: 11px;
}

.event-checkout__status--ok {
  color: #16a34a;
}

.event-checkout__status--bad {
  color: #dc2626;
}

.dark .event-checkout__status--ok {
  color: #86efac;
}

.dark .event-checkout__status--bad {
  color: #fca5a5;
}

.event-checkout__alert {
  padding: 0.75rem 0.85rem;
  margin-bottom: 1rem;
  border-radius: var(--radius-control);
  border: 1px solid rgba(239, 68, 68, 0.25);
  background: rgba(254, 242, 242, 0.95);
  font-size: 12px;
  color: #991b1b;
}

.dark .event-checkout__alert {
  background: rgba(127, 29, 29, 0.25);
  border-color: rgba(248, 113, 113, 0.25);
  color: #fecaca;
}

.event-checkout__alert ul {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
}

.event-checkout__docs {
  padding: 1rem;
  border-radius: var(--radius-control);
  border: 1px solid rgba(251, 191, 36, 0.35);
  background: rgba(255, 251, 235, 0.5);
}

.dark .event-checkout__docs {
  background: rgba(120, 53, 15, 0.2);
  border-color: rgba(251, 191, 36, 0.2);
}

.event-checkout__docs-title {
  margin: 0 0 0.75rem;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}

.event-checkout__file {
  width: 100%;
  max-width: 100%;
  font-size: 12px;
  color: var(--ink-muted);
}

.event-checkout__file::file-selector-button {
  margin-right: 0.75rem;
  padding: 0.4rem 0.75rem;
  border: none;
  border-radius: 10px;
  background: var(--surface-muted);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}

.event-checkout__recaptcha {
  display: flex;
  justify-content: center;
  padding: 0.5rem 0;
}

.event-checkout__submit-wrap {
  padding-top: 0.25rem;
}

.event-checkout__submit-note {
  margin: 0 0 0.5rem;
  text-align: center;
  font-size: 11px;
  color: var(--ink-faint);
}

.event-checkout__submit-note--ok {
  color: #16a34a;
  font-weight: 600;
}

.dark .event-checkout__submit-note--ok {
  color: #86efac;
}

/* Primary / secondary buttons → events/cta.css (.event-show__btn-*) */

.event-checkout__footer-back {
  margin-top: 1.25rem;
  text-align: center;
}

/* Price range (donation tiers) */
.event-checkout__price-range {
  margin-bottom: 0.5rem;
}

.event-checkout__price-suggested {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.event-checkout__price-chip {
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  font-size: 13px;
  font-weight: 650;
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(15, 20, 25, 0.05);
  transition:
    transform 0.18s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.18s ease,
    background 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease;
}

.event-checkout__price-chip:hover,
.event-checkout__price-chip.is-active {
  border-color: color-mix(in srgb, var(--event-color) 32%, var(--line));
  background: color-mix(in srgb, var(--event-color) 8%, var(--surface));
  color: var(--event-color);
  transform: translateY(-1px);
}

.event-checkout__price-chip:active {
  transform: translateY(0) scale(0.98);
}

.dark .event-checkout__price-chip {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
}

.event-checkout__price-display {
  font-size: 15px;
  font-weight: 700;
  color: var(--event-color);
}

.event-checkout__range-track {
  position: relative;
  height: 6px;
  margin: 0.5rem 0;
  border-radius: 999px;
  background: var(--line-soft);
}

.event-checkout__range-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  border-radius: 999px;
  background: var(--event-color);
}

.event-checkout__range-input {
  width: 100%;
  margin-top: 0.35rem;
  accent-color: var(--event-color);
}

.event-checkout__price-labels {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.25rem;
  font-size: 11px;
  color: var(--ink-faint);
}

.event-checkout__coupon-divider {
  padding-bottom: 1rem;
  margin-bottom: 0.25rem;
  border-bottom: 1px solid var(--line-soft);
}
