/* Fline v963 Unified Premium Design System
   Semantic tokens and shared component contracts. This file is loaded last so
   legacy screens converge on one visual language without changing behavior. */
:root {
  color-scheme: light;
  --fl-color-canvas: #fffaf4;
  --fl-color-surface: #fffefa;
  --fl-color-surface-raised: #ffffff;
  --fl-color-surface-muted: #f8f2e9;
  --fl-color-text: #101827;
  --fl-color-text-muted: #667085;
  --fl-color-border: #eadbca;
  --fl-color-border-strong: #d7b45a;
  --fl-color-accent: #c65f14;
  --fl-color-accent-soft: #fff0d9;
  --fl-color-gold: #d4af37;
  --fl-color-success: #168453;
  --fl-color-warning: #a75b08;
  --fl-color-danger: #bd2c2c;
  --fl-font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --fl-font-size-xs: .6875rem;
  --fl-font-size-sm: .8125rem;
  --fl-font-size-md: 1rem;
  --fl-font-size-lg: 1.125rem;
  --fl-font-size-xl: 1.375rem;
  --fl-font-weight-medium: 650;
  --fl-font-weight-strong: 850;
  --fl-space-1: .25rem;
  --fl-space-2: .5rem;
  --fl-space-3: .75rem;
  --fl-space-4: 1rem;
  --fl-space-5: 1.5rem;
  --fl-radius-sm: .75rem;
  --fl-radius-md: 1rem;
  --fl-radius-lg: 1.5rem;
  --fl-radius-pill: 999px;
  --fl-touch-min: 44px;
  --fl-control-height: 48px;
  --fl-shadow-sm: 0 4px 14px rgba(68, 36, 16, .07);
  --fl-shadow-md: 0 14px 38px rgba(48, 29, 17, .14);
  --fl-shadow-lg: 0 26px 80px rgba(7, 17, 31, .28);
  --fl-motion-fast: 120ms;
  --fl-motion-normal: 180ms;
  --fl-ease: cubic-bezier(.2, .8, .2, 1);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --fl-color-canvas: #070d18;
  --fl-color-surface: #0c1524;
  --fl-color-surface-raised: #111c2e;
  --fl-color-surface-muted: #172235;
  --fl-color-text: #f7f9fc;
  --fl-color-text-muted: #b6c1d2;
  --fl-color-border: rgba(255, 255, 255, .14);
  --fl-color-border-strong: rgba(212, 175, 55, .55);
  --fl-color-accent: #f5b642;
  --fl-color-accent-soft: #342510;
  --fl-color-gold: #f2c85b;
  --fl-color-success: #3ddc97;
  --fl-color-warning: #f5b642;
  --fl-color-danger: #ff7878;
  --fl-shadow-sm: 0 5px 18px rgba(0, 0, 0, .24);
  --fl-shadow-md: 0 16px 44px rgba(0, 0, 0, .42);
  --fl-shadow-lg: 0 28px 90px rgba(0, 0, 0, .66);
}

html, body, button, input, textarea, select { font-family: var(--fl-font-family); }
body { color: var(--fl-color-text); }
button, [role="button"], input, textarea, select { -webkit-tap-highlight-color: transparent; }
button:not(.text-action), [role="button"] { min-height: var(--fl-touch-min); }
button { touch-action: manipulation; }

/* Shared surface language. */
.fl-card,
#app-screen .soft-card,
#app-screen .contact,
#app-screen .dashboard-card {
  border-color: var(--fl-color-border) !important;
  border-radius: var(--fl-radius-md) !important;
  background: var(--fl-color-surface) !important;
  color: var(--fl-color-text) !important;
  box-shadow: var(--fl-shadow-sm) !important;
}

