      :root {
        --safe-top: 0px;
        --safe-bottom: env(safe-area-inset-bottom, 0px);
        --app-h: 100vh;
        --brand-l: #2563eb;     --brand-d: #3b82f6;
        --biete-l: #f59e0b;     --biete-d: #fbbf24;
        --suche-l: #0284c7;     --suche-d: #38bdf8;
        --donation-l: #10b981;  --donation-d: #34d399;
        --text-p-l: #0f172a;
        --text-s-l: #64748b;
        --border-l: #e2e8f0;
        --bg-page-l: #f8fafc;
        --bg-screen-l: #ffffff;
        --bg-alt-l: #f1f5f9;
        --chat-mine-l: #2563eb;
        --chat-theirs-l: #ffffff;
        --chat-canvas-l: #f0efea;
        --shadow-l: 0 10px 30px -10px rgba(15, 23, 42, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.03);
        --leaflet-l: brightness(90%) contrast(130%); /* saturate(115%) contrast(102%) brightness(99%); */
        --map-bg-l: #f5f6f3;
        --text-p-d: #f8fafc;
        --text-s-d: #94a3b8;
        --border-d: #334155;
        --bg-page-d: #05070a;
        --bg-screen-d: #0a0e16;
        --bg-alt-d: #1e293b;
        --chat-mine-d: #2563eb;
        --chat-theirs-d: #1e293b;
        --chat-canvas-d: #0a0e16;
        --shadow-d: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 0 4px 10px -2px rgba(0, 0, 0, 0.3);
        --leaflet-d: invert(100%) hue-rotate(180deg) brightness(92%) contrast(100%);
        --map-bg-d: #070b12;
        --header-bg-d: rgba(10, 14, 22, 0.82);
        --nav-bg-d: rgba(10, 14, 22, 0.85);
        --chat-video-max-w: 320px;
        --chat-video-max-h: 360px;
        --color-brand: var(--brand-l);
        --logo-mark: var(--brand-l);
        --color-biete: var(--biete-l);
        --color-suche: var(--suche-l);
        --color-donation: var(--donation-l);
        --color-primary-text: var(--text-p-l);
        --color-secondary-text: var(--text-s-l);
        --color-border: var(--border-l);
        --background-page: var(--bg-page-l);
        --background-screen: var(--bg-screen-l);
        --background-alt: var(--bg-alt-l);
        --background-chat-mine: var(--chat-mine-l);
        --background-chat-theirs: var(--chat-theirs-l);
        --background-chat-canvas: var(--chat-canvas-l);
        --background-chat-pattern: url("/assets/solarpunk-bg.svg");
        --shadow-md: var(--shadow-l);
        --leaflet-tile-filter: var(--leaflet-l);
        --map-bg: var(--map-bg-l);
        --leaflet-overlay-bg: transparent;
        --header-bg: rgba(255, 255, 255, 0.82);
        --nav-bg: rgba(255, 255, 255, 0.85);
        --color-red: #ef4444;
        --color-green: #10b981;
        --toggle-off: #cbd5e1;
        overscroll-behavior: none;
      }
      @supports (height: 100dvh) { :root { --app-h: 100dvh; } }
      .leaflet-tile-pane { filter: var(--leaflet-tile-filter); }
      .leaflet-overlay-pane::after {
        content: "";
        position: absolute;
        inset: -10000px;
        pointer-events: none;
        z-index: 1;
        background-color: var(--leaflet-overlay-bg);
        mix-blend-mode: soft-light;
      }
      @media (prefers-color-scheme: dark) {
        :root:not(.light-theme) {
          --color-brand: var(--brand-d);
          --logo-mark: #f8fafc;
          --color-biete: var(--biete-d);
          --color-suche: var(--suche-d);
          --color-donation: var(--donation-d);
          --color-primary-text: var(--text-p-d);
          --color-secondary-text: var(--text-s-d);
          --color-border: var(--border-d);
          --background-page: var(--bg-page-d);
          --background-screen: var(--bg-screen-d);
          --background-alt: var(--bg-alt-d);
          --background-chat-mine: var(--chat-mine-d);
          --background-chat-theirs: var(--chat-theirs-d);
          --background-chat-canvas: var(--chat-canvas-d);
          --background-chat-pattern: url("/assets/solarpunk-bg-dark.svg");
          --shadow-md: var(--shadow-d);
          --leaflet-tile-filter: var(--leaflet-d);
          --map-bg: var(--map-bg-d);
          --leaflet-overlay-bg: rgba(15, 23, 42, 0.45);
          --toggle-off: #334155;
          --header-bg: var(--header-bg-d);
          --nav-bg: var(--nav-bg-d);
        }
        :root:not(.light-theme) .entry-type-tag.suche { background: rgba(56, 189, 248, 0.16); border-color: rgba(56, 189, 248, 0.32); color: var(--color-suche); }
        :root:not(.light-theme) .forward-preview-icon.suche { background: rgba(56, 189, 248, 0.16); }
      }
      * {
        box-sizing: border-box;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
      }
      ::selection {
        background-color: rgba(37, 99, 235, 0.3);
      }
      .mine ::selection {
        background-color: rgba(255, 255, 255, 0.85);
        color: #0f172a;
      }
      ::placeholder {
        color: var(--color-secondary-text);
        opacity: 0.75;
      }
      input:-webkit-autofill,
      input:-webkit-autofill:hover,
      input:-webkit-autofill:focus,
      textarea:-webkit-autofill {
        -webkit-text-fill-color: var(--color-primary-text);
        -webkit-box-shadow: 0 0 0 1000px var(--background-alt) inset !important;
        box-shadow: 0 0 0 1000px var(--background-alt) inset !important;
        transition: background-color 5000s ease-in-out 0s;
      }
      img { color: transparent; }
      html { height: 100%; overflow: hidden; overscroll-behavior: none; }
      body {
        font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Helvetica, Arial, "PingFang SC", "Hiragino Sans", "Noto Sans CJK SC", "Noto Sans CJK JP", "Noto Sans CJK KR", "Microsoft YaHei", "Malgun Gothic", sans-serif;
        background-color: var(--background-screen);
        color: var(--color-primary-text);
        margin: 0;
        padding: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        min-height: var(--app-h);
        height: 100%;
        width: 100%;
        position: fixed;
        overflow: hidden;
        overscroll-behavior: none;
        transition: background-color 0.25s ease;
        user-select: none;
        -webkit-user-select: none;
        letter-spacing: -0.011em;
        line-height: 1.5;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        text-rendering: optimizeLegibility;
      }
      h1, h2, h3, h4, button, input, textarea {
        font-family: inherit;
        touch-action: manipulation;
        letter-spacing: -0.015em;
        line-height: 1.25;
      }
      p { line-height: 1.5; margin-top: 0; }
      h1, h2, h3, h4, .brand-name {
        font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", "Hiragino Sans", "Noto Sans CJK SC", "Noto Sans CJK JP", "Noto Sans CJK KR", "Microsoft YaHei", "Malgun Gothic", sans-serif;
      }
      input, textarea, .feed-item-body p, .signal-details-text, .contact-info p { user-select: text; -webkit-user-select: text; }
      ::-webkit-scrollbar { display: none; }
      .phone-mockup {
        width: 100%;
        height: var(--app-h);
        max-width: 480px;
        background-color: var(--background-screen);
        position: relative;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        transition: background-color 0.25s ease;
      }
      @media (max-width: 500px), (pointer: coarse), (hover: none) {
        body { align-items: flex-start; }
        .desktop-only { display: none !important; }
      }
      @media (min-width: 501px) and (pointer: fine) and (hover: hover) {
        body {
          background-color: var(--background-page);
          background-image:
            radial-gradient(at 15% 15%, rgba(37, 99, 235, 0.04) 0px, transparent 45%),
            radial-gradient(at 85% 85%, rgba(2, 132, 199, 0.04) 0px, transparent 45%);
          background-attachment: fixed;
        }
        .phone-mockup {
          height: 844px;
          max-height: 94vh;
          border-radius: 46px;
          box-shadow:
            0 0 0 10px #1e293b,
            0 0 0 12px rgba(255, 255, 255, 0.1),
            0 30px 70px -15px rgba(0, 0, 0, 0.25),
            0 10px 25px -5px rgba(0, 0, 0, 0.1);
          flex-shrink: 0;
        }
      }
      .app-view {
        height: 100%;
        width: 100%;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 0;
        left: 0;
        background-color: var(--background-screen);
      }
      .screen-content {
        flex-grow: 1;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        position: relative;
        touch-action: pan-y;
      }
      .view-hidden {
        display: none !important;
        animation: none;
      }
      body.tab-swiping .app-view {
        animation: none !important;
        pointer-events: none !important;
        user-select: none !important;
        -webkit-user-select: none !important;
      }
      .bottom-sheet {
        border-radius: 28px 28px 0 0;
        box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.15);
        z-index: 100 !important;
        touch-action: none;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-radius 0.3s ease;
        transform: translateY(100%);
        animation: none !important;
      }
      #details-scrim {
        display: none;
        position: absolute;
        inset: 0;
        z-index: 55;
        pointer-events: none;
        background: rgba(15, 23, 42, 0.16);
      }
      body.details-from-chat #view-signal-details:not(.view-hidden) + #details-scrim { display: block; pointer-events: auto; }
      .bottom-sheet.open { transform: translateY(35%); }
      .bottom-sheet.full { border-radius: 0 !important; transform: translateY(0); }
      .bottom-sheet.closing { transform: translateY(100%) !important; }
      .top-sheet {
        border-radius: 0 0 28px 28px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
        z-index: 110 !important;
        touch-action: none;
        transform: translateY(-100%);
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        background: var(--background-screen);
        padding: calc(75px + var(--safe-top, 0px)) 20px 15px;
        display: flex;
        flex-direction: column;
        gap: 12px;
      }
      .top-sheet.open { transform: translateY(0); }
      .topsheet-overlay {
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 105;
        opacity: 0;
        pointer-events: none;
        touch-action: none;
      }
      .topsheet-overlay.open { opacity: 1; pointer-events: auto; }
      .sheet-handle {
        width: 100%;
        height: 18px;
        background: transparent;
        position: relative;
        flex-shrink: 0;
        touch-action: none;
        cursor: grab;
      }
      .sheet-handle::before {
        content: "";
        position: absolute;
        top: 12px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        background: var(--color-border);
        border-radius: 2px;
      }
      .splash-screen {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: 100%;
        background: var(--background-screen);
        position: absolute;
        inset: 0;
        z-index: 9999;
        padding: calc(20px + var(--safe-top, 0px)) 24px calc(24px + var(--safe-bottom, 0px));
        text-align: center;
        overflow: hidden;
      }
      .splash-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transform: translateY(-12px);
        transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
        width: 100%;
      }
      .splash-screen.shift-up .splash-content { transform: translateY(-36px); }
      #welcome-actions {
        position: absolute;
        z-index: 10;
        bottom: calc(36px + var(--safe-bottom, 0px));
        left: 0;
        right: 0;
        margin: 0 auto;
        padding: 0 24px;
        opacity: 0;
        pointer-events: none;
        transform: translateY(16px);
        transition: opacity 0.4s ease, transform 0.4s ease;
      }
      #welcome-actions .action-button { position: relative; z-index: 1; }
      #welcome-actions.show { opacity: 1; pointer-events: auto; transform: translateY(0); }
      .gateway-store-row, .sorting-grid { display: flex; flex-direction: column; gap: 10px; }
      .gateway-store-row .action-button {
        min-width: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        padding: 13px 10px;
        font-size: 13px;
        letter-spacing: -0.01em;
        white-space: nowrap;
        text-decoration: none;
      }
      .gateway-install-title { margin: 0; font-size: 20px; }
      .gateway-install-sub { margin: 12px 0; font-size: 13px; color: var(--color-secondary-text); }
      .gateway-install-head .splash-logo-icon { width: 56px; height: 56px; border-radius: 18px; margin: 2px auto 14px; }
      #gateway-install-qr { margin: 0 auto 16px; }
      .gateway-store-icon { width: 17px; height: 17px; flex-shrink: 0; }
      .gateway-qr-frame {
        width: 99%;
        background: #ffffff;
        border-radius: 14px;
        padding: 5%;
        box-sizing: border-box;
        display: flex;
        align-items: center;
        justify-content: center;
      }
      .gateway-qr-frame svg, .gateway-qr-frame img { width: 100%; height: 100%; display: block; }
      .splash-logo-container {
        position: relative;
        width: 96px;
        height: 96px;
        margin-bottom: 24px;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
      }
      .splash-logo-icon {
        width: 88px;
        height: 88px;
        border-radius: 24px;
        background: linear-gradient(135deg, var(--color-brand) 0%, #1d4ed8 100%);
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 12px 28px -6px rgba(37, 99, 235, 0.45);
        color: white;
      }
      .splash-logo-icon svg { width: 100%; height: 100%; }
      .brand-name {
        font-size: 40px;
        font-weight: 500;
        margin: 0;
        z-index: 2;
        letter-spacing: 32px;
        margin-right: -32px;
        color: var(--color-primary-text);
      }
      .brand-name .bold { font-weight: 700; color: var(--color-brand); }
      .brand-name.is-muni { font-size: 13px; letter-spacing: 6px; margin-right: -6px; font-weight: 600; opacity: 0.55; }
      .brand-name.is-muni .bold { color: inherit; font-weight: 600; }
      #welcome-muni-crest img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 2px 6px rgba(15, 23, 42, 0.18)); }
      @media (max-height: 700px) {
        .splash-logo-container { width: 84px; height: 84px; margin-bottom: 18px; }
        .splash-logo-icon { width: 76px; height: 76px; border-radius: 20px; }
        .brand-name { font-size: 34px; }
        .splash-screen h2 { font-size: 22px; }
        .splash-screen p { font-size: 15px !important; }
      }
      @media (max-height: 600px) {
        .splash-logo-container { width: 72px; height: 72px; margin-bottom: 12px; }
        .splash-logo-icon { width: 64px; height: 64px; border-radius: 18px; }
        .brand-name { font-size: 28px; }
        .splash-screen h2 { font-size: 20px; }
        .splash-screen p { margin-bottom: 16px !important; }
      }
      .screen-header {
        padding-top: calc(10px + var(--safe-top, 0px));
        padding-bottom: 10px;
        padding-left: 18px;
        padding-right: 18px;
        display: flex;
        align-items: center;
        background-color: var(--header-bg);
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        border-bottom: 1px solid var(--color-border);
        z-index: 120;
        height: calc(60px + var(--safe-top, 0px));
        gap: 8px;
        flex-shrink: 0;
      }
      .screen-header button { flex-shrink: 0; }
      #pane-header { display: none; }
      html.split-mode #pane-header { display: flex; grid-area: 1 / 1 / 2 / 2; }
      #header-main-content, #header-chat-info {
        display: flex;
        align-items: center;
        gap: 10px;
        flex-grow: 1;
        min-width: 0;
        cursor: pointer;
      }
      #header-main-content { touch-action: none; }
      #header-avatar, #header-chat-avatar {
        width: 38px;
        height: 38px;
        border-radius: 12px;
        object-fit: cover;
        background: var(--background-alt);
        flex-shrink: 0;
      }
      .header-text-col {
        display: flex;
        flex-direction: column;
        flex-grow: 1;
        overflow: hidden;
        min-width: 0;
      }
      .qr-btn {
        background: var(--background-alt);
        border: 1px solid var(--color-border);
        width: 40px;
        height: 40px;
        border-radius: 12px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        padding: 0;
        color: var(--color-primary-text);
        transition: background 0.2s, transform 0.1s;
      }
      .qr-btn:active { transform: scale(0.95); background: var(--color-border); }
      #recenter-btn.spinning::before { animation: spin 1s linear infinite; }
      .qr-btn::after, .toggle-switch::after { content: ""; position: absolute; inset: -8px; }
      .tap-halo {
        position: absolute;
        inset: -3px;
        border-radius: 14px;
        border: 2px solid var(--color-brand);
        opacity: 0;
        pointer-events: none;
      }
      #header-plus-btn.hint { animation: tap-bump 1.8s cubic-bezier(0.22, 1, 0.36, 1) infinite; }
      #header-plus-btn.is-create {
        background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
        border-color: transparent;
        color: #fff;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 4px 14px -2px rgba(37, 99, 235, 0.4);
      }
      #header-plus-btn.is-create:active { background: #1d4ed8; }
      #header-plus-btn.hint .tap-halo { animation: tap-halo 1.8s cubic-bezier(0.22, 1, 0.36, 1) infinite; }
      @media (prefers-reduced-motion: reduce) {
        #header-plus-btn.hint { animation: none; }
        #header-plus-btn.hint .tap-halo { animation: none; opacity: 0.5; }
      }
      .qr-btn svg { width: 20px; height: 20px; color: currentColor; }
      #desktop-layout-btn .dl-icon-exit, html.split-mode #desktop-layout-btn .dl-icon-enter { display: none; }
      html.split-mode #desktop-layout-btn .dl-icon-exit { display: block; }
      html.split-mode #split-enter-btn, html:not(.split-mode) #desktop-layout-btn { display: none; }
      @media (max-width: 700px) { html:not(.split-mode) #split-enter-btn { display: none; } }
      @media (min-width: 590px) and (max-width: 700px) { html:not(.split-mode) #desktop-layout-btn { display: flex; } }
      #split-enter-btn { position: fixed; top: 20px; right: 20px; z-index: 5; width: 44px; height: 44px; border-radius: 14px; box-shadow: var(--shadow-md); }
      .header-action-btn {
        background: none;
        border: none;
        cursor: pointer;
        color: var(--color-primary-text);
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 12px;
        transition: background 0.2s, transform 0.1s;
        padding: 0;
      }
      .header-action-btn:active, .add-secret-btn:active { transform: scale(0.95); background: var(--background-alt); }
      .header-action-btn svg { width: 24px; height: 24px; }
      #header-back-btn { margin: 0 -4px; }
      #split-handle { display: none; }
      .bottom-nav {
        display: flex;
        justify-content: space-around;
        padding: 6px 16px calc(6px + var(--safe-bottom, 0px));
        border-top: 1px solid var(--color-border);
        background: var(--nav-bg);
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        z-index: 50;
        flex-shrink: 0;
      }
      .nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        color: var(--color-secondary-text);
        cursor: pointer;
        gap: 4px;
        min-width: 48px;
        padding: 8px 4px;
        margin: -8px 0;
        position: relative;
      }
      .nav-badge {
        position: absolute;
        top: 2px;
        inset-inline-end: 4px;
        background: var(--color-red);
        color: white;
        font-size: 10px;
        font-weight: 700;
        padding: 2px 5px;
        border-radius: 10px;
        border: 2px solid var(--background-screen);
        pointer-events: none;
        z-index: 10;
        box-shadow: 0 2px 4px rgba(231, 76, 60, 0.3);
      }
      .nav-item.active { color: var(--color-brand); }
      #nav-profil { display: none; }
      html.split-mode #nav-profil { display: flex; }
      #view-profile-edit { padding: 24px 24px calc(48px + var(--safe-bottom, 0px)); }
      .nav-item svg { width: 24px; height: 24px; }
      .nav-item span { font-size: 10px; font-weight: 500; }
      .ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
      .action-button {
        width: 100%;
        padding: 15px 20px;
        border-radius: 14px;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        border: none;
        text-align: center;
        transition: transform 0.12s ease, opacity 0.15s ease, background-color 0.15s ease;
      }
      .action-button:active { transform: scale(0.98); }
      .action-button:disabled, .qr-btn:disabled { opacity: 0.5; cursor: not-allowed; }
      .btn-primary {
        background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
        color: #ffffff;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 4px 14px -2px rgba(37, 99, 235, 0.4);
      }
      .btn-primary:active {
        background: #1d4ed8;
        box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
        transform: scale(0.985);
      }
      .btn-outline {
        background: var(--background-screen);
        color: var(--color-primary-text);
        border: 1px solid var(--color-border);
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
      }
      .btn-outline:active { background: var(--background-alt); transform: scale(0.985); }
      .action-button.cancel-link {
        background: transparent;
        color: var(--color-secondary-text);
        font-size: 14px;
        padding: 10px;
      }
      .welcome-alt .action-button.cancel-link { width: auto; padding: 8px 10px; margin-top: 14px; font-weight: 500; }
      .action-button.cancel-link:active { opacity: 0.6; }
      .default-switch {
        display: flex;
        background: var(--background-alt);
        border-radius: 12px;
        gap: 4px;
        border: 1px solid var(--color-border);
      }
      .switch-option {
        flex: 1;
        padding: 10px;
        min-height: 44px;
        border: 1px solid transparent;
        background: transparent;
        border-radius: 8px;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        color: var(--color-secondary-text);
        transition: background 0.2s, box-shadow 0.2s;
      }
      .switch-option:active { transform: scale(0.97); }
      .switch-option.selected {
        background: var(--background-screen);
        color: var(--color-primary-text);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        border: 1px solid var(--color-border);
      }
      .classic-switch-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 4px 0;
        margin-bottom: 8px;
      }
      .classic-switch-row h3,
      .queue-details h4 {
        margin: 0;
        font-size: 15px;
        font-weight: 600;
        color: var(--color-primary-text);
      }
      .classic-switch-row h3 {
        flex: 1;
        min-width: 0;
        margin-inline-end: 10px;
        text-align: start;
      }
      .toggle-switch {
        position: relative;
        display: inline-block;
        width: 50px;
        height: 28px;
        flex-shrink: 0;
      }
      .toggle-switch input { opacity: 0; width: 0; height: 0; }
      .toggle-switch input:focus-visible + .toggle-slider {
        outline: 2px solid var(--color-brand);
        outline-offset: 3px;
      }
      .toggle-slider {
        position: absolute;
        cursor: pointer;
        inset: 0;
        background-color: var(--toggle-off);
        transition: 0.3s;
        border-radius: 34px;
        border: 1px solid var(--toggle-off);
      }
      .toggle-slider:before {
        position: absolute;
        content: "";
        height: 20px;
        width: 20px;
        inset-inline-start: 3px;
        bottom: 3px;
        background-color: white;
        transition: 0.3s;
        border-radius: 50%;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
      }
      input:checked + .toggle-slider {
        background-color: var(--color-brand);
        border-color: var(--color-brand);
      }
      input:checked + .toggle-slider:before { transform: translateX(22px); }
      #view-radar { z-index: 0; }
      .map-view { flex-grow: 1; position: relative; z-index: 1; }
      #radar-online-veil {
        position: absolute;
        inset: 0;
        z-index: 20;
        display: flex;
        align-items: flex-start;
        justify-content: center;
        padding-top: calc(56px + 8vh);
        background: rgba(15, 23, 42, 0.4);
        color: #fff;
        font-size: 14px;
        font-weight: 600;
        letter-spacing: 0.06em;
        text-transform: uppercase;
      }
      #radar-online-veil > span {
        padding: 14px 42px;
        font-size: 15px;
        background: radial-gradient(closest-side, rgba(15, 23, 42, 0.3), rgba(15, 23, 42, 0.2) 55%, rgba(15, 23, 42, 0));
      }
      @media (prefers-color-scheme: dark) {
        :root:not(.light-theme) #radar-online-veil { background: rgba(15, 23, 42, 0.38); }
        :root:not(.light-theme) #radar-online-veil > span { background: radial-gradient(closest-side, rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.55) 55%, rgba(15, 23, 42, 0)); }
      }
      .map-veiled .custom-leaflet-icon { display: none; }
      .leaflet-overlay-pane { mix-blend-mode: color; }
      .map-filters {
        padding: 12px 20px;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        z-index: 10;
      }
      html.split-mode .map-filters { max-width: 480px; }
      #view-radar .default-switch { box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); }
      .leaflet-control-attribution { display: none; }
      .leaflet-container { background-color: var(--map-bg) !important; }
      .custom-leaflet-icon { background: transparent; border: none; }
      .map-pin-wrapper {
        cursor: pointer;
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 50px;
        height: 60px;
        transition: opacity 0.3s ease;
      }
      .pin-container { position: relative; display: flex; justify-content: center; transition: transform 0.3s; }
      .map-pin-wrapper:hover .pin-container { transform: scale(1.1); }
      .map-focus .custom-leaflet-icon:not(.pin-focused) .map-pin-wrapper { opacity: 0.3; }
      .map-focus .custom-leaflet-icon:not(.pin-focused):hover .map-pin-wrapper { opacity: 0.7; }
      .map-focus .custom-leaflet-icon.pin-focused { z-index: 900 !important; }
      .map-focus .pin-focused .pin-container { transform: scale(1.15); }
      .map-pin-svg { width: 48px; height: 58px; filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.2)); }
      .pin-biete path { fill: var(--color-biete); }
      .pin-suche path { fill: var(--color-suche); }
      .pin-donation path { fill: var(--color-donation); }
      .pin-crisis path { fill: var(--color-red) !important; }
      .signal-item.crisis { border-inline-start-color: var(--color-red); }
      .entry-type-tag.crisis { background: rgba(239, 68, 68, 0.14); color: var(--color-red); border: 1px solid rgba(239, 68, 68, 0.28); }
      .pin-icon {
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 22px;
        pointer-events: none;
        z-index: 200;
      }
      .pin-image-container {
        position: absolute;
        top: 2px;
        left: 50%;
        transform: translateX(-50%);
        width: 42px;
        height: 42px;
        border-radius: 50%;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
        pointer-events: none;
        z-index: 200;
        background: var(--background-screen);
      }
      .pin-thumbnail {
        position: absolute;
        inset: 0;
        width: 100% !important;
        height: 100% !important;
        object-fit: cover;
        border-radius: 50%;
        opacity: 0;
      }
      .pin-shadow {
        position: absolute;
        bottom: -6px;
        width: 16px;
        height: 5px;
        background: rgba(0, 0, 0, 0.3);
        border-radius: 50%;
        z-index: -1;
        filter: blur(2px);
      }
      .pulsating-marker .pin-container { animation: pulse-active 1.5s infinite ease-in-out; }
      .pin-users {
        position: absolute;
        top: -5px;
        right: -15px;
        display: flex;
        flex-direction: row-reverse;
        pointer-events: none;
      }
      .pin-user-img {
        width: 18px !important;
        height: 18px !important;
        border-radius: 50%;
        border: 2px solid var(--background-screen);
        object-fit: cover;
        margin-left: -8px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
      }
      .pin-user-more {
        width: 18px;
        height: 18px;
        border-radius: 50%;
        background: var(--color-brand);
        color: white;
        font-size: 9px;
        font-weight: 700;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 2px solid var(--background-screen);
        margin-left: -8px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
      }
      .user-location-pin-leaflet {
        width: 16px !important;
        height: 16px !important;
        background-color: var(--color-brand);
        border-radius: 50%;
        border: 3px solid #ffffff;
        box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
      }
      .user-location-pin-leaflet::after { content: ""; position: absolute; inset: -15px; }
      #filter-toggles {
        display: flex;
        width: 100%;
        gap: 4px;
        background: var(--background-alt);
        border: 1px solid var(--color-border);
        border-radius: 14px;
        padding: 3px;
      }
      #filter-toggles .switch-option {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 38px;
        height: 38px;
        padding: 0 8px;
        flex: 1;
        font-size: 13.5px;
        font-weight: 600;
        line-height: 1.2;
        border-radius: 10px;
        gap: 6px;
        border: 1px solid transparent;
        transition: background 0.2s, box-shadow 0.2s, color 0.2s;
      }
      #filter-toggles .switch-option.filter-all { flex: 1; font-size: 13px; }
      #filter-toggles .switch-option.filter-icon { flex: 1; width: auto; font-size: 15px; }
      #filter-toggles .switch-option.filter-icon span {
        font-size: 12.5px;
        font-weight: 600;
        line-height: 1;
        white-space: nowrap;
        transform: translateY(0.5px);
      }
      #filter-toggles .switch-option.selected {
        background: var(--background-screen) !important;
        color: var(--color-primary-text) !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12) !important;
        border: 1px solid var(--color-border) !important;
        padding: 0 8px !important;
      }
      .secret-chip {
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: linear-gradient(135deg, var(--background-alt), var(--background-screen));
        border: 1px solid var(--color-border);
        padding: 14px 18px;
        border-radius: 16px;
        margin-bottom: 10px;
        font-weight: 600;
        font-size: 15px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.03);
        animation: fadeIn 0.2s ease-out;
        border-inline-start: 5px solid var(--color-border);
        gap: 8px;
      }
      .secrets-strength { margin: 16px 0 0; }
      .strength-meter { height: 6px; border-radius: 3px; background: var(--color-border); overflow: hidden; }
      .strength-meter span { display: block; height: 100%; width: 0; border-radius: 3px; background: var(--color-red); transition: width 0.25s ease, background 0.25s ease; }
      .secrets-strength p { margin: 7px 0 0; font-size: 11.5px; line-height: 1.45; text-align: center; color: var(--color-secondary-text); text-wrap: balance; }
      .secrets-strength p:empty { display: none; }
      .secret-chip.is-lvl-1 { border-inline-start-color: var(--color-biete); }
      .secret-chip.is-lvl-2 { border-inline-start-color: #10b981; }
      .secret-chip.is-lvl-0 { border-inline-start-color: var(--color-red); background: rgba(231, 76, 60, 0.06); }
      .secret-chip > div:first-child { min-width: 0; overflow: hidden; }
      .secret-chip > div:first-child span:first-child {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block;
      }
      .secret-chip .remove-btn {
        background: var(--background-alt);
        color: var(--color-secondary-text);
        border: none;
        border-radius: 50%;
        width: 28px;
        height: 28px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        font-size: 14px;
        flex-shrink: 0;
        transition: transform 0.1s, background-color 0.2s, color 0.2s;
      }
      .secret-chip .remove-btn:active { background: var(--color-red); color: white; transform: scale(0.9); }
      .add-secret-row {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        margin-top: 12px;
      }
      .add-secret-btn {
        flex: 1;
        background: var(--background-screen);
        border: 2px dashed var(--color-border);
        color: var(--color-primary-text);
        padding: 12px 4px;
        border-radius: 12px;
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        transition: transform 0.1s, background 0.2s;
      }
      .secrets-warning-box {
        background: rgba(231, 76, 60, 0.1);
        border: 1px solid rgba(231, 76, 60, 0.3);
        color: var(--color-red);
        border-radius: 16px;
        padding: 12px 16px;
        font-size: 13px;
        font-weight: 500;
        line-height: 1.4;
        margin: 0 0 16px 0;
        display: flex;
        align-items: center;
        gap: 12px;
      }
      .semantic-badge {
        font-size: 11.5px;
        font-weight: 600;
        padding: 4px 8px;
        border-radius: 8px;
        display: inline-flex;
        align-items: center;
        gap: 4px;
        transition: all 0.2s ease;
      }
      .semantic-badge.exact { background: rgba(148, 163, 184, 0.15); color: var(--color-secondary-text); }
      .semantic-badge.semantic { background: rgba(16, 185, 129, 0.15); color: #059669; }
      .search-bar-container {
        padding: 10px 18px;
        background: var(--background-screen);
        position: sticky;
        top: 0;
        z-index: 12;
        border-bottom: 1px solid var(--color-border);
      }
      .view-topbar { position: sticky; top: 0; z-index: 12; background: var(--background-screen); }
      .view-topbar .search-bar-container { position: static; }
      .search-input-wrapper { position: relative; display: flex; align-items: center; width: 100%; }
      .search-bar-container.searching .search-clear-btn { display: none; }
      .search-bar-container.searching .search-input-wrapper::after,
      .map-search-box.searching::after,
      #btn-map-my-location.is-busy::after {
        content: "";
        width: 12px;
        height: 12px;
        border: 2px solid var(--color-border);
        border-top-color: var(--color-brand);
        border-radius: 50%;
        animation: spin 0.7s linear infinite;
      }
      .search-bar-container.searching .search-input-wrapper::after,
      .map-search-box.searching::after {
        position: absolute;
        right: 12px;
        top: 50%;
        margin-top: -6px;
        pointer-events: none;
      }
      #btn-map-my-location.is-busy::after { flex: none; }
      .search-input {
        width: 100%;
        padding: 10px 38px 10px 40px;
        border-radius: 16px;
        border: 1px solid var(--color-border);
        background: var(--background-alt) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="%2395a5a6" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" /></svg>') no-repeat 12px center;
        background-size: 18px;
        color: var(--color-primary-text);
        font-size: 16px;
        outline: none;
      }
      .field-input {
        width: 100%;
        padding: 12px 14px;
        border-radius: 12px;
        border: 1px solid var(--color-border);
        background: var(--background-alt);
        color: var(--color-primary-text);
        font-size: 16px;
        outline: none;
      }
      .field-input:focus { border-color: var(--color-brand); }
      .search-clear-btn {
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        width: 22px;
        height: 22px;
        border-radius: 50%;
        background: var(--color-border);
        color: var(--color-secondary-text);
        border: none;
        font-size: 11px;
        font-weight: 700;
        line-height: 1;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        transition: background 0.15s, color 0.15s, transform 0.1s;
        z-index: 2;
      }
      .search-clear-btn:active {
        transform: translateY(-50%) scale(0.9);
        background: var(--color-secondary-text);
        color: var(--background-screen);
      }
      input[type="text"], input[type="password"], input[type="date"], input[type="time"], input[type="datetime-local"], input[type="search"], textarea {
        transition: border-color 0.15s ease, background-color 0.15s ease;
        outline: none;
      }
      input[type="text"]:focus, input[type="password"]:focus, input[type="date"]:focus, input[type="time"]:focus, input[type="datetime-local"]:focus, input[type="search"]:focus, textarea:focus {
        border-color: var(--color-brand) !important;
        box-shadow: none !important;
        outline: none !important;
      }
      .editor-textarea-wrapper:focus-within {
        border-color: var(--color-brand) !important;
      }
      .editor-textarea-wrapper textarea:focus {
        border: none !important;
        box-shadow: none !important;
      }
      .lang-chip {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 6px 14px;
        border-radius: 9999px;
        font-size: 13px;
        font-weight: 600;
        border: 1px solid var(--color-border);
        background: var(--background-screen);
        color: var(--color-primary-text);
        cursor: pointer;
        transition: transform 0.1s ease, background 0.15s ease, border-color 0.15s ease;
        line-height: 1.2;
        box-shadow: 0 1px 2px rgba(0,0,0,0.03);
      }
      .lang-chip:active { transform: scale(0.96); }
      .lang-chip.is-target { border-color: var(--color-brand); box-shadow: inset 0 0 0 1px var(--color-brand); }
      .lang-chip.selected {
        border-color: var(--color-brand);
        background: rgba(37, 99, 235, 0.1);
        color: var(--color-brand);
      }
      .lang-chip .lang-chip-badge {
        font-size: 11px;
        background: rgba(37, 99, 235, 0.12);
        color: var(--color-brand);
        border-radius: 8px;
        padding: 1px 6px;
        font-weight: 700;
        margin-left: 5px;
      }
      .lang-chip-add {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 6px 14px;
        border-radius: 9999px;
        font-size: 13px;
        font-weight: 600;
        border: 1px dashed var(--color-brand);
        background: rgba(37, 99, 235, 0.05);
        color: var(--color-brand);
        cursor: pointer;
        transition: transform 0.1s ease, background 0.15s ease;
        line-height: 1.2;
      }
      .lang-chip-add:active { transform: scale(0.96); background: rgba(37, 99, 235, 0.12); }
      button:focus-visible, [role="button"]:focus-visible, .action-button:focus-visible, .switch-option:focus-visible, .qr-btn:focus-visible, .header-action-btn:focus-visible, .nav-item:focus-visible, .modal-close:focus-visible, .add-secret-btn:focus-visible, .secret-chip .remove-btn:focus-visible, .day-btn:focus-visible {
        outline: 2px solid var(--color-brand) !important;
        outline-offset: 2px !important;
      }
      button:focus:not(:focus-visible), [role="button"]:focus:not(:focus-visible) { outline: none; }
      .feed-meta, .entry-stats, .recording-timer, #slider-value-label, .msg-time { font-variant-numeric: tabular-nums; }
      .search-section-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 18px 20px 8px;
        font-size: 11.5px;
        font-weight: 700;
        color: var(--color-secondary-text);
        text-transform: uppercase;
        letter-spacing: 0.05em;
      }
      .search-section-header .section-count {
        font-size: 11px;
        font-weight: 600;
        padding: 2px 7px;
        border-radius: 10px;
        background: var(--background-alt);
        color: var(--color-secondary-text);
        border: 1px solid var(--color-border);
      }
      .search-empty-state {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 24px 20px;
        margin: 8px 16px 16px;
      }
      .search-empty-state .empty-icon { font-size: 26px; margin-bottom: 6px; line-height: 1; }
      .search-empty-state .empty-title { font-size: 13.5px; font-weight: 600; color: var(--color-primary-text); margin-bottom: 4px; }
      .search-empty-state .empty-desc { font-size: 12px; color: var(--color-secondary-text); line-height: 1.45; margin: 0; max-width: 280px; }
      .search-result-item {
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 12px 20px;
        border-bottom: 1px solid var(--color-border);
        cursor: pointer;
        background: var(--background-screen);
        transition: background-color 0.15s ease;
      }
      .search-result-item:hover, .search-result-item:active { background: var(--background-alt); }
      .search-result-avatar-wrap { position: relative; width: 44px; height: 44px; flex-shrink: 0; cursor: pointer; }
      .search-result-avatar {
        width: 100%;
        height: 100%;
        border-radius: 14px;
        object-fit: cover;
        border: 1px solid var(--color-border);
        background: var(--background-alt);
        aspect-ratio: 1 / 1;
        display: block;
      }
      .search-result-info { flex-grow: 1; min-width: 0; overflow: hidden; text-align: left; }
      .search-result-header-row { display: flex; align-items: center; gap: 6px; overflow: hidden; }
      .search-result-name {
        margin: 0;
        font-size: 15.5px;
        font-weight: 600;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        color: var(--color-primary-text);
      }
      .search-handle-tag { font-size: 12px; font-weight: 600; color: var(--color-brand); flex-shrink: 0; margin-inline-start: 4px; }
      .search-status-badge {
        display: inline-flex;
        align-items: center;
        gap: 3px;
        font-size: 10px;
        font-weight: 600;
        padding: 2px 6px;
        border-radius: 6px;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        flex-shrink: 0;
      }
      .search-status-badge.tribe { background: rgba(37, 99, 235, 0.1); color: var(--color-brand); border: 1px solid rgba(37, 99, 235, 0.2); }
      .search-status-badge.request, .entry-type-tag.biete { background: rgba(245, 158, 11, 0.12); color: #b45309; border: 1px solid rgba(245, 158, 11, 0.25); }
      .search-status-badge.blocked, .request-btn-round.decline { background: rgba(239, 68, 68, 0.12); color: var(--color-red); border: 1px solid rgba(239, 68, 68, 0.25); }
      .search-status-badge.pending { background: rgba(148, 163, 184, 0.15); color: var(--color-secondary-text); border: 1px solid var(--color-border); }
      .search-result-bio {
        margin: 2px 0 0;
        font-size: 13px;
        color: var(--color-secondary-text);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        line-height: 1.4;
      }
      .search-action-circle {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        border: none;
        cursor: pointer;
        flex-shrink: 0;
        transition: transform 0.12s, opacity 0.15s, background-color 0.15s;
        margin-left: 6px;
      }
      .search-action-circle:active { transform: scale(0.9); }
      .search-action-circle.btn-chat { background: rgba(37, 99, 235, 0.1); color: var(--color-brand); border: 1px solid rgba(37, 99, 235, 0.25); }
      .search-action-circle.btn-chat:active, .contact-call-action:active { background: var(--color-brand); color: #fff; }
      .search-action-circle.btn-contact { background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff; box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3); }
      .search-action-circle.btn-contact:active { background: #1d4ed8; }
      .search-action-circle.btn-blocked { background: rgba(239, 68, 68, 0.1); color: var(--color-red); border: 1px solid rgba(239, 68, 68, 0.2); cursor: not-allowed; opacity: 0.75; }
      .request-card {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 12px 18px;
        background: linear-gradient(90deg, rgba(245, 158, 11, 0.05), transparent);
        border-bottom: 1px solid var(--color-border);
        cursor: pointer;
        transition: background-color 0.15s ease;
      }
      .request-card:hover, .request-card:active { background: var(--background-alt); }
      .request-card-info { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
      .request-card-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
      .request-btn-round {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        border: none;
        cursor: pointer;
        font-size: 13px;
        font-weight: 700;
        transition: transform 0.1s;
      }
      .request-btn-round:active { transform: scale(0.9); }
      .request-btn-round.accept { background: rgba(16, 185, 129, 0.15); color: var(--color-green); border: 1px solid rgba(16, 185, 129, 0.25); }
      .show-more-requests-btn {
        width: 100%;
        padding: 10px;
        background: transparent;
        border: none;
        color: var(--color-brand);
        font-size: 12.5px;
        font-weight: 600;
        cursor: pointer;
        text-align: center;
        border-bottom: 1px solid var(--color-border);
      }
      .chat-request-banner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 10px 18px;
        background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(2, 132, 199, 0.05));
        border-bottom: 1px solid var(--color-border);
        z-index: 15;
        flex-shrink: 0;
        animation: fadeIn 0.25s ease;
      }
      .chat-request-banner.view-hidden { display: none !important; }
      .chat-request-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; text-align: left; }
      .chat-request-title { font-size: 12.5px; font-weight: 700; color: var(--color-primary-text); }
      .chat-request-sub { font-size: 11px; color: var(--color-secondary-text); line-height: 1.35; }
      .chat-request-btns { display: flex; gap: 6px; flex-shrink: 0; }
      #chat-mutual-contacts { position: absolute; top: 4px; inset-inline-start: 8px; z-index: 6; display: flex; align-items: center; gap: 8px; pointer-events: none; animation: fadeIn 0.25s ease; }
      #chat-mutual-contacts.view-hidden { display: none !important; }
      .mutual-avatars { display: flex; align-items: center; pointer-events: auto; }
      .mutual-avatar { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; border: 2px solid var(--background-chat-canvas); background: var(--background-alt); cursor: pointer; flex-shrink: 0; }
      .mutual-avatars .mutual-avatar:not(:first-child) { margin-left: -9px; }
      .mutual-avatar-more { display: flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 700; color: var(--color-secondary-text); z-index: 1; }
      .mutual-label { display: none; font-size: 11.5px; color: var(--color-secondary-text); font-weight: 600; }
      #chat-mutual-contacts.roomy .mutual-label { display: inline; }
      #chat-search-bar:not(.view-hidden) ~ #chat-mutual-contacts,
      #chat-request-banner:not(.view-hidden) ~ #chat-mutual-contacts { display: none; }
      .mutual-list-row { display: flex; align-items: center; gap: 12px; padding: 8px 4px; border-bottom: 1px solid var(--color-border); cursor: pointer; text-align: left; }
      .mutual-list-row:last-child { border-bottom: none; }
      .mutual-list-row img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
      .search-empty { text-align: center; padding: 24px; color: var(--color-secondary-text); font-size: 13px; }
      .feed-container { display: flex; flex-direction: column; flex: 1; min-height: 0; }
      #feed-main-view { flex: 1; min-height: 0; overflow-y: auto; }
      @media (hover: none), (pointer: coarse) {
        .signal-item, .feed-item, .signal-item p, .feed-item-body p { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
      }
      .feed-item {
        position: relative;
        padding: 16px 18px 16px 14px;
        border-bottom: 1px solid var(--color-border);
        border-inline-start: 4px solid transparent;
        cursor: pointer;
        background: var(--background-screen);
        transition: background-color 0.15s ease;
      }
      .feed-item.item-biete { border-inline-start-color: var(--color-biete); }
      .feed-item.item-suche { border-inline-start-color: var(--color-suche); }
      .feed-item.item-donation { border-inline-start-color: var(--color-donation); }
      .feed-item.item-crisis { border-inline-start-color: var(--color-red); }
      .feed-item:active { background: var(--background-alt); }
      .feed-item-header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
      .feed-item-header h4 { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.3; color: var(--color-primary-text); }
      .feed-item-body p { margin: 0; font-size: 16px; color: var(--color-primary-text); line-height: 1.5; }
      .feed-images { display: flex; gap: 8px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; }
      .feed-img { width: 80px; height: 80px; border-radius: 12px; object-fit: cover; border: 1px solid var(--color-border); aspect-ratio: 1 / 1; }
      #detail-images .feed-img { width: clamp(110px, 20vw, 160px); height: auto; }
      .feed-meta { margin-top: 12px; font-weight: 500; font-size: 13px; color: var(--color-secondary-text); display: flex; gap: 12px; flex-wrap: wrap; }
      .feed-pin-tag { font-size: 10.5px; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase; color: var(--color-brand); }
      .feed-item.has-chat-btn .feed-meta { padding-inline-end: 46px; }
      .feed-chat-btn { position: absolute; right: 18px; bottom: 16px; display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border: 1.5px solid var(--color-border); border-radius: 9999px; background: var(--background-screen); color: var(--color-primary-text); font-size: 12px; font-weight: 600; cursor: pointer; }
      .feed-chat-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
      .feed-chat-btn.has-unread { border-color: transparent; background: var(--color-brand); color: #fff; font-weight: 700; }
      .feed-chat-btn:active { filter: brightness(0.94); }
      .signal-details-content { padding: 24px 24px calc(120px + var(--sheet-y, 0px)); overflow-y: auto; flex-grow: 1; min-height: 0; touch-action: pan-y; }
      .signal-creator {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 16px 24px 20px;
        border-bottom: 1px solid var(--color-border);
        touch-action: none;
        flex-shrink: 0;
      }
      .signal-creator img { width: 48px; height: 48px; border-radius: 16px; object-fit: cover; }
      .signal-creator h3 { margin: 0; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
      .signal-creator p { margin: 0; font-size: 12px; color: var(--color-secondary-text); }
      .creator-actions { display: flex; align-items: center; gap: 10px; }
      .creator-actions > button {
        position: relative;
        width: 34px;
        height: 34px;
        padding: 0;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        cursor: pointer;
        background: rgba(37, 99, 235, 0.1);
        color: var(--color-brand);
        border: none;
        transition: background-color 0.15s, color 0.15s, transform 0.12s;
      }
      .creator-actions > button:active { background: var(--color-brand); color: #fff; transform: scale(0.94); }
      .creator-actions > button::after { content: ""; position: absolute; inset: -5px; }
      .signal-details-title { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
      .signal-details-title h2 { margin: 0; font-size: 20px; line-height: 1.3; }
      .signal-details-text { font-size: 15px; color: var(--color-primary-text); line-height: 1.6; margin-bottom: 24px; }
      .signal-details-bottom {
        padding: 20px 24px calc(20px + var(--safe-bottom, 0px));
        background: var(--background-screen);
        border-top: 1px solid var(--color-border);
        position: relative;
        z-index: 10;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        transform: translateY(calc(-1 * var(--sheet-y, 0px)));
        touch-action: none;
      }
      .profile-foot-btn {
        background: none;
        border: none;
        color: var(--color-secondary-text);
        font-size: 12.5px;
        cursor: pointer;
        padding: 6px 12px;
        transition: color 0.15s, opacity 0.15s;
      }
      .profile-foot-btn:hover { color: var(--color-primary-text); }
      .profile-foot-btn.is-danger { color: var(--color-red); opacity: 0.75; }
      .profile-foot-btn.is-danger:hover { opacity: 1; }
      .dev-line { font-size: 12px; color: var(--color-secondary-text); margin: 0 0 6px; line-height: 1.5; word-break: break-all; }
      .dev-line code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--color-primary-text); font-size: 11.5px; }
      .dev-head { font-size: 13px; font-weight: 600; margin: 12px 0 6px; }
      .dev-copy { background: none; border: 1px solid var(--color-border); border-radius: 6px; color: var(--color-secondary-text); font-size: 11px; padding: 2px 6px; cursor: pointer; }
      .dev-copy.is-danger { color: var(--color-red); border-color: var(--color-red); opacity: 0.8; }
      .dev-copy.is-danger:hover { opacity: 1; }
      .dev-commit-row { display: flex; align-items: baseline; gap: 8px; font-size: 12px; color: var(--color-secondary-text); padding: 2px 0; }
      .dev-commit-row code { color: var(--color-brand); }
      .profile-avatar {
        width: 64px;
        height: 64px;
        border-radius: 20px;
        object-fit: cover;
        background: var(--background-alt);
        border: 1px solid var(--color-border);
        aspect-ratio: 1 / 1;
      }
      .signal-item {
        display: flex;
        flex-direction: column;
        border-bottom: 1px solid var(--color-border);
        padding: 16px 18px 16px 14px;
        border-inline-start: 4px solid transparent;
        cursor: pointer;
        background: var(--background-screen);
        transition: background-color 0.15s ease;
      }
      .signal-item:active { background: var(--background-alt); }
      .signal-item.biete { border-inline-start-color: var(--color-biete); }
      .signal-item.suche { border-inline-start-color: var(--color-suche); }
      .signal-item.donation { border-inline-start-color: var(--color-donation); }
      .signal-item.inactive { opacity: 0.5; }
      .entry-header { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
      .entry-type-tag {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        font-size: 11.5px;
        font-weight: 600;
        letter-spacing: 0.02em;
        padding: 3px 9px;
        border-radius: 9999px;
      }
      .entry-type-tag.suche { background: rgba(2, 132, 199, 0.12); color: #0369a1; border: 1px solid rgba(2, 132, 199, 0.25); }
      .entry-type-tag.donation { background: rgba(16, 185, 129, 0.12); color: #047857; border: 1px solid rgba(16, 185, 129, 0.25); }
      .entry-visibility-toggle {
        display: flex;
        align-items: center;
        font-size: 24px;
        background: 0 0;
        border: none;
        cursor: pointer;
        padding: 4px;
        margin: -4px;
        position: relative;
      }
      .entry-visibility-toggle::after, .modal-close::after { content: ""; position: absolute; inset: -10px; }
      .entry-content p { margin: 0; font-size: 16px; line-height: 1.5; color: var(--color-primary-text); }
      .entry-stats { display: flex; gap: 12px; margin-top: 12px; font-size: 13px; color: var(--color-secondary-text); font-weight: 500; align-items: center; flex-wrap: wrap; }
      .signal-age { margin-left: auto; font-size: 11.5px; font-weight: 500; color: var(--color-secondary-text); white-space: nowrap; }
      .entry-stat-item { display: flex; align-items: center; gap: 4px; padding: 4px 9px; border: 1.5px solid transparent; border-radius: 9999px; font-size: 12.5px; }
      .entry-stat-item.queue { border-color: var(--color-border); color: var(--color-primary-text); opacity: 0.6; cursor: default; }
      .entry-stat-item.queue.is-active { border-color: var(--chip); background: var(--chip-bg); opacity: 1; font-weight: 600; cursor: pointer; }
      .entry-stat-item.queue.is-active:active { filter: brightness(0.94); }
      .entry-stat-item.unread { color: #fff; font-weight: 700; background: var(--color-brand); cursor: pointer; }
      .entry-stat-item.unread:active { filter: brightness(0.94); }
      .entry-stat-item.unread.is-new { background: var(--color-red); }
      .entry-stat-item svg { width: 13px; height: 13px; flex-shrink: 0; }
      #view-editor { padding: 24px; display: flex; flex-direction: column; gap: 18px; background: var(--background-screen); z-index: 40; }
      .edit-section { text-align: left; }
      .edit-section h3 { margin: 0 0 10px; font-size: 15px; font-weight: 600; }
      .editor-textarea-wrapper { border: 1px solid var(--color-border); border-radius: 16px; background: var(--background-alt); display: flex; flex-direction: column; }
      .editor-textarea-wrapper textarea {
        width: 100%;
        border: none;
        background: transparent;
        padding: 16px;
        min-height: 120px;
        outline: none;
        font-size: 16px;
        line-height: 1.5;
        resize: none;
        font-family: "Roboto", sans-serif;
        color: var(--color-primary-text);
      }
      .editor-tools { display: flex; justify-content: flex-end; padding: 8px 12px; border-top: 1px solid var(--color-border); align-items: center; }
      .icon-btn { background: none; border: none; color: var(--color-secondary-text); cursor: pointer; display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; }
      .image-preview-area { display: flex; gap: 8px; padding: 0 12px 12px; flex-wrap: wrap; }
      .img-preview-video { width: 60px; height: 60px; object-fit: cover; border-radius: 12px; display: block; background: #000; }
      .img-preview-wrapper { position: relative; display: inline-block; }
      .img-remove-btn {
        position: absolute;
        top: -5px;
        right: -5px;
        background: var(--color-red);
        color: white;
        border: none;
        border-radius: 50%;
        width: 20px;
        height: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        font-size: 12px;
        font-weight: bold;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        z-index: 10;
      }
      .img-remove-btn::after { content: ""; position: absolute; inset: -12px; }
      .network-container { padding: 0; background: var(--background-screen); touch-action: pan-y; }
      .network-section-title { padding: 20px 20px 8px; font-size: 12px; font-weight: 600; color: var(--color-secondary-text); text-transform: uppercase; letter-spacing: 0.5px; }
      .modal .network-section-title { padding: 12px 0 8px; }
      .modal .contact-item { padding-left: 0; padding-right: 0; }
      .contact-list { display: flex; flex-direction: column; gap: 0; padding: 0; min-height: 60px; position: relative; }
      .contact-item {
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 10px 18px;
        background: var(--background-screen);
        border-radius: 0;
        cursor: pointer;
        user-select: none;
        position: relative;
        z-index: 1;
        scale: 1;
        border: none;
        border-bottom: 1px solid var(--color-border);
        transition: background 0.1s ease, translate 0.12s ease, scale 0.12s cubic-bezier(0.2, 1, 0.2, 1), box-shadow 0.12s ease, border-color 0.06s ease-in-out;
      }
      #view-netzwerk .contact-item { border-bottom: none; min-height: 72px; }
      .contact-item:active { background: var(--background-alt); }
      @media (hover: hover) and (pointer: fine) { .contact-item:not(.static):hover { background: var(--background-alt); } }
      .member-kick { margin-left: auto; flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; border: none; background: var(--background-alt); color: var(--color-secondary-text); display: flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; }
      .member-kick { color: var(--color-red); }
      .contact-item.static { cursor: default; }
      .contact-item.static:active { background: var(--background-screen); }
      #group-add-list .contact-item { cursor: pointer; }
      .member-role { color: var(--color-green); font-weight: 600; font-size: 10px; letter-spacing: .04em; text-transform: uppercase; }
      .member-dot { margin: 0 4px; opacity: .5; }
      .picker-empty { padding: 14px 18px; color: var(--color-secondary-text); font-size: 12.5px; text-align: center; }
      .chat-info-row { align-self: center; margin: 6px 16px; padding: 4px 12px; border-radius: 12px; background: var(--background-alt); color: var(--color-secondary-text); font-size: 11.5px; line-height: 1.4; text-align: center; max-width: 86%; }
      .chat-info-row-link { cursor: pointer; text-decoration-line: underline; text-decoration-style: dotted; text-underline-offset: 2px; }
      .chat-info-row-link:active { filter: brightness(0.94); }
      .ai-item {
        background: linear-gradient(90deg, rgba(255, 159, 67, 0.05) 0%, transparent 100%), var(--background-screen);
      }
      .contact-item.is-dragging {
        z-index: 100;
        translate: 2px -2px;
        scale: 0.97;
        border-bottom-color: transparent;
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.16), 0 2px 6px rgba(0, 0, 0, 0.08) !important;
        background: var(--background-screen);
        touch-action: none;
        border-radius: 10px;
      }
      .contact-avatar-wrapper { position: relative; width: 46px; height: 46px; flex-shrink: 0; }
      .contact-avatar {
        width: 100%;
        height: 100%;
        border-radius: 14px;
        object-fit: cover;
        border: 1px solid var(--color-border);
        background: var(--background-alt);
        aspect-ratio: 1 / 1;
      }
      .msg-avatar { position: absolute; top: 4px; inset-inline-start: 12px; width: 26px; height: 26px; border-radius: 50%; overflow: hidden; background-color: var(--background-alt); background-image: var(--avatar-fallback); background-position: center; background-size: 64%; background-repeat: no-repeat; cursor: pointer; }
      .msg-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
      .chat-row[data-from] { padding-inline-start: 46px; }
      .chat-row[data-from] .msg-avatar { display: none; }
      .chat-row[data-from].run-start .msg-avatar { display: block; }
      body.selection-mode .chat-row[data-from] .msg-avatar { display: none; }
      .msg-sender {
        font-size: 11px;
        font-weight: 700;
        cursor: pointer;
        width: fit-content;
        color: var(--color-brand);
        margin-bottom: 3px;
      }
      .notification-badge {
        position: absolute;
        top: -4px;
        inset-inline-start: -4px;
        background: var(--color-red);
        color: white;
        font-size: 12px;
        font-weight: 700;
        padding: 2px 6px;
        border-radius: 10px;
        border: 2px solid var(--background-screen);
        z-index: 2;
      }
      .contact-info { flex-grow: 1; pointer-events: none; overflow: hidden; min-width: 0; text-align: left; }
      .contact-info h4 { margin: 0; font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
      .contact-info p { margin: 2px 0 0; font-size: 14px; color: var(--color-secondary-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.4; }
      .contact-info p.contact-tag-line { display: flex; align-items: center; gap: 6px; }
      .contact-tag-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
      .drag-handle {
        color: var(--color-border);
        padding: 12px;
        margin-right: -12px;
        cursor: grab;
        font-size: 18px;
        touch-action: none;
        -webkit-user-drag: none;
        position: relative;
      }
      .drag-handle::after { content: ""; position: absolute; inset: 0; }
      .drag-handle:active { cursor: grabbing; }
      .divider-item {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 5px;
        margin: 0;
        background: var(--background-alt);
        border-bottom: 1px solid var(--color-border);
        color: var(--color-secondary-text);
        font-size: 11px;
        font-weight: 600;
        cursor: default;
        position: relative;
      }
      .divider-item.draggable { cursor: grab; user-select: none; -webkit-user-drag: none; }
      .divider-item.draggable:active { cursor: grabbing; }
      .divider-item.is-dragging { z-index: 100; box-shadow: var(--shadow-md); background: var(--background-screen); }

      #network-search-bar.chips-visible { border-bottom-color: transparent; }
      #network-filter-chips {
        display: none;
        align-items: center;
        gap: 6px;
        padding: 2px 18px 8px;
        background: var(--background-screen);
        overflow-x: auto;
        scrollbar-width: none;
      }
      #network-filter-chips.show { display: flex; }
      #network-filter-chips::-webkit-scrollbar { display: none; }
      .net-chip {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        padding: 3px 10px;
        border-radius: 999px;
        border: 1px solid var(--color-border);
        background: var(--background-alt);
        color: var(--color-secondary-text);
        font-size: 12.5px;
        font-weight: 400;
        line-height: 18px;
        white-space: nowrap;
        flex-shrink: 0;
        cursor: pointer;
      }
      .net-chip.active { background: var(--color-brand); border-color: var(--color-brand); color: #fff; font-weight: 700; }
      .net-chip .chip-count { font-size: 11px; font-weight: 400; opacity: 0.6; }
      .net-chip.active .chip-count { opacity: 0.85; }
      #edit-visibility-groups .net-chip { padding: 7px 12px; font-size: 13px; }
      .contact-call-action {
        background: rgba(37, 99, 235, 0.1);
        color: var(--color-brand);
        border: none;
        border-radius: 50%;
        width: 34px;
        height: 34px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        flex-shrink: 0;
      }
      #chat-search-bar {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 7px 12px;
        background: var(--header-bg);
        border-bottom: 1px solid var(--color-border);
        flex-shrink: 0;
        z-index: 15;
      }
      #chat-search-bar.view-hidden { display: none !important; }
      #chat-search-input {
        flex: 1;
        min-width: 0;
        padding: 7px 12px;
        border-radius: 10px;
        border: 1px solid var(--color-border);
        background: var(--background-alt);
        color: var(--color-primary-text);
        font-size: 16px;
      }
      #chat-search-input:focus { border-color: var(--color-brand); }
      .chat-search-btn {
        background: none;
        border: none;
        color: var(--color-secondary-text);
        font-size: 12px;
        padding: 4px 5px;
        cursor: pointer;
        border-radius: 6px;
        display: flex;
        align-items: center;
        justify-content: center;
      }
      .chat-search-btn:disabled { opacity: 0.35; }
      .chat-search-counter { font-size: 11.5px; font-weight: 600; color: var(--color-secondary-text); white-space: nowrap; min-width: 34px; text-align: center; }
      mark.chat-search-hl { background: rgba(245, 158, 11, 0.4); color: inherit; border-radius: 2px; }
      mark.chat-search-hl.chat-search-current { background: rgba(245, 158, 11, 0.95); color: #000; }
      .call-log-row { display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 500; color: inherit; }
      .call-log-row svg { width: 16px; height: 16px; flex-shrink: 0; }
      .call-log-row[role="button"] { cursor: pointer; }
      .call-log-row .call-log-dur { color: inherit; opacity: 0.72; font-size: 12.5px; }
      .call-log-row.missed { color: var(--color-red); }
      .call-log-row.missed svg { color: var(--color-red); }
      #dnd-list-requests { min-height: 0; }
      #dnd-list-requests:empty,
      #dnd-list-requests.view-hidden { display: none !important; }
      #view-netzwerk:not(.view-hidden) { display: block !important; overflow-y: auto; }
      #view-netzwerk.network-empty:not(.view-hidden), #view-signals.signals-empty:not(.view-hidden) { display: flex !important; flex-direction: column; }
      #view-netzwerk.network-empty #network-main-lists {
        flex: 1;
        display: flex;
        flex-direction: column;
        min-height: 0;
      }
      #view-netzwerk.network-empty #dnd-list-requests { display: none !important; min-height: 0 !important; }
      #view-netzwerk.network-empty #dnd-list-top, #view-signals.signals-empty #my-entries-list { flex: 1; display: flex; flex-direction: column; justify-content: center; }
      #view-netzwerk.network-empty #dnd-list-bottom,
      #view-netzwerk.network-empty #delete-dropzone { display: none; }
      #secret-mode-indicator:empty {
        display: none !important;
        margin-bottom: 0 !important;
        min-height: 0 !important;
      }
      .map-search-box { position: relative; flex: 1; min-width: 0; }
      .map-search-input {
        width: 100%;
        padding: 7px 10px;
        font-size: 16px;
        border-radius: 8px;
        border: 1px solid var(--color-border);
        background: var(--background-alt);
        color: var(--color-primary-text);
      }
      .map-search-box.searching .map-search-input { padding-right: 30px; }
      .map-search-results {
        display: none;
        position: absolute;
        top: calc(100% + 4px);
        left: 0;
        right: 0;
        z-index: 100;
        max-height: 190px;
        overflow-y: auto;
        text-align: left;
        background: var(--background-screen);
        border: 1px solid var(--color-border);
        border-radius: 8px;
        box-shadow: var(--shadow-md);
      }
      .geocode-result { padding: 7px 10px; cursor: pointer; display: flex; flex-direction: column; gap: 1px; }
      .geocode-result:hover, .geocode-result:active, .geocode-result.is-active {
        background-color: var(--background-alt);
      }
      .geocode-name { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
      .geocode-sub { font-size: 11px; color: var(--color-secondary-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
      .geocode-state { padding: 9px 10px; font-size: 12px; color: var(--color-secondary-text); }
      #btn-map-my-location { width: 40px; flex: none; padding: 0; display: flex; align-items: center; justify-content: center; font-size: 12.5px; }
      #btn-map-my-location.is-busy { font-size: 0; }
      #delete-dropzone {
        position: relative;
        margin: 0 20px;
        height: 0;
        max-height: 0;
        visibility: hidden;
        opacity: 0;
        overflow: hidden;
        background: rgba(231, 76, 60, 0.1);
        color: var(--color-red);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        border: 2px dashed transparent;
        border-radius: 24px;
        transition: height 0.25s ease, max-height 0.25s ease, margin 0.25s ease, opacity 0.25s ease, border-color 0.25s ease;
        flex-shrink: 0;
        z-index: 10;
      }
      #delete-dropzone.active {
        position: sticky;
        bottom: 8px;
        height: 80px;
        max-height: 80px;
        margin: 16px 20px;
        visibility: visible;
        opacity: 1;
        border-color: var(--color-red);
      }
      #delete-dropzone.hover {
        background: var(--color-red);
        color: white;
        transform: scale(1.02);
      }
      .chat-view {
        display: flex;
        flex-direction: column;
        overflow: hidden;
        background-color: var(--background-chat-canvas);
        background-image: var(--background-chat-pattern);
        background-repeat: repeat;
        background-size: 720px 720px;
      }
      .chat-messages { flex-grow: 1; padding: 20px; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; }
      .chat-empty {
        flex-grow: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: var(--color-secondary-text);
        text-align: center;
        padding: 40px;
      }
      .chat-empty svg { width: 64px; height: 64px; margin-bottom: 16px; opacity: 0.5; }
      .chat-empty p { margin: 0; font-size: 15px; line-height: 1.5; }
      .chat-row {
        display: flex;
        gap: 8px;
        align-items: flex-end;
        position: relative;
        transition: background-color 0.2s ease;
        padding: 4px 12px;
        margin: 0 -16px;
        -webkit-touch-callout: none !important;
        -webkit-user-select: none !important;
        user-select: none !important;
        touch-action: pan-y !important;
      }
      .chat-row.selected { background-color: rgba(37, 99, 235, 0.12) !important; }
      .chat-row.selected .msg-bubble { opacity: 0.95; }
      .chat-row-checkbox {
        position: absolute;
        left: 12px;
        top: 50%;
        transform: translateY(-50%) scale(0);
        width: 22px;
        height: 22px;
        border-radius: 50%;
        background: var(--color-brand);
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s;
        z-index: 10;
        pointer-events: none;
      }
      .chat-row.selected .chat-row-checkbox { transform: translateY(-50%) scale(1); opacity: 1; }
      body.selection-mode .chat-row.theirs:not([data-from]) .msg-bubble {
        transform: translateX(28px);
        transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
      }
      body.selection-mode .chat-row.mine .msg-bubble { transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1); }
      body.selection-mode #chat-messages .msg-bubble img,
      body.selection-mode #chat-messages .msg-bubble video,
      body.selection-mode #chat-messages .msg-bubble a,
      body.selection-mode #chat-messages .msg-bubble button,
      body.selection-mode #chat-messages .msg-bubble .audio-player,
      body.selection-mode #chat-messages .msg-bubble .msg-reply-box { pointer-events: none; }
      .selection-header-content { display: flex; align-items: center; justify-content: space-between; width: 100%; animation: fadeIn 0.2s ease; }
      .chat-row.mine { flex-direction: row-reverse; }
      .msg-bubble {
        max-width: 85%;
        padding: 8px 8px 4px;
        border-radius: 12px;
        font-size: 14.5px;
        line-height: 1.48;
        word-break: break-word;
        position: relative;
        box-shadow: 0 1px 0.5px rgba(0, 0, 0, 0.13);
        text-align: start;
        -webkit-touch-callout: none !important;
        -webkit-user-select: none !important;
        user-select: none !important;
        touch-action: pan-y !important;
        transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
      }
      .msg-text-content {
        -webkit-touch-callout: none !important;
        -webkit-user-select: none !important;
        user-select: none !important;
        touch-action: pan-y !important;
      }
      @media (hover: hover) and (pointer: fine) {
        .msg-text-content { -webkit-touch-callout: text !important; -webkit-user-select: text !important; user-select: text !important; }
      }
      .chat-row.no-bubble .msg-bubble { background: none; box-shadow: none; border: none; padding: 0 2px 2px; color: var(--color-primary-text); }
      .chat-row.no-bubble .msg-bubble .msg-footer { color: var(--color-secondary-text); opacity: 0.85; padding-inline-end: 2px; }
      .chat-row.no-bubble .msg-text-content.emoji-1 { font-size: 2.9em; }
      .chat-row.no-bubble .msg-text-content.emoji-2 { font-size: 2.1em; }
      .chat-row.no-bubble .msg-text-content.emoji-3 { font-size: 1.55em; }
      .msg-text-content.emoji-1 { font-size: 2.5em; line-height: 1.15; }
      .msg-text-content.emoji-2 { font-size: 1.85em; line-height: 1.2; }
      .msg-text-content.emoji-3 { font-size: 1.35em; line-height: 1.3; }
      .msg-bubble img { width: 100%; border-radius: 6px; margin-bottom: 4px; aspect-ratio: 1/1; object-fit: cover; background: var(--background-alt); -webkit-touch-callout: none; -webkit-user-drag: none; }
      .chat-images-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; margin-bottom: 6px; width: min(260px, 76vw); max-width: 100%; }
      .chat-images-grid.single-image { grid-template-columns: 1fr; width: min(320px, 76vw); max-width: 100%; }
      @media (min-width: 700px) { .chat-images-grid { width: min(400px, 46vw); } .chat-images-grid.single-image { width: min(420px, 60vw); } }
      .chat-images-grid.single-image .chat-image-container { aspect-ratio: auto; min-height: 90px; max-height: 360px; }
      .chat-images-grid.three-images .chat-image-container:first-child { grid-column: span 2; aspect-ratio: 16 / 9; }
      .chat-image-container { position: relative; width: 100%; aspect-ratio: 1 / 1; border-radius: 8px; background: var(--background-alt); overflow: hidden; }
      .chat-row[data-status="pending"] .msg-bubble { pointer-events: none; }
      .chat-row[data-status="failed"] .msg-bubble { opacity: 0.85; }
      .chat-row[data-status="pending"][data-media] .msg-bubble::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: rgba(0, 0, 0, 0.28); pointer-events: none; z-index: 2; }
      .chat-row[data-status="pending"][data-media] .msg-bubble::after { content: ""; position: absolute; inset: 0; margin: auto; width: 28px; height: 28px; border: 3px solid rgba(255, 255, 255, 0.35); border-top-color: #fff; border-radius: 50%; animation: spin 1s linear infinite; pointer-events: none; z-index: 3; }
      .msg-retry { position: absolute; inset: 0; margin: auto; width: 36px; height: 36px; padding: 0; border: none; border-radius: 50%; background: rgba(0, 0, 0, 0.55); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 3; }
      .chat-image-container img { width: 100% !important; height: 100% !important; object-fit: cover !important; border-radius: 8px !important; margin: 0 !important; aspect-ratio: 1/1 !important; }
      .chat-images-grid.single-image .chat-image-container img { display: block; height: auto !important; max-height: 360px; aspect-ratio: auto !important; object-fit: cover !important; }
      .chat-image-more-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(10, 15, 25, 0.55); color: #fff; font-size: 20px; font-weight: 700; border-radius: 8px; pointer-events: none; }
      .mine .msg-bubble { background: var(--background-chat-mine); color: #ffffff; border-radius: 18px 18px 4px 18px; box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25); }
      .theirs .msg-bubble { background: var(--background-chat-theirs); color: var(--color-primary-text); border: 1px solid var(--color-border); border-radius: 18px 18px 18px 4px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); }
      .msg-time { font-size: 11px; color: inherit; opacity: 0.7; }
      .chat-inline-trans-btn { background: none; border: 0; padding: 0 3px; min-height: 20px; font-size: 11px; font-weight: 600; color: inherit; opacity: 0.55; cursor: pointer; display: inline-flex; align-items: center; gap: 2px; }
      .chat-inline-trans-btn:hover, .chat-inline-trans-btn:focus-visible, .chat-inline-trans-btn.is-active { opacity: 1; }
      .chat-inline-trans-btn.is-active { color: var(--color-brand); }
      .chat-inline-trans-btn.is-loading { opacity: 0.4; cursor: progress; }
      .day-divider {
        align-self: center;
        background: var(--background-screen);
        color: var(--color-secondary-text);
        font-size: 11px;
        font-weight: 600;
        padding: 4px 12px;
        border-radius: 20px;
        margin: 12px 0;
        text-transform: uppercase;
        border: 1px solid var(--color-border);
      }
      .chat-input-area {
        position: relative;
        z-index: 26;
        padding: 12px 16px calc(12px + var(--safe-bottom, 0px));
        background: var(--background-screen);
        border-top: 1px solid var(--color-border);
        display: flex;
        gap: 8px;
        align-items: flex-end;
      }
      .chat-input-field { position: relative; flex: 1 1 auto; min-width: 0; display: flex; }
      .chat-input-area textarea {
        flex-grow: 1;
        background: var(--background-alt);
        border: 1px solid transparent;
        border-radius: 20px;
        padding: 12px 16px;
        font-size: 16px;
        resize: none;
        outline: none;
        max-height: 100px;
        min-height: 44px;
        color: var(--color-primary-text);
        font-family: inherit;
        min-width: 0;
        scrollbar-width: none;
      }
      .chat-input-field textarea { padding-inline-end: 76px; }
      .chat-input-field.no-camera textarea { padding-inline-end: 44px; }
      .chat-input-field.no-actions textarea { padding-inline-end: 16px; }
      .chat-input-area textarea::-webkit-scrollbar { display: none; }
      .chat-input-area textarea:focus { border-color: var(--color-brand); }
      .chat-send-btn {
        background: var(--color-brand);
        color: white;
        border: none;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        flex-shrink: 0;
        transition: transform 0.12s;
        position: relative;
        z-index: 30;
        touch-action: none;
      }
      .chat-send-btn:active { transform: scale(0.92); }
      .chat-input-wrapper { text-align: start; }
      .chat-field-actions { position: absolute; inset-inline-end: 4px; bottom: 5px; display: flex; align-items: center; }
      .chat-field-btn, .chat-emoji-btn { background: none; border: none; padding: 0; display: flex; align-items: center; justify-content: center; color: var(--color-secondary-text); cursor: pointer; flex-shrink: 0; }
      .chat-field-btn { width: 32px; height: 32px; }
      .chat-emoji-btn { width: 40px; height: 44px; }
      .chat-emoji-btn.active { color: var(--color-brand); }
      .chat-emoji-btn.is-loading { opacity: 0.4; }
      .emoji-panel { position: absolute; left: 0; right: 0; bottom: 100%; height: min(44vh, 340px); background: var(--background-screen); border-top: 1px solid var(--color-border); box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.14); display: flex; flex-direction: column; z-index: 25; will-change: transform; }
      .emoji-handle { position: absolute; top: -18px; left: 0; right: 0; height: 34px; display: flex; align-items: flex-end; justify-content: center; touch-action: none; cursor: grab; }
      .emoji-handle::before { content: ""; width: 36px; height: 4px; border-radius: 2px; background: var(--color-border); }
      .emoji-grid { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding-block: 22px 4px; padding-inline: 4px 6px; touch-action: pan-y; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
      .emoji-section { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); align-content: start; gap: 2px; }
      .emoji-section + .emoji-section { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--color-border); }
      .emoji-item { font-size: 24px; line-height: 1.2; background: none; border: none; padding: 4px 0; cursor: pointer; border-radius: 10px; }
      .emoji-item:active { background: var(--background-alt); }
      .emoji-tabs { display: flex; align-items: center; flex: 0 0 auto; border-top: 1px solid var(--color-border); }
      .emoji-tabs-scroll { display: flex; gap: 2px; padding: 4px 6px; flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; touch-action: pan-x; }
      .emoji-tabs-scroll::-webkit-scrollbar { display: none; }
      .emoji-backspace { flex: 0 0 auto; border: none; background: none; padding: 6px 12px; font-size: 19px; line-height: 1; color: var(--color-secondary-text); cursor: pointer; }
      .emoji-backspace:active { color: var(--color-primary-text); }
      .emoji-tab { flex: 1 0 32px; background: none; border: none; font-size: 17px; padding: 6px 0; opacity: 0.5; cursor: pointer; border-radius: 8px; }
      .emoji-tab.active { opacity: 1; background: var(--background-alt); }
      .mention-list { position: absolute; left: 12px; right: 12px; bottom: calc(100% + 4px); max-height: 200px; overflow-y: auto; background: var(--background-screen); border: 1px solid var(--color-border); border-radius: 14px; box-shadow: var(--shadow-md); z-index: 26; }
      .mention-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 12px; background: none; border: none; text-align: start; font-size: 14px; color: var(--color-primary-text); cursor: pointer; }
      .mention-item:active { background: var(--background-alt); }
      .mention-handle { font-size: 12px; color: var(--color-secondary-text); }
      .chat-jump-btn { position: absolute; inset-inline-end: 14px; bottom: calc(100% + 10px); width: 40px; height: 40px; border-radius: 50%; background: var(--background-screen); border: 1px solid var(--color-border); box-shadow: var(--shadow-md); display: flex; align-items: center; justify-content: center; z-index: 12; cursor: pointer; color: var(--color-primary-text); }
      .msg-reactions { position: absolute; bottom: 0; --chip-drop: 92%; transform: translateY(var(--chip-drop)); display: flex; flex-wrap: wrap; max-width: calc(100% - 20px); gap: 4px; z-index: 2; }
      .chat-row.mine .msg-reactions { inset-inline-end: 10px; }
      .chat-row.theirs .msg-reactions { inset-inline-start: 10px; }
      .chat-row.has-reactions { z-index: 1; margin-bottom: 18px; }
      .msg-reaction { display: inline-flex; align-items: center; gap: 3px; font-size: 12.5px; line-height: 1; padding: 4px 8px; border: none; border-radius: 12px; background: var(--background-alt); color: var(--color-secondary-text); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); cursor: pointer; }
      .msg-reaction.mine { background: var(--background-chat-mine); color: #fff; }
      .msg-reaction-bar { position: absolute; bottom: calc(100% + 6px); display: flex; gap: 2px; padding: 6px 8px; border-radius: 30px; background: var(--background-screen); border: 1px solid var(--color-border); box-shadow: var(--shadow-md); z-index: 6; transform-origin: 50% 100%; animation: reactionBarIn 0.22s cubic-bezier(0.34, 1.56, 0.64, 1); }
      .chat-row.has-reaction-bar { z-index: 5; }
      .msg-reaction-bar.flip { bottom: auto; top: calc(100% + 6px); transform-origin: 50% 0; }
      .msg-reactions.pop { animation: reactionsIn 0.36s ease-out; }
      @keyframes reactionsIn {
        0% { opacity: 0; transform: translateY(var(--chip-drop)) scale(0.2); }
        55% { opacity: 1; transform: translateY(var(--chip-drop)) scale(1.18); }
        78% { transform: translateY(var(--chip-drop)) scale(0.94); }
        100% { opacity: 1; transform: translateY(var(--chip-drop)) scale(1); }
      }
      @keyframes reactionBarIn { from { opacity: 0; transform: translateY(6px) scale(0.9); } to { opacity: 1; transform: none; } }
      @keyframes reactionPop { from { opacity: 0; transform: scale(0.3); } to { opacity: 1; transform: scale(1); } }
      .chat-row.mine .msg-reaction-bar { inset-inline-end: 6px; }
      .chat-row.theirs .msg-reaction-bar { inset-inline-start: 6px; }
      .msg-reaction-bar button { background: none; border: none; font-size: 27px; line-height: 1; padding: 2px 4px; border-radius: 50%; cursor: pointer; animation: reactionPop 0.22s cubic-bezier(0.34, 1.56, 0.64, 1) backwards; animation-delay: calc(var(--i, 0) * 28ms); }
      .msg-reaction-bar button:active { transform: scale(1.2); }
      .msg-reaction-bar .msg-reaction-more { font-size: 20px; color: var(--color-secondary-text); padding: 2px 6px; }
      .msg-info-group h3 { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.03em; color: var(--color-secondary-text); margin: 16px 0 6px; text-align: start; }
      .msg-info-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 14px; text-align: start; }
      .msg-info-row .ok { color: var(--color-brand); font-weight: 700; }
      .msg-info-row .no { color: var(--color-secondary-text); }
      .voice-recording-overlay {
        position: absolute;
        inset: 0;
        background: var(--background-screen);
        padding: 12px 60px calc(12px + var(--safe-bottom, 0px)) 16px;
        display: flex;
        align-items: center;
        gap: 12px;
        z-index: 27;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
      }
      .voice-recording-overlay.active { opacity: 1; pointer-events: all; }
      .recording-timer { color: var(--color-red); font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 8px; }
      .recording-dot { width: 8px; height: 8px; background: var(--color-red); border-radius: 50%; animation: pulse 1s infinite; }
      .slide-to-cancel { flex-grow: 1; text-align: center; font-size: 13px; color: var(--color-secondary-text); }
      .lock-indicator {
        position: absolute;
        bottom: calc(75px + var(--safe-bottom, 0px));
        inset-inline-end: 16px;
        background: var(--background-screen);
        padding: 8px;
        border-radius: 20px;
        box-shadow: var(--shadow-md);
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.3s ease;
      }
      .lock-indicator.active { opacity: 1; transform: translateY(0); }
      .audio-player { display: flex; align-items: center; gap: 8px; padding: 4px 0; min-width: 210px; max-width: 260px; }
      .chat-file-card { position: relative; display: flex; align-items: center; gap: 10px; padding: 9px 11px; background: rgba(0,0,0,0.06); border-radius: 12px; text-decoration: none; color: inherit; margin: 4px 0; max-width: 250px; }
      .chat-video-container { position: relative; margin: 4px 0; border-radius: 12px; overflow: hidden; background: #000; max-width: var(--chat-video-max-w); cursor: pointer; }
      .chat-video-thumb { max-width: 100%; max-height: var(--chat-video-max-h); display: block; outline: none; object-fit: contain; aspect-ratio: auto 16 / 9; pointer-events: none; }
      .chat-video-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
      .chat-video-play svg { width: 34px; height: 34px; padding: 13px; box-sizing: content-box; border-radius: 50%; background: rgba(0, 0, 0, 0.45); color: #fff; }
      .chat-video-download { position: absolute; top: 6px; inset-inline-end: 6px; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border: 0; padding: 0; cursor: pointer; border-radius: 50%; background: rgba(0,0,0,0.55); color: #fff; }
      .is-downloading { pointer-events: none; }
      .is-downloading > * { opacity: 0.45; }
      .is-downloading::after { content: ""; position: absolute; inset: 0; margin: auto; width: 20px; height: 20px; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: spin 0.8s linear infinite; }
      .file-badge { width: 38px; height: 38px; border-radius: 10px; background: var(--color-brand); color: white; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 10px; flex-shrink: 0; }
      .file-meta { flex: 1; min-width: 0; overflow: hidden; }
      .file-sub { font-size: 10.5px; color: var(--color-secondary-text); }
      .file-preview-thumb { width: 60px; height: 60px; border-radius: 12px; background: var(--color-brand); color: white; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; }
      .audio-play-btn {
        background: var(--color-brand);
        color: white;
        border: none;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
        flex-shrink: 0;
        transition: transform 0.1s;
        position: relative;
        touch-action: manipulation;
      }
      .audio-play-btn::after { content: ""; position: absolute; inset: -6px; }
      .audio-play-btn:active { transform: scale(0.9); }
      .audio-play-btn.audio-error { background: var(--color-red); }
      .audio-waveform-container { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
      .audio-waveform {
        display: flex;
        align-items: center;
        gap: 2px;
        height: 26px;
        touch-action: pan-y;
        cursor: pointer;
        user-select: none;
        -webkit-user-select: none;
      }
      .audio-bar { flex: 1; min-width: 2px; border-radius: 2px; background: rgba(148, 163, 184, 0.5); pointer-events: none; transition: background-color 0.12s linear; }
      .audio-bar.played { background: var(--color-brand); }
      .audio-time { font-size: 10px; color: inherit; opacity: 0.8; font-weight: 500; }
      .mine .audio-play-btn { background: rgba(255, 255, 255, 0.95); color: var(--color-brand); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15); }
      .mine .audio-bar { background: rgba(255, 255, 255, 0.45); }
      .mine .audio-bar.played { background: #ffffff; }
      .mine .file-badge { background: rgba(0, 0, 0, 0.28); }
      .msg-footer { display: flex; justify-content: flex-end; align-items: center; gap: 4px; margin-top: 2px; }
      .overlay {
        position: absolute;
        inset: 0;
        background: rgba(15, 23, 42, 0.45);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        z-index: 200;
        padding: calc(20px + var(--safe-top, 0px)) 20px calc(20px + var(--safe-bottom, 0px));
        box-sizing: border-box;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
      }
      #delete-confirm-modal { z-index: 5500; }
      #btn-confirm-delete { background: var(--color-red); box-shadow: 0 4px 14px -2px rgba(231, 76, 60, 0.4); }
      #btn-confirm-delete.confirm-safe { background: var(--color-green); box-shadow: 0 4px 14px -2px rgba(46, 204, 113, 0.4); }
      #qr-modal { z-index: 10050; }
      #gateway-install-modal { z-index: 10060; }
      #consent-modal { z-index: 10070; }
      #loading-overlay { z-index: 10100; }
      body.barcode-scanner-active { visibility: hidden; background: transparent !important; transition: none; }
      #qr-modal { padding-left: 8px; padding-right: 8px; }
      #qr-modal > .modal { max-width: 344px; padding-left: 12px; padding-right: 12px; }
      body.barcode-scanner-active #qr-modal { visibility: visible; }
      #qr-modal.native-scan { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; padding: 0; overflow: hidden; }
      #qr-modal.native-scan > .modal { display: none; }
      #qr-native-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; }
      #qr-native-overlay.view-hidden { display: none !important; }
      .qr-native-frame { width: min(70vw, 280px); aspect-ratio: 1; border-radius: 20px; box-shadow: 0 0 0 100vmax rgba(5, 7, 12, 0.6); }
      #qr-native-overlay p { color: #fff; font-size: 14px; font-weight: 600; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9); margin: 0; text-align: center; max-width: 80vw; }
      #qr-native-close { position: absolute; top: calc(14px + var(--safe-top, 0px)); right: 16px; }
      #qr-native-torch { position: absolute; bottom: calc(28px + var(--safe-bottom, 0px)); }
      .modal {
        background: var(--background-screen);
        padding: 28px 24px;
        border-radius: 24px;
        width: 100%;
        max-width: 380px;
        max-height: calc(100dvh - 40px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        margin: auto 0;
        position: relative;
        box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.25), 0 0 0 1px var(--color-border);
        border: none;
        text-align: center;
        box-sizing: border-box;
        animation: modalPop 0.25s cubic-bezier(0.32, 0.72, 0, 1);
      }
      .modal p { font-size: 14px; line-height: 1.55; }
      .confirm-noshow { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 16px; font-size: 13px; color: var(--color-secondary-text); cursor: pointer; }
      .confirm-noshow input { margin: 0; }
      .modal-close {
        position: absolute;
        top: 16px;
        right: 16px;
        width: 32px;
        height: 32px;
        background: var(--background-alt);
        border-radius: 50%;
        border: none;
        font-size: 16px;
        cursor: pointer;
        color: var(--color-secondary-text);
        display: flex;
        align-items: center;
        justify-content: center;
      }
      .sso-head { display: flex; align-items: center; gap: 12px; text-align: left; }
      .sso-head-icon { font-size: 26px; line-height: 1; }
      .sso-head h2 { margin: 0; font-size: 18px; }
      .sso-head p { margin: 2px 0 0; font-size: 13px; color: var(--color-secondary-text); }
      .sso-origin { margin: 16px 0 10px; padding: 12px 14px; border-radius: 12px; background: var(--background-alt); color: var(--color-brand); font-size: 15px; font-weight: 700; text-align: left; word-break: break-all; }
      .sso-meta { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--color-secondary-text); text-align: left; }
      .sso-meta strong { color: var(--color-primary-text); font-weight: 600; }
      .sso-warn { margin: 14px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--color-secondary-text); text-align: left; }
      .mask-icon { display: inline-flex; align-items: center; justify-content: center; }
      .mask-icon::before {
        content: "";
        display: block;
        background-color: currentColor;
        -webkit-mask-repeat: no-repeat;
        -webkit-mask-position: center;
        -webkit-mask-size: contain;
        mask-repeat: no-repeat;
        mask-position: center;
        mask-size: contain;
      }
      .sz-18::before { width: 18px; height: 18px; }
      .sz-20::before { width: 20px; height: 20px; }
      .sz-24::before { width: 24px; height: 24px; }
      .sz-32::before { width: 32px; height: 32px; }
      .sz-48::before { width: 48px; height: 48px; }
      .icon-close::before {
        -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M6 18L18 6M6 6l12 12' /%3E%3C/svg%3E");
        mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M6 18L18 6M6 6l12 12' /%3E%3C/svg%3E");
      }
      .icon-plus::before {
        -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M12 4.5v15m7.5-7.5h-15' /%3E%3C/svg%3E");
        mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M12 4.5v15m7.5-7.5h-15' /%3E%3C/svg%3E");
      }
      .icon-mic-off::before {
        -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M1 1l22 22M9 9v3a3 3 0 005.12 2.12M15 9.34V4a3 3 0 00-5.94-.6M17 16.95A7 7 0 015 12v-2m14 0v2a7 7 0 01-.11 1.23M12 19v4M8 23h8' /%3E%3C/svg%3E");
        mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M1 1l22 22M9 9v3a3 3 0 005.12 2.12M15 9.34V4a3 3 0 00-5.94-.6M17 16.95A7 7 0 015 12v-2m14 0v2a7 7 0 01-.11 1.23M12 19v4M8 23h8' /%3E%3C/svg%3E");
      }
      .icon-spin::before {
        -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0l3.181 3.183a8.25 8.25 0 0013.803-3.7M4.031 9.865a8.25 8.25 0 0113.803-3.7l3.181 3.182m0-4.991v4.99' /%3E%3C/svg%3E");
        mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0l3.181 3.183a8.25 8.25 0 0013.803-3.7M4.031 9.865a8.25 8.25 0 0113.803-3.7l3.181 3.182m0-4.991v4.99' /%3E%3C/svg%3E");
      }
      .icon-map-pin::before {
        -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M15 10.5a3 3 0 11-6 0 3 3 0 016 0z' /%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 10.5c0 7.142-7.5 11.25-7.5 11.25S4.5 17.642 4.5 10.5a7.5 7.5 0 1115 0z' /%3E%3C/svg%3E");
        mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M15 10.5a3 3 0 11-6 0 3 3 0 016 0z' /%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 10.5c0 7.142-7.5 11.25-7.5 11.25S4.5 17.642 4.5 10.5a7.5 7.5 0 1115 0z' /%3E%3C/svg%3E");
      }
      .location-icon-box {
        background: var(--background-alt);
        padding: 20px;
        border-radius: 24px;
        color: var(--color-brand);
        margin-bottom: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
      }
      #toast-notification {
        position: absolute;
        bottom: 84px;
        left: 50%;
        transform: translateX(-50%) translateY(16px);
        background: var(--color-primary-text);
        color: var(--background-screen);
        padding: 10px 20px;
        border-radius: 9999px;
        font-size: 13.5px;
        font-weight: 600;
        opacity: 0;
        pointer-events: none;
        transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 6000;
        box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
        max-width: min(92vw, 420px);
        white-space: normal;
        text-align: center;
        width: max-content;
      }
      #toast-notification.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
      #toast-notification.tappable {
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        gap: 8px;
      }
      #toast-notification .toast-close { margin-left: 10px; opacity: 0.7; font-size: 16px; line-height: 1; padding: 2px; }
      #toast-notification.swiping { transition: none; }
      #connection-banner {
        position: absolute;
        top: calc(68px + var(--safe-top, 0px));
        left: 50%;
        transform: translateX(-50%) translateY(-14px) scale(0.96);
        z-index: 500;
        background: rgba(15, 23, 42, 0.88);
        color: #f8fafc;
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border: 1px solid rgba(255, 255, 255, 0.12);
        box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.2);
        font-size: 12px;
        font-weight: 500;
        letter-spacing: -0.01em;
        padding: 6px 14px;
        border-radius: 9999px;
        opacity: 0;
        pointer-events: none;
        transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        white-space: nowrap;
        max-width: calc(100% - 48px);
      }
      #connection-banner.show { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); pointer-events: auto; }
      #connection-banner .banner-dot {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: #f59e0b;
        box-shadow: 0 0 6px rgba(245, 158, 11, 0.6);
        flex-shrink: 0;
        animation: pulse 1.8s infinite ease-in-out;
      }
      #connection-banner.offline .banner-dot { background: #ef4444; box-shadow: 0 0 6px rgba(239, 68, 68, 0.7); }
      #connection-banner.connected .banner-dot { background: #10b981; box-shadow: 0 0 6px rgba(16, 185, 129, 0.7); animation: none; }
      #connection-banner .banner-spinner {
        width: 10px;
        height: 10px;
        border: 1.5px solid rgba(255, 255, 255, 0.3);
        border-top-color: #fff;
        border-radius: 50%;
        animation: spin 0.7s linear infinite;
        flex-shrink: 0;
      }
      #connection-banner.connected .banner-spinner,
      #connection-banner.offline .banner-spinner { display: none; }
      #connection-banner:not(.connected):not(.offline) .banner-dot { display: none; }
      .notif-perm-icon {
        width: 64px;
        height: 64px;
        border-radius: 20px;
        background: rgba(37, 99, 235, 0.12);
        color: var(--color-brand);
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto 16px;
        font-size: 30px;
      }
      .notif-perm-benefits {
        text-align: left;
        background: var(--background-alt);
        border: 1px solid var(--color-border);
        border-radius: 14px;
        padding: 12px 14px;
        margin: 16px 0;
        display: flex;
        flex-direction: column;
        gap: 8px;
      }
      .notif-perm-benefits div { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--color-primary-text); }
      .notif-perm-benefits svg { color: var(--color-green); flex-shrink: 0; }
      .skeleton {
        background: linear-gradient(90deg, var(--background-alt) 25%, var(--color-border) 50%, var(--background-alt) 75%);
        background-size: 200% 100%;
        animation: skeleton-loading 1.5s infinite;
        border-radius: 8px;
      }
      .skeleton-item { padding: 20px; border-bottom: 1px solid var(--color-border); }
      .skeleton-circle { width: 48px; height: 48px; border-radius: 50%; }
      .skeleton-line { height: 12px; margin-bottom: 8px; width: 100%; }
      .skeleton-line.short { width: 60%; }
      .day-picker { display: flex; justify-content: space-between; gap: 6px; }
      .day-btn {
        flex: 1;
        aspect-ratio: 1;
        border-radius: 50%;
        border: 1px solid var(--color-border);
        background: var(--background-alt);
        color: var(--color-secondary-text);
        font-weight: 600;
        cursor: pointer;
        transition: transform 0.1s ease, background-color 0.2s ease;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 13px;
      }
      .day-btn:active { transform: scale(0.92); }
      .day-btn.selected { background: var(--color-brand); color: white; border-color: var(--color-brand); }
      input[type=range] { -webkit-appearance: none; appearance: none; background: transparent; }
      input[type=range]:focus { outline: none; }
      input[type=range]:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 4px; border-radius: 4px; }
      input[type=range]::-webkit-slider-runnable-track { width: 100%; height: 6px; cursor: pointer; background: var(--color-border); border-radius: 3px; }
      input[type=range]::-moz-range-track { width: 100%; height: 6px; cursor: pointer; background: var(--color-border); border-radius: 3px; }
      input[type=range]::-webkit-slider-thumb {
        height: 20px;
        width: 20px;
        border-radius: 50%;
        background: var(--color-brand);
        cursor: pointer;
        -webkit-appearance: none;
        margin-top: -7px;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
        transition: transform 0.1s;
      }
      input[type=range]::-moz-range-thumb {
        height: 20px;
        width: 20px;
        border-radius: 50%;
        background: var(--color-brand);
        border: none;
        cursor: pointer;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
        transition: transform 0.1s;
      }
      input[type=range]::-webkit-slider-thumb:active { transform: scale(1.2); }
      input[type=range]::-moz-range-thumb:active { transform: scale(1.2); }
      .dropdown-container { position: relative; display: flex; align-items: center; }
      .dropdown-menu {
        position: absolute;
        top: 100%;
        right: 10px;
        background: var(--background-screen);
        border-radius: 16px;
        box-shadow: var(--shadow-md);
        border: 1px solid var(--color-border);
        min-width: 200px;
        z-index: 1000;
        display: none;
        flex-direction: column;
        overflow: hidden;
        margin-top: 8px;
        animation: fadeIn 0.2s ease-out;
      }
      .dropdown-menu.show { display: flex; }
      .dropdown-item {
        padding: 14px 16px;
        display: flex;
        align-items: center;
        gap: 12px;
        cursor: pointer;
        background: none;
        border: none;
        width: 100%;
        text-align: left;
        font-family: inherit;
        font-size: 14px;
        color: var(--color-primary-text);
        transition: background 0.2s;
        border-bottom: 1px solid var(--color-border);
      }
      .dropdown-item:last-child { border-bottom: none; }
      .dropdown-item:active { background: var(--background-alt); }
      .dropdown-item.danger { color: var(--color-red); }
      .dropdown-item svg, .dropdown-item span.icon { width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; }
      #qr-reader video, #qr-reader canvas { width: 100% !important; height: 100% !important; object-fit: cover !important; object-position: center; }
      .desktop-layout { display: flex; align-items: center; justify-content: center; gap: 60px; width: 100%; max-width: 1600px; box-sizing: border-box; z-index: 1; }
      .side-panel {
        flex: 0 1 340px;
        display: none;
        flex-direction: column;
        padding: 32px 26px;
        position: relative;
        background: var(--background-screen);
        border-radius: 32px;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.05);
        border: 1px solid var(--color-border);
        overflow: hidden;
      }
      .side-panel::before {
        content: "";
        position: absolute;
        top: -50px;
        left: -50px;
        right: -50px;
        height: 200px;
        background: radial-gradient(ellipse at top center, var(--glow-color, var(--color-brand)) 0%, transparent 70%);
        opacity: 0.1;
        pointer-events: none;
        filter: blur(30px);
      }
      .left-panel { --glow-color: var(--color-brand); }
      .right-panel { --glow-color: var(--color-red); }
      .side-panel h2 { margin: 0 0 10px 0; font-size: 22px; font-weight: 700; color: var(--color-primary-text); line-height: 1.25; text-align: center; white-space: nowrap; }
      .side-panel p { margin: 0 0 20px 0; font-size: 14px; line-height: 1.5; color: var(--color-secondary-text); text-align: center; }
      .side-hero-icon {
        width: 68px;
        height: 68px;
        border-radius: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto 18px auto;
        animation: float 6s ease-in-out infinite;
        position: relative;
        z-index: 2;
      }
      .left-panel .side-hero-icon { background: rgba(37, 99, 235, 0.15); color: var(--color-brand); }
      .right-panel .side-hero-icon { background: rgba(239, 68, 68, 0.15); color: var(--color-red); animation-delay: 1s; }
      #help-content-wrapper { transition: opacity 0.3s ease; }
      .impact-box { background: var(--background-alt); border-radius: 18px; padding: 16px 18px; margin-bottom: 20px; border: 1px solid var(--color-border); }
      .impact-row { display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 500; color: var(--color-primary-text); margin-bottom: 10px; text-align: left; }
      .impact-row:last-child { margin-bottom: 0; }
      .impact-row svg { color: var(--color-green); flex-shrink: 0; }
      @media (min-width: 590px) {
        html.split-mode { --split-left: min(48%, clamp(300px, 32%, 420px)); --split-nav-h: calc(56px + var(--safe-bottom, 0px)); }
        html.split-mode body { background: var(--background-screen); }
        html.split-mode .desktop-layout { max-width: none; padding: 0; gap: 0; height: 100%; }
        html.split-mode .side-panel { display: none; }
        html.split-mode .phone-mockup { width: 100%; height: var(--app-h); max-width: none; max-height: none; border-radius: 0; box-shadow: none; }
        html.split-mode #app-container { display: grid; grid-template-columns: var(--split-left) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; }
        html.split-mode .screen-header { grid-area: 1 / 2 / 2 / 3; }
        html.split-mode .screen-content { grid-area: 2 / 1 / 4 / 3; display: grid; grid-template-columns: var(--split-left) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
        html.split-mode #header-qr-btn { margin-left: auto; }
        html.split-mode #main-nav { grid-area: 3 / 1 / 4 / 2; height: var(--split-nav-h); background: var(--background-screen); border-inline-end: 1px solid var(--color-border); }
        html.split-mode #main-nav .nav-item[data-click*="switchTab('radar'"] { display: none; }
        html.split-mode #view-netzwerk, html.split-mode #view-signals, html.split-mode #view-feed, html.split-mode #view-profile-edit { grid-area: 1 / 1 / 2 / 2; padding-bottom: var(--split-nav-h); border-inline-end: 1px solid var(--color-border); }
        html.split-mode #view-radar, html.split-mode #view-chat, html.split-mode #view-signal-details, html.split-mode #details-scrim { grid-area: 1 / 2 / 2 / 3; }
        html.split-mode #view-editor, html.split-mode #view-forward, html.split-mode #location-accuracy-modal { grid-area: 1 / 2 / 2 / 3; }
        html.split-mode #quick-actions-sheet { right: auto; width: var(--split-left); }
        html.split-mode #topsheet-overlay { right: auto; width: var(--split-left); }
        html.split-mode #call-view:not(.mini) { inset: calc(60px + var(--safe-top, 0px)) 0 0 var(--split-left); z-index: 52; }
        html.split-mode #incoming-call:not(.full) { left: calc(var(--split-left) + 12px); }
        html.split-mode .app-view, html.split-mode .chat-messages, html.split-mode .signal-details-content { scrollbar-width: thin; scrollbar-color: var(--color-border) transparent; }
        html.split-mode .app-view::-webkit-scrollbar, html.split-mode .chat-messages::-webkit-scrollbar, html.split-mode .signal-details-content::-webkit-scrollbar { display: block; width: 10px; height: 10px; }
        html.split-mode .app-view::-webkit-scrollbar-thumb, html.split-mode .chat-messages::-webkit-scrollbar-thumb, html.split-mode .signal-details-content::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 10px; border: 2px solid transparent; background-clip: content-box; }
        html.split-mode #split-handle {
          display: block;
          position: absolute;
          top: calc(60px + var(--safe-top, 0px));
          bottom: 0;
          left: var(--split-left);
          width: 7px;
          transform: translateX(-50%);
          z-index: 104;
          cursor: col-resize;
          touch-action: none;
          padding: 0 2px;
          border-radius: 3px;
          background-clip: content-box;
          transition: background-color 0.15s;
        }
        html.split-mode #split-handle:hover, body.split-dragging #split-handle { background-color: var(--color-brand); opacity: 0.5; }
        body.split-dragging { cursor: col-resize; user-select: none; -webkit-user-select: none; }
      }
      @media (min-width: 1200px) {
        .side-panel { display: flex; }
        .desktop-layout { padding: 40px; }
      }
      .leaflet-control-zoom { border: 0 !important; margin: 0 22px 80px 0 !important; border-radius: 12px !important; box-shadow: var(--shadow-md) !important; overflow: hidden; }
      .leaflet-control-zoom a { background: var(--background-screen) !important; color: var(--color-primary-text) !important; width: 40px !important; height: 40px !important; line-height: 40px !important; font-size: 16px !important; }
      .msg-signal-reference {
        background: rgba(0, 0, 0, 0.05);
        padding: 6px 10px;
        border-radius: 8px;
        margin-bottom: 6px;
        font-size: 12px;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 6px;
        border-inline-start: 3px solid var(--color-biete);
        color: inherit;
        opacity: 0.9;
        min-width: 0;
        max-width: 240px;
      }
      .msg-signal-reference svg { flex-shrink: 0; }
      .msg-signal-reference span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
      .mine .msg-signal-reference { background: rgba(255, 255, 255, 0.16); }
      .mine .msg-reply-box { background: rgba(255, 255, 255, 0.16); border-inline-start-color: #ffffff; color: #ffffff; }
      .mine .msg-link { color: #ffffff; }
      .msg-status { display: inline-flex; align-items: center; }
      .msg-status svg { vertical-align: middle; margin-bottom: 2px; }
      .msg-status.status-pending, .msg-status.status-sent, .msg-status.status-delivered { color: inherit; opacity: 0.65; }
      .msg-status.status-read { color: var(--color-biete); }
      .msg-status.status-failed { color: var(--color-red); font-weight: bold; }
      .contact-info p .msg-status { margin-right: 4px; vertical-align: -2px; }
      .contact-info p .msg-status svg { width: 13px; height: 13px; }
      .action-btn-sm {
        flex: 1; padding: 10px; font-size: 13px; font-weight: 600; border-radius: 12px;
        cursor: pointer; border: none; display: flex; align-items: center; justify-content: center; gap: 6px;
        transition: transform 0.1s;
      }
      .action-btn-sm:active { transform: scale(0.95); }
      .translate-note { font-size: 11px; font-style: italic; color: var(--color-secondary-text); }
      .translate-toggle { background: none; border: 0; padding: 0 2px; font-size: 11px; font-weight: 700; color: var(--color-brand); cursor: pointer; text-decoration: underline; }
      .translate-toggle:active { opacity: 0.6; }
      .action-btn-success { background-color: rgba(46, 204, 113, 0.15); color: var(--color-green); }
      .action-btn-danger { background-color: rgba(231, 76, 60, 0.15); color: var(--color-red); }
      .action-btn-info { background-color: rgba(37, 99, 235, 0.12); color: var(--color-brand); }
      .queue-row { display: flex; align-items: center; padding: 12px 20px; background: var(--background-screen); border-bottom: 1px solid var(--color-border); gap: 12px; }
      #connected-users-list { min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: calc(20px + var(--safe-bottom, 0px)); }
      #detail-queue-container .queue-row { padding: 12px 0; background: transparent; }
      .queue-identity { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; cursor: pointer; }
      .queue-details { display: flex; flex-direction: column; min-width: 0; }
      .queue-name { display: flex; align-items: center; min-width: 0; }
      .queue-name h4 { min-width: 0; }
      .queue-details p { margin: 2px 0 0 0; font-size: 11px; color: var(--color-secondary-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
      .empty-state-container { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 20px; color: var(--color-secondary-text); text-align: center; }
      .empty-state-container svg { width: 48px; height: 48px; opacity: 0.4; margin-bottom: 12px; }
      .msg-reply-box {
        background: rgba(0, 0, 0, 0.04); border-inline-start: 3.5px solid var(--color-brand);
        padding: 8px 12px; border-radius: 8px; margin-bottom: 8px; font-size: 12.5px;
        color: var(--color-secondary-text); cursor: pointer; text-align: left;
      }
      .bounce { animation: pop-in 0.35s ease forwards; }
      .msg-edited { font-size: 10px; opacity: 0.5; margin-left: 4px; font-style: italic; }
      .msg-link { color: var(--color-brand); text-decoration: underline; word-break: break-all; }
      .chat-mention { color: var(--color-brand); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
      .mine .chat-mention { color: #ffffff; opacity: 0.95; }
      .msg-link-previews { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
      .msg-link-preview {
        display: flex;
        flex-direction: column;
        background: var(--background-screen);
        border: 1px solid var(--color-border);
        border-radius: 10px;
        overflow: hidden;
        text-decoration: none;
        color: var(--color-primary-text);
        max-width: 340px;
        min-width: 0;
      }
      .msg-link-preview-img { width: 100%; height: 150px; object-fit: cover; object-position: center; background: var(--background-alt); display: block; flex-shrink: 0; }
      .msg-bubble .msg-link-preview-img { aspect-ratio: auto; margin-bottom: 0; border-radius: 0; }
      .msg-link-preview-body { min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 8px 10px 10px; }
      .msg-link-preview-title { font-size: 13px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
      .msg-link-preview-desc { font-size: 12px; color: var(--color-secondary-text); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
      .msg-link-preview-host { font-size: 11px; color: var(--color-secondary-text); text-transform: lowercase; }
      .forward-contact-item.selected { background-color: rgba(37, 99, 235, 0.08) !important; }
      .forward-contact-item.selected .forward-checkbox { background-color: var(--color-brand) !important; border-color: var(--color-brand) !important; }
      .forward-contact-item.selected .forward-checkbox svg { display: block !important; }
      #identity-screen {
        padding: calc(24px + var(--safe-top, 0px)) 24px calc(24px + var(--safe-bottom, 0px));
        z-index: 150;
        display: flex;
        flex-direction: column;
        overflow-y: auto;
        box-sizing: border-box;
      }
      #username-input,
      #handle-input {
        width: 100%;
        padding: 15px 16px;
        border-radius: 14px;
        border: 1px solid var(--color-border);
        background: var(--background-alt);
        color: var(--color-primary-text);
        font-size: 16px;
        text-align: left;
        font-weight: 600;
        box-shadow: inset 0 1px 2px rgba(0,0,0,0.03);
      }
      .handle-field::before {
        content: "#";
        position: absolute;
        left: 13px;
        top: 50%;
        transform: translateY(-50%);
        font-weight: 600;
        color: var(--color-secondary-text);
        pointer-events: none;
      }
      #username-step .handle-field input {
        padding-inline-start: 32px;
      }
      .mode-chip {
        flex: 1;
        padding: 9px 12px;
        border-radius: 11px;
        border: 1px solid var(--color-border);
        background: transparent;
        color: var(--color-secondary-text);
        font-size: 13px;
        font-weight: 600;
      }
      .mode-chip.active {
        background: var(--color-brand);
        border-color: var(--color-brand);
        color: #fff;
      }
      #secret-text-input {
        width: 100%;
        box-sizing: border-box;
        text-align: left;
        padding: 14px 44px 14px 16px;
        border-radius: 14px;
        border: 1px solid var(--color-border);
        background: var(--background-alt);
        color: var(--color-primary-text);
        font-size: 16px;
        transition: all 0.2s ease;
      }
      #edit-name-input {
        width: 100%;
        padding: 12px;
        border-radius: 12px;
        border: 1px solid var(--color-border);
        margin: 20px 0;
        text-align: center;
        font-size: 16px;
        background: var(--background-alt);
        color: var(--color-primary-text);
      }
      #edit-bio-input {
        width: 100%;
        padding: 12px;
        border-radius: 12px;
        border: 1px solid var(--color-border);
        margin-bottom: 20px;
        font-size: 16px;
        font-family: inherit;
        background: var(--background-alt);
        color: var(--color-primary-text);
        resize: none;
        min-height: 100px;
        max-height: 200px;
      }
      #edit-birthday-input, #donation-input {
        display: block;
        width: 100%;
        min-height: 46px;
        padding: 12px;
        border-radius: 12px;
        border: 1px solid var(--color-border);
        background: var(--background-alt);
        color: var(--color-primary-text);
        font-family: inherit;
        font-size: 16px;
      }
      #donation-input { margin-top: 8px; text-align: center; }
      .date-field { position: relative; }
      .date-field input { min-width: 0; }
      @supports (-webkit-touch-callout: none) { .date-field input { -webkit-appearance: none; appearance: none; } }
      .date-field-hint { position: absolute; left: 13px; right: 13px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--color-secondary-text); font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
      #schedule-weekly-config .date-field-hint, #schedule-event-config .date-field-hint { left: 11px; right: 32px; font-size: 13px; }
      .date-field:has(input:valid) .date-field-hint, .date-field input:focus + .date-field-hint { display: none; }
      .date-field input:not(:valid):not(:focus)::-webkit-datetime-edit,
      .date-field input:not(:valid):not(:focus)::-webkit-datetime-edit-text,
      .date-field input:not(:valid):not(:focus)::-webkit-datetime-edit-month-field,
      .date-field input:not(:valid):not(:focus)::-webkit-datetime-edit-day-field,
      .date-field input:not(:valid):not(:focus)::-webkit-datetime-edit-year-field,
      .date-field input:not(:valid):not(:focus)::-webkit-datetime-edit-hour-field,
      .date-field input:not(:valid):not(:focus)::-webkit-datetime-edit-minute-field,
      .date-field input:not(:valid):not(:focus)::-webkit-datetime-edit-ampm-field { color: transparent; -webkit-text-fill-color: transparent; }
      @supports not selector(::-webkit-datetime-edit) {
        .date-field-hint { display: none; }
      }
      .date-field input::-webkit-date-and-time-value { text-align: left; }
      #schedule-weekly-config input,
      #schedule-event-config input {
        width: 100%;
        max-width: 100%;
        min-height: 44px;
        padding: 10px;
        border-radius: 8px;
        border: 1px solid var(--color-border);
        background: var(--background-alt);
        color: var(--color-primary-text);
        font-family: inherit;
        font-size: 16px;
        box-sizing: border-box;
      }
      .schedule-input-col { flex: 1 1 140px; min-width: 0; }
      .schedule-input-col label { font-size: 12px; color: var(--color-secondary-text); }
      .schedule-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
      #view-forward { display: flex; flex-direction: column; background: var(--background-screen); overflow: hidden; }
      #forward-contacts-list { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: 8px; }
      .forward-preview-strip { display: flex; align-items: center; gap: 12px; padding: 12px 18px 4px; flex-shrink: 0; }
      .forward-preview-icon { width: 36px; height: 36px; border-radius: 10px; background: rgba(37,99,235,.12); color: var(--color-brand); display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
      .forward-preview-icon.biete { background: rgba(245,158,11,.14); }
      .forward-preview-icon.suche { background: rgba(2,132,199,.14); }
      .forward-preview-icon.donation { background: rgba(16,185,129,.14); }
      .forward-preview-icon.crisis { background: rgba(239,68,68,.14); }
      .forward-preview-info { flex: 1; min-width: 0; }
      .forward-preview-title { font-size: 13.5px; font-weight: 700; color: var(--color-primary-text); }
      .forward-preview-snippet { font-size: 12px; color: var(--color-secondary-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
      .forward-search-wrapper { padding: 8px 16px; background: var(--background-screen); flex-shrink: 0; }
      .forward-chips-row { display: flex; gap: 8px; padding: 8px 16px; overflow-x: auto; background: var(--background-alt); border-bottom: 1px solid var(--color-border); flex-shrink: 0; scrollbar-width: none; }
      .forward-chips-row::-webkit-scrollbar { display: none; }
      .forward-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; background: var(--background-screen); border: 1px solid var(--color-border); border-radius: 9999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
      .forward-chip.pop { animation: pop-in .2s ease; }
      .forward-chip img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
      .forward-chip-remove { border: none; background: none; color: var(--color-secondary-text); cursor: pointer; padding: 0 2px; font-size: 14px; line-height: 1; }
      .forward-checkbox { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--color-border); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: white; background: transparent; }
      .forward-checkbox svg { display: none; }
      .forward-bottom-container { flex-shrink: 0; background: var(--background-screen); border-top: 1px solid var(--color-border); }
      #view-forward.share-target-mode .forward-checkbox, #view-forward.share-target-mode .forward-caption-wrapper, #view-forward.share-target-mode #btn-submit-forward { display: none; }
      .forward-caption-wrapper { padding: 10px 16px 0; }
      .forward-caption-wrapper input { width: 100%; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--color-border); background: var(--background-alt); color: var(--color-primary-text); font-size: 16px; outline: none; }
      .forward-caption-wrapper input:focus { border-color: var(--color-brand); }
      .forward-bottom-bar { padding: 10px 16px calc(10px + var(--safe-bottom, 0px)); display: flex; gap: 12px; }
      .forward-bottom-bar button { padding: 12px; font-size: 15px; }
      #tribe-info-modal {
        z-index: 6000;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        background: rgba(0, 0, 0, 0.6);
        padding: 0;
      }
      #tribe-info-modal .modal {
        width: 100%;
        max-width: 480px;
        min-height: 100%;
        height: 100%;
        padding: calc(36px + var(--safe-top, 0px)) 24px calc(48px + var(--safe-bottom, 0px));
        text-align: left;
        border-radius: 0;
        box-shadow: none;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        margin: auto;
        position: relative;
      }
      .onboarding-step-icon {
        font-size: 24px;
        line-height: 1;
        padding: 10px 0;
        border-radius: 14px;
        flex-shrink: 0;
        width: 48px;
        text-align: center;
      }
      #image-full-modal { position: absolute; inset: 0; z-index: 4000; padding: 0; overflow: hidden; background: #05070c; }
      .iv-header {
        position: absolute; top: 0; left: 0; right: 0; z-index: 20;
        display: flex; align-items: center; gap: 10px;
        height: calc(60px + var(--safe-top, 0px)); padding: var(--safe-top, 0px) 18px 0; box-sizing: border-box;
        background: linear-gradient(180deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.4) 70%, transparent);
        transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s;
      }
      .iv-header.hidden { transform: translateY(-100%); opacity: 0; pointer-events: none; }
      .iv-title { flex: 1; min-width: 0; color: #fff; }
      .iv-title strong { display: block; font-size: 15px; font-weight: 700; line-height: 1.25; }
      .iv-title span { display: block; font-size: 11.5px; color: rgba(255, 255, 255, 0.68); line-height: 1.25; margin-top: 1px; }
      .iv-actions { display: none; align-items: center; gap: 8px; flex-shrink: 0; }
      .iv-actions.show { display: flex; animation: fadeIn 0.18s ease; }
      .iv-btn {
        width: 40px; height: 40px; flex-shrink: 0;
        display: flex; align-items: center; justify-content: center; padding: 0;
        color: #fff; background: rgba(255, 255, 255, 0.16);
        border: 1px solid rgba(255, 255, 255, 0.22); border-radius: 50%;
        cursor: pointer; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
        transition: background 0.15s, transform 0.1s;
      }
      .iv-btn:hover { background: rgba(255, 255, 255, 0.26); }
      .iv-btn:active { transform: scale(0.9); }
      #iv-list-view {
        position: absolute; inset: 0; z-index: 5;
        overflow-y: auto; -webkit-overflow-scrolling: touch;
        display: none; flex-direction: column; align-items: center; gap: 16px;
        padding: calc(70px + var(--safe-top, 0px)) 12px calc(20px + var(--safe-bottom, 0px)); box-sizing: border-box;
      }
      .iv-card {
        position: relative; width: 100%; max-width: 520px;
        display: flex; align-items: center; justify-content: center;
        cursor: pointer;
      }
      .iv-card.group-start { margin-top: 14px; }
      .iv-card-inner { position: relative; display: inline-flex; max-width: 100%; }
      .iv-card img { max-width: 100%; max-height: 72vh; max-height: 72dvh; width: auto; height: auto; display: block; border-radius: 12px; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.55); user-select: none; -webkit-user-select: none; -webkit-user-drag: none; -webkit-touch-callout: none; }
      .iv-card video { max-width: 100%; max-height: 72dvh; display: block; border-radius: 12px; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.55); background: #000; pointer-events: none; }
      .iv-card.selected .iv-card-inner::after { content: ""; position: absolute; inset: 0; border-radius: 12px; border: 3px solid var(--color-brand); background: rgba(37, 99, 235, 0.28); pointer-events: none; }
      .iv-check { position: absolute; top: 8px; left: 8px; width: 22px; height: 22px; border-radius: 50%; background: var(--color-brand); color: #fff; display: flex; align-items: center; justify-content: center; opacity: 0; transform: scale(0); transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s; z-index: 10; pointer-events: none; }
      .iv-card.selected .iv-check { opacity: 1; transform: scale(1); }
      #image-viewer-stage {
        position: absolute; inset: 0;
        display: flex; align-items: center; justify-content: center;
        overflow: hidden; touch-action: none; cursor: grab;
      }
      #image-viewer-stage.is-zoomed { cursor: move; }
      #image-viewer-stage:active { cursor: grabbing; }
      #image-full-display { max-width: 100vw; max-height: 100dvh; object-fit: contain; background: transparent; pointer-events: none; transform-origin: center center; will-change: transform; }
      #image-full-display.iv-anim { transition: transform 0.22s cubic-bezier(0.32, 0.72, 0, 1); }
      #image-full-display.is-vector { width: min(70%, 360px); height: auto; }
      #iv-video { max-width: 100vw; max-height: 100dvh; background: #000; }
      .iv-card img.is-vector { width: min(66vw, 300px); height: auto; }
      #image-full-info {
        position: absolute; bottom: calc(18px + var(--safe-bottom, 0px)); left: 50%; transform: translateX(-50%);
        z-index: 10; width: min(92vw, 480px); max-height: 25vh; overflow-y: auto; padding: 12px 16px;
        border-radius: 14px; background: rgba(15, 23, 42, 0.88); border: 1px solid rgba(255, 255, 255, 0.15);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
        color: #fff; text-align: left; display: none;
      }
      #image-full-info p { margin: 0; font-size: 13px; line-height: 1.45; color: rgba(255, 255, 255, 0.85); word-wrap: break-word; white-space: pre-wrap; }
      #image-full-info a { color: #38bdf8; text-decoration: underline; }
      #iv-crop { position: absolute; inset: 0; z-index: 15; pointer-events: none; }
      #iv-crop-frame {
        position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
        box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.62); outline: 1.5px solid rgba(255, 255, 255, 0.9);
        background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.3) 1px, transparent 1px), linear-gradient(0deg, rgba(255, 255, 255, 0.3) 1px, transparent 1px);
        background-size: 33.334% 33.334%; background-position: -1px -1px;
      }
      #iv-crop-panel {
        position: absolute; left: 0; right: 0; bottom: 0; pointer-events: auto;
        display: flex; flex-direction: column; gap: 12px;
        padding: 24px 18px calc(14px + var(--safe-bottom, 0px));
        background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent);
      }
      #iv-crop-pills { display: flex; gap: 8px; justify-content: center; }
      .iv-crop-pill {
        padding: 6px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
        color: #fff; background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.22); cursor: pointer;
      }
      .iv-crop-pill.selected { background: var(--color-brand); border-color: transparent; }
      .iv-crop-actions { display: flex; gap: 10px; }
      .iv-crop-actions .action-button { flex: 1; width: auto; padding: 13px 16px; font-size: 15px; }
      .iv-crop-actions .btn-outline { background: rgba(255, 255, 255, 0.16); color: #fff; border-color: rgba(255, 255, 255, 0.22); }
      .iv-crop-actions .btn-outline:active { background: rgba(255, 255, 255, 0.28); }
      .image-preview-area img[data-click] { cursor: pointer; }
      .image-preview-area img[data-click]:active { opacity: 0.7; }
      @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
      @keyframes modalPop { from { opacity: 0; transform: scale(0.96) translateY(6px); } to { opacity: 1; transform: scale(1) translateY(0); } }
      @keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.3; } 100% { opacity: 1; } }
      @keyframes pulse-active { 0% { transform: scale(1); } 50% { transform: scale(1.15); } 100% { transform: scale(1); } }
      @keyframes tap-halo { 0% { transform: scale(1); opacity: 0.85; } 70%, 100% { transform: scale(1.55); opacity: 0; } }
      @keyframes tap-bump { 0% { transform: scale(1); } 20% { transform: scale(0.9); } 100% { transform: scale(1); } }
      @keyframes pop-in { 0% { transform: scale(0); } 55% { transform: scale(1.15); } 75% { transform: scale(0.92); } 100% { transform: scale(1); } }
      @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
      @keyframes skeleton-loading { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
      @keyframes float { 0% { transform: translateY(0px); } 50% { transform: translateY(-8px); } 100% { transform: translateY(0px); } }
      .flex { display: flex; }
      .flex-col { display: flex; flex-direction: column; }
      .items-center { align-items: center; }
      .justify-center { justify-content: center; }
      .justify-between { justify-content: space-between; }
      .flex-1 { flex: 1; }
      .gap-6 { gap: 6px; }
      .gap-8 { gap: 8px; }
      .gap-10 { gap: 10px; }
      .gap-12 { gap: 12px; }
      .gap-16 { gap: 16px; }
      .gap-20 { gap: 20px; }
      .w-full { width: 100%; }
      .text-center { text-align: center; }
      .mt-auto { margin-top: auto; }
      .animate-spin { animation: spin 1s linear infinite; }
      .life-sorting-pill {
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        color: var(--color-brand);
        background: rgba(37,99,235,0.08);
        padding: 3px 8px;
        border-radius: 6px;
      }
      .sorting-card {
        display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px;
        border-radius: 16px; border: 1px solid var(--color-border);
        background: var(--background-alt); cursor: pointer; transition: transform 0.12s ease, border-color 0.15s ease;
        text-align: left; width: 100%; box-sizing: border-box;
      }
      .sorting-card:hover { border-color: var(--color-brand); }
      .sorting-card:active { transform: scale(0.98); }
      .sorting-card.give:hover { border-color: var(--color-biete); }
      .sorting-card.seek:hover { border-color: var(--color-suche); }
      .sorting-icon { font-size: 24px; line-height: 1; flex-shrink: 0; margin-top: 1px; }
      .sorting-card h4 { font-size: 14px; font-weight: 600; margin: 0 0 3px; color: var(--color-primary-text); }
      .sorting-card p { font-size: 12px; margin: 0 0 6px; color: var(--color-secondary-text); line-height: 1.4; }
      .sorting-link { font-size: 12px; font-weight: 600; color: var(--color-brand); }

      /* ===== Calls ===== */
      #call-view { position: absolute; inset: 0; z-index: 9000; background: #0a0e16; color: #fff; display: flex; overflow: hidden; }
      #call-remote-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #0a0e16; transform-origin: center center; touch-action: none; }
      #call-remote-video.zoomed { cursor: grab; }
      #call-zoom-chip { position: absolute; top: calc(58px + var(--safe-top)); left: 14px; z-index: 9; padding: 5px 11px; border-radius: 999px; border: none; background: rgba(15,23,42,0.72); color: #fff; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
      #call-remote-audio { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
      .chat-cut-row { display: flex; align-items: center; gap: 10px; margin: 10px 16px; color: var(--color-secondary-text); font-size: 12px; }
      .chat-cut-row::before, .chat-cut-row::after { content: ""; flex: 1; border-top: 1px dashed currentColor; opacity: 0.6; }
      .chat-cut-row[data-click] { cursor: pointer; }
      .msg-media-expired { font-size: 12px; font-style: italic; color: var(--color-secondary-text); margin-bottom: 4px; }
      #call-avatar-wrap { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 0 24px; text-align: center; }
      #call-peer-avatar { width: 118px; height: 118px; border-radius: 50%; object-fit: cover; background: #111827; border: 3px solid rgba(255,255,255,0.14); box-shadow: 0 12px 30px rgba(0,0,0,0.5); }
      #call-view.ai-call #call-peer-avatar { transform: scale(var(--ai-pulse, 1)); transition: transform 90ms linear; }
      #call-view.ai-call.thinking #call-peer-avatar { animation: ai-think 2.4s ease-in-out infinite; }
      @keyframes ai-think { 0%, 100% { transform: scale(1); opacity: 0.85; } 50% { transform: scale(1.06); opacity: 1; } }
      #call-peer-name { font-size: 21px; font-weight: 700; }
      #call-status { font-size: 13.5px; color: #94a3b8; font-variant-numeric: tabular-nums; }
      #call-caption { display: none; max-width: 100%; font-size: 13px; line-height: 1.45; color: #cbd5e1; }
      #call-view.ai-call #call-caption { display: block; }
      #call-view.mini #call-caption { display: none; }
      #call-local-video { position: absolute; top: calc(58px + var(--safe-top)); right: 14px; width: 104px; height: 150px; border-radius: 14px; object-fit: cover; z-index: 5; background: #111827; border: 1.5px solid rgba(255,255,255,0.25); box-shadow: 0 8px 22px rgba(0,0,0,0.5); }
      #call-local-video.mirror { transform: scaleX(-1); }
      #call-share-canvas { position: fixed; left: 0; top: 0; width: 8px; height: 8px; opacity: 0.01; pointer-events: none; }
      .call-top { position: absolute; top: 0; left: 0; right: 0; z-index: 8; display: flex; align-items: center; justify-content: space-between; padding: calc(10px + var(--safe-top)) 14px 10px; background: linear-gradient(180deg, rgba(0,0,0,0.6), transparent); font-size: 10.5px; letter-spacing: 0.05em; text-transform: uppercase; color: rgba(255,255,255,0.65); font-weight: 700; }
      .call-controls { position: absolute; bottom: 0; left: 0; right: 0; z-index: 8; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; padding: 18px 16px calc(24px + var(--safe-bottom)); background: linear-gradient(0deg, rgba(0,0,0,0.85), rgba(0,0,0,0.3) 60%, transparent); }
      .call-ctl { width: 52px; height: 52px; border-radius: 50%; border: none; background: rgba(255,255,255,0.16); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); transition: transform 0.1s, background-color 0.15s; }
      .call-ctl:active { transform: scale(0.9); }
      .call-ctl svg { width: 22px; height: 22px; }
      .call-ctl .i-off { display: none; }
      .call-ctl.active { background: #fff; color: #0f172a; }
      .call-ctl.active .i-on { display: none; }
      .call-ctl.active .i-off { display: block; }
      .call-ctl.danger { background: #ef4444; }
      .call-ctl.accept { background: #10b981; }
      .call-ctl.busy { animation: pulse 0.9s ease-in-out infinite; }
      .call-quality { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; font-size: 10px; font-weight: 700; letter-spacing: 0.03em; text-transform: none; }
      .call-quality::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
      .call-quality.fair { color: #fbbf24; }
      .call-quality.poor { color: #f87171; }
      .call-top-center { display: flex; flex-direction: column; align-items: center; min-width: 0; }
      .visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
      #call-view.mini { inset: auto 14px calc(78px + var(--safe-bottom)) auto; width: 108px; height: 158px; border-radius: 16px; z-index: 9600; cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; will-change: transform; box-shadow: 0 14px 32px rgba(0,0,0,0.6), 0 0 0 1.5px rgba(255,255,255,0.18); }
      #call-view.mini .call-top, #call-view.mini .call-controls, #call-view.mini #call-local-video, #call-view.mini #call-status, #call-view.mini #call-zoom-chip { display: none; }
      #call-view.mini #call-remote-video { object-fit: cover !important; }
      #call-view.mini #call-peer-avatar { width: 54px; height: 54px; }
      #call-mini-mute { display: none; position: absolute; top: 7px; right: 7px; z-index: 9; width: 24px; height: 24px; border-radius: 50%; background: #ef4444; color: #fff; }
      #call-mini-mute::before { width: 13px; height: 13px; }
      #call-view.mini.muted #call-mini-mute { display: inline-flex; }
      #call-view.mini #call-peer-name { font-size: 12px; }
      #incoming-call { position: absolute; top: calc(12px + var(--safe-top)); left: 12px; right: 12px; z-index: 9700; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 20px; background: rgba(15,23,42,0.96); border: 1px solid rgba(255,255,255,0.12); box-shadow: 0 18px 40px -10px rgba(0,0,0,0.6); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); animation: callDrop 0.3s cubic-bezier(0.16,1,0.3,1); }
      @keyframes callDrop { from { transform: translateY(-120%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
      #incoming-call .incoming-main { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
      #incoming-call .incoming-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
      #incoming-call img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 2px solid var(--color-brand, #2563eb); }
      #incoming-call .incoming-text { flex: 1; min-width: 0; }
      #incoming-call .incoming-text b { display: block; color: #fff; font-size: 15px; }
      #incoming-call .incoming-text span { color: #94a3b8; font-size: 12px; }
      #incoming-call.full { position: absolute; inset: 0; z-index: 9900; flex-direction: column; justify-content: center; gap: 30px; padding: calc(40px + var(--safe-top)) 24px calc(40px + var(--safe-bottom)); border: 0; border-radius: 0; background: radial-gradient(circle at 50% 16%, rgba(37,99,235,0.25), transparent 62%), #0b1220; animation: callFade 0.25s ease-out; }
      #incoming-call.full .incoming-main { flex: 0 1 auto; flex-direction: column; text-align: center; gap: 14px; }
      #incoming-call.full img { width: 132px; height: 132px; border-width: 3px; }
      #incoming-call.full .incoming-text b { font-size: 24px; }
      #incoming-call.full .incoming-text span { font-size: 14px; }
      #incoming-call.full .incoming-actions { gap: 64px; }
      #incoming-call.full .call-ctl { width: 68px; height: 68px; }
      #incoming-call.full .call-ctl svg { width: 28px; height: 28px; }
      @keyframes callFade { from { opacity: 0; } to { opacity: 1; } }
.ai-status {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-secondary-text);
  margin-bottom: 4px;
}
.ai-status:empty { display: none; }
.ai-status:not(:empty) { animation: aiBreath 1.6s ease-in-out infinite; }
.ai-spin { width: 20px; height: 20px; margin: 0 auto; border: 2px solid var(--color-border); border-top-color: var(--color-brand); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes aiBreath { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
.ai-trail-line { font-size: 11.5px; color: var(--color-secondary-text); line-height: 1.5; }
#ai-heard .msg-bubble { opacity: 0.6; }
.ai-trail-line::before { content: "· "; }
.ai-form { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.ai-form-title { font-size: 13px; font-weight: 600; }
.ai-form-field { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; }
.ai-form-field input, .ai-form-field select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  background: var(--background-screen);
  color: var(--color-primary-text);
  font-size: 13px;
}
.ai-form-check { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; }
.ai-form-check input { margin-top: 2px; }


.ai-form-progress { height: 4px; border-radius: 2px; background: var(--color-border); overflow: hidden; margin-bottom: 8px; }
.ai-form-progress > div { height: 100%; background: var(--color-brand); transition: width .2s ease; }

#file-drop-overlay {
  position: fixed;
  inset: 0;
  z-index: 10150;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.45);
  pointer-events: none;
}
body.file-dragging #file-drop-overlay { display: flex; }
.file-drop-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 16px;
  border: 2px dashed var(--color-brand);
  background: var(--background-screen);
  color: var(--color-primary-text);
  font-size: 15px;
  font-weight: 600;
  box-shadow: var(--shadow-md);
}
.contact-item.file-drop-target { outline: 2px dashed var(--color-brand); outline-offset: -2px; }

      @media (prefers-contrast: more) {
        :root { --color-secondary-text: var(--color-primary-text); }
      }
      @media (prefers-reduced-motion: reduce) {
        *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
      }

      /* Latin tokens stay their own run inside RTL paragraphs: handles, times, distances. */
      [dir="rtl"] .msg-time, [dir="rtl"] .audio-time, [dir="rtl"] .feed-meta, [dir="rtl"] .search-handle-tag,
      [dir="rtl"] .file-meta, [dir="rtl"] .contact-handle, [dir="rtl"] .item-time, [dir="rtl"] .feed-time { unicode-bidi: plaintext; }
      /* A clock inside an RTL preview line must not jump in front of its own AM/PM marker. */
      [dir="rtl"] .contact-info p b, [dir="rtl"] .feed-item b, [dir="rtl"] .signal-item b, [dir="rtl"] .msg-meta b { unicode-bidi: isolate; direction: ltr; }