/* Direct and group conversations use one header contract. */
.fl-header,
#messages-view > .chat-heading,
#community-chat-modal .community-chat-head {
  display: grid !important;
  align-items: center !important;
  gap: var(--fl-space-3) !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 64px !important;
  margin: 0 !important;
  padding: 9px 12px !important;
  box-sizing: border-box !important;
  border-bottom: 1px solid var(--fl-color-border) !important;
  background: color-mix(in srgb, var(--fl-color-surface) 94%, transparent) !important;
  color: var(--fl-color-text) !important;
  box-shadow: 0 8px 26px rgba(28, 24, 20, .05) !important;
  backdrop-filter: blur(20px) saturate(1.15);
  -webkit-backdrop-filter: blur(20px) saturate(1.15);
}
#messages-view > .chat-heading { grid-template-columns: 44px minmax(0, 1fr) 44px !important; }
body.chat-open #messages-view > .chat-heading { padding-inline-start: 68px !important; }
#community-chat-modal .community-chat-head { grid-template-columns: 44px 44px minmax(0, 1fr) 44px !important; }
.fl-header .contact-avatar,
#community-chat-modal .community-chat-avatar {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  border-radius: 50% !important;
  box-shadow: var(--fl-shadow-sm) !important;
}
.fl-header .chat-identity { min-width: 0 !important; overflow: hidden !important; text-align: start !important; }
.fl-header .chat-identity h2 {
  margin: 0 !important;
  overflow: hidden !important;
  color: var(--fl-color-text) !important;
  font-size: var(--fl-font-size-lg) !important;
  font-weight: var(--fl-font-weight-strong) !important;
  line-height: 1.15 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
.fl-header .chat-identity span { color: var(--fl-color-text-muted) !important; font-size: var(--fl-font-size-xs) !important; font-weight: 760 !important; }
.fl-header .overflow-button,
.fl-header .community-chat-back,
.fl-header .community-chat-head-actions > button {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  padding: 0 !important;
  border: 1px solid var(--fl-color-border) !important;
  border-radius: 50% !important;
  background: var(--fl-color-surface-raised) !important;
  color: var(--fl-color-text) !important;
  box-shadow: var(--fl-shadow-sm) !important;
}

/* Compact contextual menus: actions stay readable without covering the chat. */
.fl-menu,
.premium-menu {
  box-sizing: border-box !important;
  width: min(292px, calc(100vw - 28px)) !important;
  max-width: calc(100vw - 28px) !important;
  max-height: min(620px, calc(100dvh - 86px)) !important;
  padding: 8px !important;
  gap: 5px !important;
  overflow: auto !important;
  overscroll-behavior: contain;
  border: 1px solid var(--fl-color-border-strong) !important;
  border-radius: var(--fl-radius-lg) !important;
  background: color-mix(in srgb, #07111f 97%, transparent) !important;
  box-shadow: var(--fl-shadow-lg) !important;
}
.fl-menu button, .premium-menu button,
.fl-menu select, .premium-menu select {
  min-height: 44px !important;
  padding: 9px 11px !important;
  border-radius: var(--fl-radius-sm) !important;
  font-size: .8rem !important;
  font-weight: 760 !important;
  line-height: 1.25 !important;
}
#community-chat-menu { grid-template-columns: 1fr !important; }
#community-chat-menu > button { min-height: 44px !important; font-size: .8rem !important; }
#community-chat-menu > .community-chat-menu-call { grid-column: auto !important; min-height: 44px !important; }

/* One composer contract for text, file picker, voice and send. */
.fl-composer,
.message-form,
.community-chat-form {
  display: grid !important;
  grid-template-columns: 44px minmax(0, 1fr) 44px !important;
  align-items: center !important;
  gap: 8px !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 9px 12px max(10px, env(safe-area-inset-bottom)) !important;
  box-sizing: border-box !important;
  border-top: 1px solid var(--fl-color-border) !important;
  background: color-mix(in srgb, var(--fl-color-surface) 94%, transparent) !important;
  backdrop-filter: blur(20px) saturate(1.15);
  -webkit-backdrop-filter: blur(20px) saturate(1.15);
}
.fl-composer .composer-input-shell,
.fl-composer .community-composer-shell {
  width: 100% !important;
  min-width: 0 !important;
  min-height: var(--fl-control-height) !important;
  padding: 4px 13px !important;
  box-sizing: border-box !important;
  border: 1px solid var(--fl-color-border) !important;
  border-radius: var(--fl-radius-pill) !important;
  background: var(--fl-color-surface-raised) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.65) !important;
}
.fl-composer textarea { width: 100% !important; min-width: 0 !important; color: var(--fl-color-text) !important; font-size: 1rem !important; }
.fl-composer .composer-icon-button,
.fl-composer .community-composer-attach,
.fl-composer .community-send-button,
.fl-composer .composer-send-button {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  padding: 0 !important;
  border-radius: 50% !important;
}

/* Dialogs and navigation use restrained size, spacing and elevation. */
.fl-dialog,
.modal-card {
  max-width: min(520px, calc(100vw - 28px));
  max-height: min(88dvh, 760px);
  overflow: auto;
  border: 1px solid var(--fl-color-border-strong) !important;
  border-radius: var(--fl-radius-lg) !important;
  background: var(--fl-color-surface) !important;
  color: var(--fl-color-text) !important;
  box-shadow: var(--fl-shadow-lg) !important;
}
.fl-dialog h2, .modal-card h2 { font-size: var(--fl-font-size-xl) !important; line-height: 1.2 !important; }
.fl-nav, .bottom-nav {
  gap: 4px !important;
  padding: 5px !important;
  border: 1px solid var(--fl-color-border) !important;
  border-radius: var(--fl-radius-lg) !important;
  background: color-mix(in srgb, var(--fl-color-surface) 92%, transparent) !important;
  box-shadow: var(--fl-shadow-md) !important;
}
.fl-nav button, .bottom-nav button { min-height: 52px !important; border-radius: 19px !important; }

/* Premium interaction: quiet movement, visible keyboard focus, no copy highlight. */
button, .fl-card, .premium-menu button {
  transition: transform var(--fl-motion-fast) var(--fl-ease), background-color var(--fl-motion-normal) var(--fl-ease), border-color var(--fl-motion-normal) var(--fl-ease), box-shadow var(--fl-motion-normal) var(--fl-ease);
}
button:active { transform: scale(.96); }
:where(button, a, input, textarea, select, [tabindex]):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--fl-color-accent) 42%, transparent) !important;
  outline-offset: 2px !important;
}
button, .bottom-nav, .chat-heading, .premium-menu { -webkit-user-select: none; user-select: none; }
input, textarea, .message-text { -webkit-user-select: text; user-select: text; }

html[dir="rtl"] .fl-header,
html[dir="rtl"] .fl-composer,
html[dir="rtl"] .fl-menu { direction: rtl; }
html[dir="rtl"] .fl-header .chat-identity { text-align: right !important; }

@media (max-width: 520px) {
  .fl-header, #messages-view > .chat-heading, #community-chat-modal .community-chat-head { gap: 8px !important; padding-inline: 10px !important; }
  .fl-menu, .premium-menu { width: min(286px, calc(100vw - 20px)) !important; max-width: calc(100vw - 20px) !important; }
  .fl-composer, .message-form, .community-chat-form { gap: 7px !important; padding-inline: 9px !important; }
  .fl-dialog:not(.community-chat-card), .modal-card:not(.community-chat-card) { max-width: calc(100vw - 20px); }
}

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

@media (forced-colors: active) {
  button, input, textarea, select, .fl-card, .fl-header, .fl-menu, .fl-dialog { border: 1px solid CanvasText !important; }
  :where(button, a, input, textarea, select, [tabindex]):focus-visible { outline: 3px solid Highlight !important; }
}

/* v978 Luxury Theme Atelier: palette is independent from brightness so every
   colour world remains readable in both light and dark mode. */
:root {
  --fl-theme-canvas-glow: rgba(214, 164, 74, .20);
  --fl-theme-canvas-glow-2: rgba(198, 95, 20, .10);
  --fl-theme-hero: linear-gradient(145deg, #fffdf9 0%, #fff0d9 58%, #f7d79d 100%);
  --fl-theme-nav-active: linear-gradient(145deg, #d56a19, #f5a623);
  --fl-theme-message-own: #ffe0ad;
  --fl-theme-selection: rgba(198, 95, 20, .13);
}
html[data-luxury-theme="obsidian"] {
  --fl-color-canvas:#f8f5ee;--fl-color-surface:#fffdfa;--fl-color-surface-raised:#fff;--fl-color-surface-muted:#eee9df;
  --fl-color-text:#141414;--fl-color-text-muted:#6f685d;--fl-color-border:#d9cfbd;--fl-color-border-strong:#ad8c42;
  --fl-color-accent:#806018;--fl-color-accent-soft:#f5ead0;--fl-color-gold:#b9943c;
  --fl-theme-canvas-glow:rgba(20,20,20,.13);--fl-theme-canvas-glow-2:rgba(185,148,60,.16);
  --fl-theme-hero:linear-gradient(145deg,#fffefa 0%,#ece5d7 54%,#c9ae70 100%);--fl-theme-nav-active:linear-gradient(145deg,#171717,#4b4028);--fl-theme-message-own:#e9d7ae;--fl-theme-selection:rgba(20,20,20,.1);
}
html[data-luxury-theme="sapphire"] {
  --fl-color-canvas:#f4f7ff;--fl-color-surface:#fbfcff;--fl-color-surface-raised:#fff;--fl-color-surface-muted:#eaf0ff;
  --fl-color-text:#101a35;--fl-color-text-muted:#5e6c89;--fl-color-border:#cfdaee;--fl-color-border-strong:#6688d8;
  --fl-color-accent:#315bd6;--fl-color-accent-soft:#e6edff;--fl-color-gold:#d0a94f;
  --fl-theme-canvas-glow:rgba(49,91,214,.19);--fl-theme-canvas-glow-2:rgba(79,153,255,.11);
  --fl-theme-hero:linear-gradient(145deg,#fcfdff 0%,#e4ecff 54%,#adc4f8 100%);--fl-theme-nav-active:linear-gradient(145deg,#193d9e,#4778ed);--fl-theme-message-own:#dbe6ff;--fl-theme-selection:rgba(49,91,214,.12);
}
html[data-luxury-theme="emerald"] {
  --fl-color-canvas:#f4faf7;--fl-color-surface:#fbfefc;--fl-color-surface-raised:#fff;--fl-color-surface-muted:#e6f3ed;
  --fl-color-text:#10271f;--fl-color-text-muted:#587267;--fl-color-border:#c9dfd5;--fl-color-border-strong:#4b9c7c;
  --fl-color-accent:#087f5b;--fl-color-accent-soft:#dff5eb;--fl-color-gold:#c7a94d;
  --fl-theme-canvas-glow:rgba(8,127,91,.18);--fl-theme-canvas-glow-2:rgba(83,194,149,.11);
  --fl-theme-hero:linear-gradient(145deg,#fcfffd 0%,#dcf3e8 56%,#9dd8bf 100%);--fl-theme-nav-active:linear-gradient(145deg,#075f47,#16a276);--fl-theme-message-own:#d5f0e4;--fl-theme-selection:rgba(8,127,91,.12);
}
html[data-luxury-theme="rose-noire"] {
  --fl-color-canvas:#fff7fa;--fl-color-surface:#fffafd;--fl-color-surface-raised:#fff;--fl-color-surface-muted:#f8e9ef;
  --fl-color-text:#301824;--fl-color-text-muted:#7d6370;--fl-color-border:#ead0dc;--fl-color-border-strong:#bb7891;
  --fl-color-accent:#a4476a;--fl-color-accent-soft:#fae4ec;--fl-color-gold:#c59a68;
  --fl-theme-canvas-glow:rgba(164,71,106,.17);--fl-theme-canvas-glow-2:rgba(211,135,157,.12);
  --fl-theme-hero:linear-gradient(145deg,#fffdfd 0%,#f9e1e9 55%,#e3adbd 100%);--fl-theme-nav-active:linear-gradient(145deg,#7e3151,#c45d7f);--fl-theme-message-own:#f4d6e1;--fl-theme-selection:rgba(164,71,106,.12);
}
html[data-luxury-theme="amethyst"] {
  --fl-color-canvas:#faf7ff;--fl-color-surface:#fdfbff;--fl-color-surface-raised:#fff;--fl-color-surface-muted:#eee8fa;
  --fl-color-text:#24193a;--fl-color-text-muted:#706481;--fl-color-border:#ded2ee;--fl-color-border-strong:#9679c7;
  --fl-color-accent:#7651c9;--fl-color-accent-soft:#eee6ff;--fl-color-gold:#c8a655;
  --fl-theme-canvas-glow:rgba(118,81,201,.18);--fl-theme-canvas-glow-2:rgba(160,118,226,.11);
  --fl-theme-hero:linear-gradient(145deg,#fff 0%,#ebe2fb 56%,#c8b2ed 100%);--fl-theme-nav-active:linear-gradient(145deg,#513296,#8a64d6);--fl-theme-message-own:#e8dcfa;--fl-theme-selection:rgba(118,81,201,.12);
}
html[data-theme="dark"] {
  --fl-theme-hero:linear-gradient(145deg,#101a2a 0%,#111827 56%,#2f2614 100%);
  --fl-theme-message-own:#322713;
}
html[data-theme="dark"][data-luxury-theme="obsidian"]{--fl-color-canvas:#080808;--fl-color-surface:#10100f;--fl-color-surface-raised:#181714;--fl-color-surface-muted:#211f1a;--fl-color-text:#fffdf6;--fl-color-text-muted:#bbb3a3;--fl-color-border:#3d382e;--fl-color-border-strong:#a98b49;--fl-color-accent:#d6b45f;--fl-color-accent-soft:#332a17;--fl-color-gold:#e2c571;--fl-theme-hero:linear-gradient(145deg,#10100f,#1d1b16 60%,#41351d);--fl-theme-nav-active:linear-gradient(145deg,#8b6e2e,#d6b45f);--fl-theme-message-own:#312919}
html[data-theme="dark"][data-luxury-theme="sapphire"]{--fl-color-canvas:#070d1c;--fl-color-surface:#0c1427;--fl-color-surface-raised:#111d35;--fl-color-surface-muted:#172645;--fl-color-text:#f7faff;--fl-color-text-muted:#aab9d8;--fl-color-border:#27395c;--fl-color-border-strong:#5378cc;--fl-color-accent:#76a0ff;--fl-color-accent-soft:#172b58;--fl-theme-hero:linear-gradient(145deg,#0a1124,#14264a 60%,#234d9b);--fl-theme-nav-active:linear-gradient(145deg,#2e59bb,#6695ff);--fl-theme-message-own:#17315f}
html[data-theme="dark"][data-luxury-theme="emerald"]{--fl-color-canvas:#06130f;--fl-color-surface:#0a1b15;--fl-color-surface-raised:#10261e;--fl-color-surface-muted:#163329;--fl-color-text:#f3fff9;--fl-color-text-muted:#a8c8b9;--fl-color-border:#274b3d;--fl-color-border-strong:#3b9774;--fl-color-accent:#4dd6a1;--fl-color-accent-soft:#123c2d;--fl-theme-hero:linear-gradient(145deg,#081813,#123326 60%,#17694d);--fl-theme-nav-active:linear-gradient(145deg,#087355,#31c893);--fl-theme-message-own:#153e2f}
html[data-theme="dark"][data-luxury-theme="rose-noire"]{--fl-color-canvas:#170a11;--fl-color-surface:#21101a;--fl-color-surface-raised:#2b1722;--fl-color-surface-muted:#38202c;--fl-color-text:#fff7fa;--fl-color-text-muted:#d2afbd;--fl-color-border:#583043;--fl-color-border-strong:#aa5d7a;--fl-color-accent:#ef8dae;--fl-color-accent-soft:#522238;--fl-theme-hero:linear-gradient(145deg,#1d0e16,#3b1c2b 60%,#722f4a);--fl-theme-nav-active:linear-gradient(145deg,#8b3659,#d96991);--fl-theme-message-own:#4a2234}
html[data-theme="dark"][data-luxury-theme="amethyst"]{--fl-color-canvas:#100a1b;--fl-color-surface:#171026;--fl-color-surface-raised:#211733;--fl-color-surface-muted:#2c2040;--fl-color-text:#fbf8ff;--fl-color-text-muted:#c4b4d9;--fl-color-border:#44325d;--fl-color-border-strong:#8363b9;--fl-color-accent:#b994ff;--fl-color-accent-soft:#362252;--fl-theme-hero:linear-gradient(145deg,#140d22,#2a1a46 60%,#583592);--fl-theme-nav-active:linear-gradient(145deg,#6844ad,#a179e7);--fl-theme-message-own:#382356}

body{background:
  radial-gradient(circle at 12% -4%,var(--fl-theme-canvas-glow),transparent 34rem),
  radial-gradient(circle at 100% 28%,var(--fl-theme-canvas-glow-2),transparent 28rem),
  var(--fl-color-canvas)!important}
#app-screen .hero-card{background:var(--fl-theme-hero)!important;border-color:var(--fl-color-border)!important}
.bottom-nav button.active{background:var(--fl-theme-nav-active)!important;color:#fff!important;box-shadow:0 10px 28px color-mix(in srgb,var(--fl-color-accent) 35%,transparent)!important}
.message.outgoing,.community-message.own{background:var(--fl-theme-message-own)!important}
::selection{background:var(--fl-theme-selection);color:var(--fl-color-text)}

.theme-setting-card{display:grid!important;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;padding:14px!important}
.theme-setting-card>div:first-child{display:grid;gap:3px}.theme-setting-card>div:first-child>b{font-size:.96rem}.theme-setting-card>div:first-child>span{color:var(--fl-color-text-muted);font-size:.76rem;line-height:1.35}
.theme-setting-card>button{grid-column:1/-1;width:100%}
.theme-mini-swatches,.theme-preview{display:flex;overflow:hidden;border:2px solid color-mix(in srgb,var(--fl-color-surface-raised) 80%,transparent);box-shadow:var(--fl-shadow-sm)}
.theme-mini-swatches{width:76px;height:28px;border-radius:999px}.theme-mini-swatches i,.theme-preview i{flex:1}
.theme-mini-swatches i:nth-child(1){background:var(--fl-color-canvas)}.theme-mini-swatches i:nth-child(2){background:var(--fl-color-accent)}.theme-mini-swatches i:nth-child(3){background:var(--fl-color-gold)}.theme-mini-swatches i:nth-child(4){background:var(--fl-color-text)}
.theme-gallery-modal{z-index:40000!important;padding:14px!important;backdrop-filter:blur(18px) saturate(.85);background:rgba(4,8,16,.58)!important}
.theme-gallery-card{width:min(760px,calc(100vw - 28px))!important;max-width:760px!important;padding:22px!important;overflow:auto!important;background:color-mix(in srgb,var(--fl-color-surface) 96%,transparent)!important}
.theme-gallery-card>h2{margin:.15rem 0 .3rem!important}.theme-gallery-intro{max-width:620px;margin:0 34px 16px 0;line-height:1.45}
.theme-mode-segment{display:grid;grid-template-columns:1fr 1fr;gap:5px;max-width:300px;margin:0 0 14px;padding:4px;border:1px solid var(--fl-color-border);border-radius:999px;background:var(--fl-color-surface-muted)}
.theme-mode-segment button{min-height:38px!important;border:0;border-radius:999px;background:transparent;color:var(--fl-color-text-muted);font-weight:800}
.theme-mode-segment button.active{background:var(--fl-color-surface-raised);color:var(--fl-color-text);box-shadow:var(--fl-shadow-sm)}
.luxury-theme-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.luxury-theme-option{position:relative;display:grid;grid-template-columns:72px minmax(0,1fr);align-items:center;gap:12px;min-height:86px!important;padding:10px!important;border:1px solid var(--fl-color-border);border-radius:18px;background:var(--fl-color-surface-raised);color:var(--fl-color-text);text-align:left;box-shadow:none}
.luxury-theme-option:hover{transform:translateY(-2px);box-shadow:var(--fl-shadow-md)}.luxury-theme-option.selected{border-color:var(--fl-color-accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--fl-color-accent) 18%,transparent),var(--fl-shadow-md)}
.luxury-theme-option.selected:after{content:"✓";position:absolute;right:9px;top:8px;display:grid;place-items:center;width:21px;height:21px;border-radius:50%;background:var(--fl-color-accent);color:#fff;font-size:.72rem;font-weight:900}
.luxury-theme-option>span:nth-child(2){display:grid;gap:3px;min-width:0;padding-right:20px}.luxury-theme-option b{font-size:.87rem}.luxury-theme-option small{overflow:hidden;color:var(--fl-color-text-muted);font-size:.68rem;text-overflow:ellipsis;white-space:nowrap}.luxury-theme-option em{position:absolute;right:10px;bottom:8px;color:var(--fl-color-accent);font-size:.56rem;font-style:normal;font-weight:850;letter-spacing:.05em;text-transform:uppercase}
.theme-preview{width:68px;height:58px;border-radius:14px}.theme-preview-champagne i:nth-child(1){background:#fffaf4}.theme-preview-champagne i:nth-child(2){background:#c65f14}.theme-preview-champagne i:nth-child(3){background:#d4af37}.theme-preview-champagne i:nth-child(4){background:#101827}.theme-preview-obsidian i:nth-child(1){background:#111}.theme-preview-obsidian i:nth-child(2){background:#d6b45f}.theme-preview-obsidian i:nth-child(3){background:#eee7d8}.theme-preview-obsidian i:nth-child(4){background:#51442b}.theme-preview-sapphire i:nth-child(1){background:#0b1738}.theme-preview-sapphire i:nth-child(2){background:#315bd6}.theme-preview-sapphire i:nth-child(3){background:#adc4f8}.theme-preview-sapphire i:nth-child(4){background:#f8faff}.theme-preview-emerald i:nth-child(1){background:#08251b}.theme-preview-emerald i:nth-child(2){background:#087f5b}.theme-preview-emerald i:nth-child(3){background:#7bd4b1}.theme-preview-emerald i:nth-child(4){background:#f4faf7}.theme-preview-rose i:nth-child(1){background:#321423}.theme-preview-rose i:nth-child(2){background:#a4476a}.theme-preview-rose i:nth-child(3){background:#e3adbd}.theme-preview-rose i:nth-child(4){background:#fff7fa}.theme-preview-amethyst i:nth-child(1){background:#201137}.theme-preview-amethyst i:nth-child(2){background:#7651c9}.theme-preview-amethyst i:nth-child(3){background:#c8b2ed}.theme-preview-amethyst i:nth-child(4){background:#faf7ff}
.theme-gallery-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:16px;padding-top:14px;border-top:1px solid var(--fl-color-border)}.theme-gallery-footer>span{display:flex;align-items:center;gap:6px;color:var(--fl-color-text-muted);font-size:.72rem;font-weight:700}.theme-gallery-footer>span i{display:grid;place-items:center;width:20px;height:20px;border-radius:50%;background:var(--fl-color-accent-soft);color:var(--fl-color-accent);font-style:normal}
@media(max-width:620px){.theme-gallery-modal{align-items:flex-end!important;padding:0!important}.theme-gallery-card{width:100%!important;max-width:none!important;max-height:91dvh!important;padding:20px 14px calc(16px + env(safe-area-inset-bottom))!important;border-radius:26px 26px 0 0!important}.luxury-theme-grid{grid-template-columns:1fr}.luxury-theme-option{min-height:76px!important}.theme-preview{height:52px}.theme-gallery-footer{position:sticky;bottom:0;margin-inline:-2px;padding:12px 2px 0;background:var(--fl-color-surface)}.theme-gallery-intro{font-size:.79rem}.theme-mode-segment{max-width:none}}

/* v979 Premium Group Identity Atelier. */
.community-icon.has-photo,.community-actions-icon.has-photo,.community-chat-avatar.has-photo,.community-identity-mini.has-photo,.ring-avatar.has-photo{background-color:var(--fl-color-surface-muted)!important;color:transparent!important}
.community-card-head>span{min-width:0}.community-card-head>span>small{display:block;max-width:52ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.community-actions-card>.community-actions-icon{overflow:hidden}
.group-popup-action.identity{background:linear-gradient(145deg,color-mix(in srgb,var(--fl-color-accent-soft) 82%,var(--fl-color-surface)),var(--fl-color-surface-raised));border-color:color-mix(in srgb,var(--fl-color-accent) 28%,var(--fl-color-border))}
.community-manage-identity{display:grid;grid-template-columns:52px minmax(0,1fr) auto;align-items:center;gap:10px;padding:11px;border:1px solid var(--fl-color-border);border-radius:17px;background:var(--fl-color-surface-raised)}
.community-identity-mini{display:grid;place-items:center;width:52px;height:52px;overflow:hidden;border:1px solid var(--fl-color-border-strong);border-radius:17px;background:linear-gradient(145deg,var(--fl-color-text),color-mix(in srgb,var(--fl-color-text) 65%,var(--fl-color-accent)));color:var(--fl-color-gold);font-weight:950;box-shadow:var(--fl-shadow-sm)}
.community-manage-identity>span{display:grid;gap:3px;min-width:0}.community-manage-identity small{overflow:hidden;color:var(--fl-color-text-muted);font-size:.68rem;text-overflow:ellipsis;white-space:nowrap}
.community-identity-editors{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px!important;margin:0!important;padding:11px!important;border:1px solid var(--fl-color-border)!important;border-radius:16px!important;background:var(--fl-color-surface-muted)!important}
.community-identity-editors legend{padding:0 6px;color:var(--fl-color-text);font-size:.72rem;font-weight:900}.community-identity-editors label{display:flex!important;align-items:center;gap:7px;min-width:0;padding:8px;border-radius:11px;background:var(--fl-color-surface-raised);font-size:.7rem;font-weight:750}.community-identity-editors label span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.community-identity-modal{z-index:41000!important;padding:14px!important;backdrop-filter:blur(18px);background:rgba(4,8,16,.62)!important}
.community-identity-card{width:min(600px,calc(100vw - 28px))!important;max-width:600px!important;padding:22px!important;overflow:auto!important}
.community-identity-card>h2{margin:.15rem 0 .25rem!important}.community-identity-card>.muted{margin:0 34px 15px 0;font-size:.78rem;line-height:1.45}
.community-identity-preview-shell{display:grid;grid-template-columns:152px minmax(0,1fr);align-items:center;gap:16px;padding:14px;border:1px solid var(--fl-color-border);border-radius:22px;background:linear-gradient(145deg,var(--fl-color-surface-muted),var(--fl-color-surface-raised))}
.community-identity-preview{position:relative;display:grid;place-items:center;width:148px;aspect-ratio:1;overflow:hidden;border:2px solid var(--fl-color-border-strong);border-radius:34px;background:linear-gradient(145deg,var(--fl-color-text),color-mix(in srgb,var(--fl-color-text) 62%,var(--fl-color-accent)));color:var(--fl-color-gold);box-shadow:var(--fl-shadow-md)}
.community-identity-preview>span{font-size:2.2rem;font-weight:950;letter-spacing:-.04em}.community-identity-preview>img{position:absolute;inset:0;width:100%;height:100%;max-width:none;object-fit:cover;transform-origin:center;will-change:transform}
.community-identity-photo-actions{display:grid;gap:8px}.community-identity-photo-actions label,.community-identity-photo-actions button{display:grid;place-items:center;width:100%;box-sizing:border-box;cursor:pointer}
.community-identity-image-controls{display:grid;grid-template-columns:repeat(3,minmax(0,1fr)) auto;align-items:end;gap:9px;margin-top:12px;padding:12px;border:1px solid var(--fl-color-border);border-radius:18px;background:var(--fl-color-surface-muted)}
.community-identity-image-controls label{display:grid;gap:5px;color:var(--fl-color-text-muted);font-size:.65rem;font-weight:850}.community-identity-image-controls input{width:100%;accent-color:var(--fl-color-accent)}
.community-identity-status{display:grid;gap:6px;margin-top:12px;color:var(--fl-color-text);font-size:.75rem;font-weight:900}.community-identity-status textarea{box-sizing:border-box;width:100%;min-height:82px;padding:11px 12px;border:1px solid var(--fl-color-border);border-radius:16px;background:var(--fl-color-surface-raised);color:var(--fl-color-text);font:inherit;line-height:1.4;resize:vertical}.community-identity-status small{color:var(--fl-color-text-muted);font-size:.65rem;font-weight:700;text-align:right}
.community-identity-save-state{margin:10px 0 0;padding:9px 11px;border-radius:13px;background:var(--fl-color-accent-soft);color:var(--fl-color-accent);font-size:.7rem;font-weight:780;line-height:1.4}.community-identity-footer{display:flex;justify-content:flex-end;gap:9px;margin-top:13px}
.community-system-message{align-self:center;display:flex;align-items:center;gap:7px;max-width:min(88%,520px);margin:7px auto;padding:7px 11px;border:1px solid color-mix(in srgb,var(--fl-color-gold) 45%,var(--fl-color-border));border-radius:999px;background:color-mix(in srgb,var(--fl-color-surface-raised) 90%,transparent);color:var(--fl-color-text-muted);box-shadow:var(--fl-shadow-sm)}.community-system-message>span{color:var(--fl-color-gold)}.community-system-message p{margin:0;font-size:.68rem;font-weight:780;line-height:1.3}.community-system-message time{color:var(--fl-color-text-muted);font-size:.56rem;white-space:nowrap}
@media(max-width:620px){.community-identity-modal{align-items:flex-end!important;padding:0!important}.community-identity-card{width:100%!important;max-width:none!important;max-height:94dvh!important;padding:19px 13px calc(14px + env(safe-area-inset-bottom))!important;border-radius:26px 26px 0 0!important}.community-identity-preview-shell{grid-template-columns:126px minmax(0,1fr);gap:12px}.community-identity-preview{width:122px;border-radius:29px}.community-identity-image-controls{grid-template-columns:1fr 1fr}.community-identity-image-controls label:nth-child(3){grid-column:1/2}.community-manage-identity{grid-template-columns:46px minmax(0,1fr)}.community-manage-identity>button{grid-column:1/-1;width:100%}.community-identity-mini{width:46px;height:46px}.community-identity-editors{grid-template-columns:1fr}.community-system-message{max-width:94%;border-radius:16px}}

/* v980 Calm Luxury Architecture: one density, elevation and overlay contract. */
:root{--fl-density-page:clamp(12px,3vw,24px);--fl-content-max:1180px;--fl-overlay-backdrop:rgba(4,9,18,.68);--fl-overlay-z:40000;--fl-focus-ring:0 0 0 3px color-mix(in srgb,var(--fl-color-accent) 42%,transparent);--fl-divider:color-mix(in srgb,var(--fl-color-border) 74%,transparent)}
html.fl-overlay-open,html.fl-overlay-open body{overflow:hidden;overscroll-behavior:none}
html[data-diagnostics="false"] .developer-only{display:none}
[data-fl-component="overlay"]{z-index:var(--fl-overlay-z);background:var(--fl-overlay-backdrop);isolation:isolate}
[data-fl-component="dialog"]{max-height:min(92dvh,860px);overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;box-shadow:var(--fl-shadow-lg)}
[data-fl-component="card"]{transition:border-color var(--fl-motion-normal) var(--fl-ease),box-shadow var(--fl-motion-normal) var(--fl-ease),transform var(--fl-motion-fast) var(--fl-ease)}
[data-fl-component="conversation-header"]{border-bottom:1px solid var(--fl-divider)}
[data-fl-component="composer"]{border-top:1px solid var(--fl-divider);background:color-mix(in srgb,var(--fl-color-surface) 94%,transparent);backdrop-filter:blur(18px)}
[data-fl-component="menu"]{max-height:min(72dvh,620px);overflow:auto;overscroll-behavior:contain}
:where(button,a,input,textarea,select,[tabindex]):focus-visible{outline:none;box-shadow:var(--fl-focus-ring)}
@media(prefers-reduced-transparency:reduce){[data-fl-component="overlay"],[data-fl-component="composer"]{backdrop-filter:none;background:var(--fl-color-surface)}}
@media(forced-colors:active){[data-fl-component="dialog"],[data-fl-component="card"],[data-fl-component="conversation-header"]{border:1px solid CanvasText}[data-fl-component="overlay"]{background:Canvas}}

/* v981 Adaptive Home: calm, explainable and processed entirely on-device. */
.adaptive-home-card{position:relative;display:grid;gap:8px;margin:12px 0 14px;padding:clamp(17px,3vw,25px);overflow:hidden;border:1px solid color-mix(in srgb,var(--fl-color-accent) 22%,var(--fl-color-border));border-radius:clamp(22px,4vw,30px);background:linear-gradient(145deg,color-mix(in srgb,var(--fl-color-surface-raised) 96%,var(--fl-color-accent-soft)),color-mix(in srgb,var(--fl-color-surface-muted) 82%,var(--fl-color-surface-raised)));box-shadow:var(--fl-shadow-md);isolation:isolate}
.adaptive-home-card:before{content:"";position:absolute;right:-54px;top:-72px;width:210px;height:210px;border-radius:50%;background:radial-gradient(circle,color-mix(in srgb,var(--fl-color-accent) 18%,transparent),transparent 68%);z-index:-1;pointer-events:none}
.adaptive-home-card[data-tone="offline"]{border-color:color-mix(in srgb,var(--fl-color-gold) 52%,var(--fl-color-border))}.adaptive-home-card[data-tone="message"],.adaptive-home-card[data-tone="presence"]{border-color:color-mix(in srgb,var(--fl-color-accent) 38%,var(--fl-color-border))}
.adaptive-home-topline{display:flex;align-items:center;justify-content:space-between;gap:12px}.adaptive-home-topline .eyebrow{margin:0;color:var(--fl-color-accent)}
.adaptive-home-why{min-height:32px;padding:4px 9px;border:1px solid var(--fl-color-border);border-radius:999px;background:color-mix(in srgb,var(--fl-color-surface-raised) 84%,transparent);color:var(--fl-color-text-muted);font:inherit;font-size:.67rem;font-weight:850}
.adaptive-home-card h2{max-width:26ch;margin:0;color:var(--fl-color-text);font-size:clamp(1.35rem,4vw,2rem);line-height:1.08;letter-spacing:-.035em}.adaptive-home-card>p:not(.eyebrow){max-width:62ch;margin:0;color:var(--fl-color-text-muted);font-size:.82rem;line-height:1.5}
.adaptive-home-evidence{display:flex;flex-wrap:wrap;gap:6px;margin-top:2px}.adaptive-home-evidence span{display:inline-flex;align-items:center;min-height:26px;padding:3px 9px;border:1px solid color-mix(in srgb,var(--fl-color-accent) 24%,var(--fl-color-border));border-radius:999px;background:color-mix(in srgb,var(--fl-color-accent-soft) 62%,var(--fl-color-surface-raised));color:var(--fl-color-text);font-size:.64rem;font-weight:820}.adaptive-home-evidence span:before{content:"";width:6px;height:6px;margin-right:6px;border-radius:50%;background:var(--fl-color-accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--fl-color-accent) 13%,transparent)}
.adaptive-home-explanation{margin-top:2px!important;padding:9px 11px;border-left:3px solid var(--fl-color-gold);border-radius:0 12px 12px 0;background:color-mix(in srgb,var(--fl-color-surface-raised) 78%,transparent);font-size:.69rem!important}
.adaptive-home-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:5px}.adaptive-home-actions button{min-height:42px;padding-inline:15px}.adaptive-home-actions .pill{background:color-mix(in srgb,var(--fl-color-surface-raised) 88%,transparent)}
.adaptive-home-setting{position:relative}.adaptive-home-setting>input{position:absolute;opacity:0;pointer-events:none}.adaptive-home-setting .privacy-switch{flex:0 0 auto}
@media(max-width:620px){.adaptive-home-card{margin:9px 0 12px;padding:17px 15px;border-radius:23px}.adaptive-home-card h2{font-size:1.45rem}.adaptive-home-actions{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.adaptive-home-actions button{width:100%;padding-inline:9px;font-size:.75rem}}
@media(max-width:370px){.adaptive-home-actions{grid-template-columns:1fr}.adaptive-home-topline{align-items:flex-start}.adaptive-home-why{white-space:nowrap}}
@media(prefers-reduced-motion:reduce){.adaptive-home-card,.adaptive-home-card:before{transition:none;animation:none}}
@media(forced-colors:active){.adaptive-home-card,.adaptive-home-evidence span,.adaptive-home-explanation{border:1px solid CanvasText}.adaptive-home-evidence span:before{background:CanvasText}}

/* v984 Calm Home hierarchy: adaptive guidance lives quietly inside Settings. */
.home-welcome-column{display:grid;min-width:0;gap:17px}.home-welcome-copy{display:grid;gap:6px;max-width:620px}.home-welcome-copy .eyebrow{margin:0;color:var(--fl-color-accent);font-size:.68rem;letter-spacing:.14em}.home-welcome-copy h2{margin:0;max-width:18ch!important;font-size:clamp(1.65rem,4.1vw,2.55rem)!important;letter-spacing:-.045em}.home-welcome-copy>p:not(.eyebrow){margin:0;max-width:52ch;color:var(--fl-color-text-muted);font-size:.86rem;line-height:1.5}.home-trust-line{display:inline-flex;align-items:center;gap:7px;width:max-content;max-width:100%;margin-top:3px;color:var(--fl-color-text);font-size:.68rem;font-weight:850}.home-trust-line .premium-glyph{width:15px;height:15px;flex:0 0 auto}.settings-section-smart-activity .settings-section-icon{background:linear-gradient(145deg,#064e3b,#059669 62%,#fbbf24)}.adaptive-settings-wrap{display:block;padding:0 10px 10px}.adaptive-settings-card{margin:0;padding:17px;border-radius:20px;box-shadow:none}.adaptive-settings-card h2{font-size:1.28rem}.adaptive-settings-card .adaptive-home-actions button{min-height:40px}.adaptive-settings-card[data-tone="sync"]{background:linear-gradient(145deg,color-mix(in srgb,var(--fl-color-surface-raised) 94%,var(--fl-color-success-soft)),color-mix(in srgb,var(--fl-color-surface-muted) 88%,var(--fl-color-surface-raised)))}
@media(max-width:720px){#home-view .hero-card{padding:16px!important}.home-welcome-column{gap:13px}.home-welcome-copy{gap:4px}.home-welcome-copy h2{font-size:1.42rem!important}.home-welcome-copy>p:not(.eyebrow){font-size:.74rem;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.home-trust-line{font-size:.61rem}.hero-card>div.home-welcome-column:first-child{display:grid!important;align-items:initial!important}.hero-card .home-quick-controls{margin-top:0!important}.adaptive-settings-wrap{padding:0 9px 9px}.adaptive-settings-card{padding:15px 13px!important;border-radius:18px!important}.adaptive-settings-card h2{font-size:1.16rem!important}.adaptive-settings-card .adaptive-home-actions{grid-template-columns:1fr 1fr}}
@media(max-width:390px){.home-welcome-copy>p:not(.eyebrow),.home-trust-line{display:none}.home-welcome-column{gap:10px}.home-welcome-copy h2{font-size:1.22rem!important}.adaptive-settings-card .adaptive-home-actions{grid-template-columns:1fr}}
@media(forced-colors:active){.home-trust-line,.adaptive-settings-card{border:1px solid CanvasText}}

/* v986 Calm Home Command Deck: one composed surface instead of nested cards. */
#app-screen.view-home #home-view{padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;backdrop-filter:none!important}
#app-screen.view-home .profile-hero{grid-template-columns:50px minmax(0,1fr) auto;gap:11px;margin-bottom:12px;padding:10px 12px;border-radius:22px!important;box-shadow:0 10px 32px color-mix(in srgb,var(--fl-color-ink) 9%,transparent)!important}
#app-screen.view-home .profile-hero .avatar-photo{width:50px;height:50px;border-width:2px;font-size:.82rem;box-shadow:0 8px 20px color-mix(in srgb,var(--fl-color-accent) 22%,transparent)}
#app-screen.view-home .profile-copy{min-width:0;display:grid;gap:1px}
#app-screen.view-home .profile-copy .eyebrow{margin:0;font-size:.56rem;letter-spacing:.12em}
#app-screen.view-home .profile-copy h1{overflow:hidden;margin:0;font-size:1.05rem;line-height:1.15;text-overflow:ellipsis;white-space:nowrap}
#app-screen.view-home .profile-copy .muted{overflow:hidden;margin:0;color:var(--fl-color-text-muted);font-size:.67rem;text-overflow:ellipsis;white-space:nowrap}
#app-screen.view-home .refresh-button{min-height:38px;padding:8px 11px;border-radius:14px;font-size:.68rem;box-shadow:none}
.home-command-deck{overflow:hidden;border:1px solid color-mix(in srgb,var(--fl-color-accent) 15%,var(--fl-color-border));border-radius:30px;background:linear-gradient(145deg,color-mix(in srgb,var(--fl-color-surface-raised) 97%,var(--fl-color-accent-soft)),var(--fl-color-surface-raised));box-shadow:0 22px 64px color-mix(in srgb,var(--fl-color-ink) 11%,transparent)}
.home-command-deck>.home-welcome-panel{grid-template-columns:minmax(0,1fr);gap:0;margin:0!important;padding:19px 20px 17px!important;border:0!important;border-bottom:1px solid var(--fl-color-border)!important;border-radius:0!important;background:linear-gradient(135deg,color-mix(in srgb,var(--fl-color-accent-soft) 56%,var(--fl-color-surface-raised)),color-mix(in srgb,var(--fl-color-surface-raised) 96%,transparent))!important;box-shadow:none!important}
.home-command-deck #home-avatar{display:none!important}
.home-command-deck .home-welcome-column{grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:18px}
.home-command-deck .home-welcome-copy{gap:3px;max-width:570px}
.home-command-deck .home-welcome-copy h2{max-width:none!important;font-size:clamp(1.28rem,3.2vw,1.85rem)!important;line-height:1.1!important}
.home-command-deck .home-welcome-copy>p:not(.eyebrow){font-size:.75rem;line-height:1.4}
.home-command-deck .home-trust-line{margin-top:2px;font-size:.61rem}
.home-command-deck .home-quick-controls{display:grid;grid-template-columns:repeat(2,minmax(118px,1fr));gap:7px;margin:0!important}
.home-command-deck .home-quick-controls button{min-height:38px!important;padding:7px 10px!important;border-radius:14px!important;font-size:.66rem!important;box-shadow:none!important;white-space:nowrap}
.home-command-deck .home-dashboard{grid-template-columns:minmax(0,1.3fr) minmax(240px,.7fr);gap:0}
.home-command-deck .dashboard-card{padding:16px 18px!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
.home-command-deck .recent-conversations{border-right:1px solid var(--fl-color-border)!important}
.home-command-deck .dashboard-heading{margin-bottom:7px}
.home-command-deck .dashboard-heading h3{font-size:.94rem}
.home-command-deck .dashboard-heading .eyebrow{font-size:.56rem}
.home-command-deck .text-action{min-height:36px;padding:7px 8px;font-size:.67rem}
.home-command-deck .home-recent-row{gap:9px;min-height:52px;padding:7px 2px}
.home-command-deck .home-recent-row .contact-avatar{width:36px!important;height:36px!important;border-radius:12px!important;font-size:.65rem}
.home-command-deck .home-recent-copy{gap:1px}
.home-command-deck .home-recent-copy b{font-size:.79rem}.home-command-deck .home-recent-copy small{font-size:.67rem}
.home-command-deck .home-recent-row time{font-size:.59rem}
.home-command-deck .activity-metrics{overflow:hidden;gap:0;border:1px solid var(--fl-color-border);border-radius:16px;background:color-mix(in srgb,var(--fl-color-surface-muted) 62%,transparent)}
.home-command-deck .activity-metrics button{position:relative;min-height:56px;padding:7px 3px;border:0;border-radius:0;background:transparent;box-shadow:none}
.home-command-deck .activity-metrics button+button:before{content:"";position:absolute;left:0;top:11px;bottom:11px;width:1px;background:var(--fl-color-border)}
.home-command-deck .activity-metrics strong{font-size:1rem}.home-command-deck .activity-metrics span{font-size:.58rem}
.home-command-deck .dashboard-primary{min-height:39px;margin-top:8px;padding:9px 11px;border-radius:14px;font-size:.69rem;box-shadow:0 8px 22px color-mix(in srgb,var(--fl-color-accent) 22%,transparent)}
.home-command-deck .dashboard-empty{padding:13px 8px}.home-command-deck .dashboard-empty span{font-size:.7rem}
html[data-theme="dark"] .home-command-deck{background:linear-gradient(145deg,color-mix(in srgb,var(--fl-color-surface-raised) 96%,var(--fl-color-accent-soft)),var(--fl-color-surface-raised))}
@media(max-width:720px){
  #app-screen.view-home .profile-hero{grid-template-columns:44px minmax(0,1fr) auto!important;gap:9px!important;margin-bottom:9px!important;padding:8px 9px!important;border-radius:18px!important}
  #app-screen.view-home .profile-hero .avatar-photo{width:44px!important;height:44px!important;border-radius:15px!important}
  #app-screen.view-home .profile-copy h1{font-size:.94rem!important}
  #app-screen.view-home .profile-copy .eyebrow{display:none}
  #app-screen.view-home .profile-copy .muted{font-size:.61rem}
  #app-screen.view-home .refresh-button{grid-column:auto!important;min-width:40px;width:40px;min-height:40px;padding:0!important;border-radius:14px!important}
  #app-screen.view-home .refresh-button span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
  .home-command-deck{border-radius:23px}
  .home-command-deck>.home-welcome-panel{padding:14px 14px 13px!important}
  .home-command-deck .home-welcome-column{display:grid!important;grid-template-columns:1fr!important;align-items:initial!important;gap:10px!important}
  .home-command-deck .home-welcome-copy h2{font-size:1.18rem!important}
  .home-command-deck .home-welcome-copy>p:not(.eyebrow){font-size:.68rem!important;-webkit-line-clamp:1}
  .home-command-deck .home-trust-line{display:inline-flex;font-size:.56rem}
  .home-command-deck .home-quick-controls{width:100%!important;grid-template-columns:1fr 1fr!important;gap:6px!important}
  .home-command-deck .home-quick-controls button{min-height:36px!important;padding:6px 7px!important;font-size:.62rem!important}
  .home-command-deck .home-dashboard{grid-template-columns:1fr!important}
  .home-command-deck .dashboard-card{padding:12px 14px!important}
  .home-command-deck .recent-conversations{border-right:0!important;border-bottom:1px solid var(--fl-color-border)!important}
  .home-command-deck .dashboard-heading{margin-bottom:5px!important}
  .home-command-deck .home-recent-row{min-height:48px;padding:6px 1px}
  .home-command-deck .activity-overview{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 10px;align-items:center}
  .home-command-deck .activity-overview .dashboard-heading{grid-column:1/-1;margin:0!important}
  .home-command-deck .activity-metrics{min-width:0}
  .home-command-deck .activity-metrics button{min-height:50px}
  .home-command-deck .dashboard-primary{width:auto;min-width:116px;margin:0;font-size:.64rem}
}
@media(max-width:380px){
  #app-screen.view-home .profile-copy .muted{display:none}
  .home-command-deck .home-welcome-copy>p:not(.eyebrow){display:none}
  .home-command-deck .home-trust-line{font-size:.52rem}
  .home-command-deck .activity-overview{grid-template-columns:1fr}
  .home-command-deck .activity-overview .dashboard-heading{grid-column:1}
  .home-command-deck .dashboard-primary{width:100%}
}
@media(forced-colors:active){.home-command-deck,.home-command-deck .activity-metrics{border:1px solid CanvasText}.home-command-deck .recent-conversations{border-color:CanvasText!important}}

/* v987 Contact-First Luxury Launch: paint the useful directory first, without a Home flash. */
html:not(.fline-ui-ready) #app-screen.view-contacts>#contacts-view{animation:none!important;opacity:1;transform:none}
html.fline-ui-ready #app-screen.view-contacts>#contacts-view{transform-origin:50% 0;animation:contactFirstLuxuryReveal var(--fl-motion-enter,260ms) var(--fl-motion-intent,cubic-bezier(.2,.78,.2,1)) both}
@keyframes contactFirstLuxuryReveal{from{opacity:.78;transform:translateY(5px) scale(.997)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){html.fline-ui-ready #app-screen.view-contacts>#contacts-view{animation:none!important}}

/* v982 Premium Motion, Haptics & Sound Language. */
:root{--fl-motion-intent:cubic-bezier(.2,.78,.2,1);--fl-motion-enter:260ms;--fl-motion-settle:190ms;--fl-feedback-glow:color-mix(in srgb,var(--fl-color-accent) 22%,transparent)}
.interaction-language-card{display:grid!important;grid-template-columns:minmax(0,1fr);gap:9px!important;min-height:0!important;padding:15px!important;background:linear-gradient(145deg,color-mix(in srgb,var(--fl-color-surface-raised) 96%,var(--fl-color-accent-soft)),var(--fl-color-surface))!important}
.interaction-language-card>div:first-child{display:grid;gap:4px;padding:2px 2px 5px}.interaction-language-card>div:first-child>b{margin:0!important;font-size:.96rem}.interaction-language-card>div:first-child>span{font-size:.74rem;line-height:1.4}
.interaction-language-card .compact-setting-row{min-height:54px;padding:9px 10px;border:1px solid var(--fl-color-border);border-radius:15px;background:color-mix(in srgb,var(--fl-color-surface-raised) 88%,transparent)}
.interaction-language-card .compact-setting-row b{margin:0!important;font-size:.8rem}.interaction-language-card .compact-setting-row small{font-size:.65rem}.interaction-language-card select{min-width:118px;border-color:var(--fl-color-border);background:var(--fl-color-surface);color:var(--fl-color-text)}
.interaction-switch-row{position:relative}.interaction-switch-row>input{position:absolute;opacity:0;pointer-events:none}.interaction-switch-row .privacy-switch{flex:0 0 auto}
.interaction-language-card>button{width:100%;min-height:42px}.interaction-language-card>small{padding:3px 2px;color:var(--fl-color-text-muted);font-size:.65rem;line-height:1.4}
html[data-haptics="off"] .interaction-switch-row:has(#haptics-toggle),html[data-interface-sounds="off"] .interaction-switch-row:has(#interface-sounds-toggle){opacity:.78}
html[data-motion-preference="reduced"]{--fl-motion-enter:.01ms;--fl-motion-settle:.01ms}
html[data-motion-preference="reduced"] *,html[data-motion-preference="reduced"] *::before,html[data-motion-preference="reduced"] *::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}
@media(max-width:520px){.interaction-language-card .compact-setting-row{gap:8px}.interaction-language-card select{min-width:105px;font-size:.72rem}}
@media(prefers-reduced-motion:reduce){html[data-motion-preference="system"]{--fl-motion-enter:.01ms;--fl-motion-settle:.01ms}}
@media(forced-colors:active){.interaction-language-card .compact-setting-row{border:1px solid CanvasText}}
