  #chat-app *,
  #chat-app *::before,
  #chat-app *::after {
    box-sizing: border-box;
  }

  #chat-main button {
    border: none;
    background: none;
    font-family: inherit;
    cursor: pointer;
    color: inherit;
  }

  :root {
    --card-todo-bg: #FDF7F3;
    --card-email-bg: #F5FAF7;
    --card-calendar-bg: #F5F7FC;
    --avatar-dark: #3A2E42;
    --chat-send-from: var(--rose-dark, #9B6050);
    --chat-send-to: var(--rose-dark, #9B6050);
    --chat-send-hover-from: color-mix(in srgb, var(--rose-dark, #9B6050) 92%, var(--white, #FFFEFB));
    --chat-send-hover-to: var(--rose-dark, #9B6050);
  }

  .bb-lang-list {
    min-width: 160px;
    padding: 6px 0;
    border: 1px solid rgba(228, 220, 212, 0.6);
    border-radius: 12px;
    background: rgba(255, 254, 251, 0.96);
    box-shadow: 0 8px 24px rgba(92, 77, 67, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: fixed;
    z-index: 200; /* --z-dropdown */
  }

  .bb-lang-list[hidden] {
    display: none !important;
  }

  .bb-lang-option {
    display: block;
    width: 100%;
    padding: 8px 16px;
    border: 0;
    background: transparent;
    color: var(--warm-text, #5C4D43);
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.4;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
  }

  .bb-lang-option:hover {
    background: rgba(212, 168, 154, 0.10);
  }

  .bb-lang-option.bb-lang-active {
    color: var(--rose-dark, #9B6050);
    font-weight: var(--font-weight-semibold);
  }


  html, body {
    height: 100%;
    font-family: var(--font-family);
    background: var(--cream);
    color: var(--warm-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  .app {
    display: flex;
    height: 100vh;
    position: relative;
    background:
      radial-gradient(ellipse at 74% 18%, rgba(212, 168, 154, 0.055) 0%, transparent 48%),
      radial-gradient(ellipse at 22% 86%, rgba(168, 197, 184, 0.045) 0%, transparent 48%),
      linear-gradient(180deg, var(--cream, #FAF7F3) 0%, var(--pill-bg, #F0EAE4) 100%);
  }

  .app::before {
    content: none;
    display: none;
    background-image: none;
  }

  [data-theme="dark"] .app::before {
    display: none;
    background-image: none;
  }

  .main {
    flex: 1;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    background: transparent;
    position: relative;
  }

  .main::before {
    content: '';
    position: absolute;
    top: -120px;
    right: -80px;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    border: 1px solid rgba(212, 168, 154, 0.16);
    pointer-events: none;
  }

  .main::after {
    content: '';
    position: absolute;
    top: -160px;
    right: -120px;
    width: 580px;
    height: 580px;
    border-radius: 50%;
    border: 1px solid rgba(212, 168, 154, 0.10);
    pointer-events: none;
  }

  .decorative-arcs {
    position: absolute;
    top: -200px;
    right: -160px;
    width: 660px;
    height: 660px;
    border-radius: 50%;
    border: 1px solid rgba(212, 168, 154, 0.12) !important;
    pointer-events: none;
  }

  .decorative-arcs-2 {
    position: absolute;
    top: -80px;
    right: -40px;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    border: 1px solid rgba(212, 168, 154, 0.26) !important;
    pointer-events: none;
  }

  .decorative-arcs-bl {
    position: absolute;
    bottom: -190px;
    left: 38px;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    border: 1px solid rgba(168, 197, 184, 0.09);
    pointer-events: none;
  }

  .content {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 40px 100px;
  }

  .content {
    padding-top: 48px;
  }

  .greeting {
    text-align: center;
    margin-bottom: 32px;
  }

  .greeting h1 {
    font-family: var(--font-family);
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-6xl);
    color: var(--warm-text);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
  }

  .greeting p {
    font-family: var(--font-family);
    font-style: italic;
    font-size: var(--font-size-base);
    color: var(--muted);
    line-height: 1.6;
  }

  .input-wrapper {
    position: relative;
    margin: 0 auto 24px;
    max-width: 720px;
  }

  .input-glow {
    position: absolute;
    inset: -16px;
    border-radius: 38px;
    background: radial-gradient(ellipse at center, rgba(212, 168, 154, 0.12) 0%, transparent 65%);
    pointer-events: none;
  }

  .input-card {
    position: relative;
    background: var(--white);
    border-radius: var(--radius-card, 18px);
    padding: 16px 20px;
    border: 1px solid rgba(228, 220, 212, 0.6);
    box-shadow:
      0 2px 8px rgba(92, 77, 67, 0.06),
      0 8px 32px rgba(92, 77, 67, 0.04);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
  }

  .input-card:focus-within {
    border-color: rgba(212, 168, 154, 0.3);
    box-shadow: none;
  }

  .input-card .chat-input-field {
    width: 100%;
    border: none;
    outline: 2px solid transparent;
    outline-offset: 2px;
    font-family: var(--font-family);
    font-style: normal;
    font-size: var(--font-size-lg);
    color: var(--warm-text);
    background: transparent;
    margin-bottom: 0;
  }

  .input-card .chat-input-field::placeholder {
    color: var(--muted);
    opacity: 1;
    font-family: var(--font-family);
  }

  .input-card .chat-empty-input-area,
  .input-card .chat-input-box {
    display: flex;
    flex-direction: column;
    width: 100%;
  }

  .input-card .chat-input-box {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
  }

  .input-card .chat-file-preview {
    margin-bottom: 0;
    padding-left: 14px;
    padding-right: 14px;
  }

  .input-card textarea.chat-input-field {
    display: block;
    min-height: 32px !important;
    height: 32px;
    max-height: 180px;
    padding: 4px 14px !important;
    resize: none;
    line-height: 1.4;
    overflow-y: hidden;
  }

  /* Quill welcome composer (#chat-direct-input) — contenteditable replacing the old <textarea>
     to match the real app composer contract (#496). */
  .input-card #chat-direct-input.ql-container {
    display: block;
    box-sizing: border-box;
    width: 100%;
    height: auto !important;
    overflow: visible !important;
    border: none;
    font-family: var(--font-family);
    font-size: var(--font-size-lg);
    color: var(--warm-text);
  }
  .input-card #chat-direct-input .ql-editor {
    position: relative;
    min-height: 32px;
    max-height: 180px;
    padding: 4px 14px;
    line-height: 1.4;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-y: auto;
    outline: none;
    -webkit-user-select: text;
    user-select: text;
  }
  .input-card #chat-direct-input .ql-editor.ql-blank::before {
    content: attr(data-placeholder);
    position: absolute;
    left: 14px;
    right: 14px;
    color: var(--muted);
    font-style: normal;
    font-family: var(--font-family);
    pointer-events: none;
  }
  .input-card #chat-direct-input .ql-editor p {
    margin: 0;
    padding: 0;
  }
  .input-card #chat-direct-input .ql-clipboard {
    position: absolute;
    left: -100000px;
    height: 1px;
    width: 1px;
    overflow: hidden;
  }

  .input-card textarea.chat-input-field,
  .input-card #chat-direct-input .ql-editor {
    scrollbar-width: thin;
    scrollbar-color: rgba(110, 138, 126, 0.22) transparent;
  }

  .input-card textarea.chat-input-field::-webkit-scrollbar,
  .input-card #chat-direct-input .ql-editor::-webkit-scrollbar {
    width: 5px;
    height: 5px;
  }

  .input-card textarea.chat-input-field::-webkit-scrollbar-track,
  .input-card #chat-direct-input .ql-editor::-webkit-scrollbar-track {
    background: transparent;
  }

  .input-card textarea.chat-input-field::-webkit-scrollbar-button,
  .input-card #chat-direct-input .ql-editor::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
  }

  .input-card textarea.chat-input-field::-webkit-scrollbar-thumb,
  .input-card #chat-direct-input .ql-editor::-webkit-scrollbar-thumb {
    background: rgba(110, 138, 126, 0.22);
    border: 1px solid transparent;
    border-radius: 999px;
    background-clip: content-box;
  }

  .input-card textarea.chat-input-field::-webkit-scrollbar-thumb:hover,
  .input-card #chat-direct-input .ql-editor::-webkit-scrollbar-thumb:hover {
    background: rgba(110, 138, 126, 0.34);
    background-clip: content-box;
  }

  html[data-theme="dark"] .input-card textarea.chat-input-field,
  html[data-theme="dark"] .input-card #chat-direct-input .ql-editor,
  [data-theme="dark"] .input-card textarea.chat-input-field,
  [data-theme="dark"] .input-card #chat-direct-input .ql-editor {
    scrollbar-color: rgba(255, 254, 251, 0.18) transparent;
  }

  html[data-theme="dark"] .input-card textarea.chat-input-field::-webkit-scrollbar-thumb,
  html[data-theme="dark"] .input-card #chat-direct-input .ql-editor::-webkit-scrollbar-thumb,
  [data-theme="dark"] .input-card textarea.chat-input-field::-webkit-scrollbar-thumb,
  [data-theme="dark"] .input-card #chat-direct-input .ql-editor::-webkit-scrollbar-thumb {
    background: rgba(255, 254, 251, 0.18);
    background-clip: content-box;
  }

  html[data-theme="dark"] .input-card textarea.chat-input-field::-webkit-scrollbar-thumb:hover,
  html[data-theme="dark"] .input-card #chat-direct-input .ql-editor::-webkit-scrollbar-thumb:hover,
  [data-theme="dark"] .input-card textarea.chat-input-field::-webkit-scrollbar-thumb:hover,
  [data-theme="dark"] .input-card #chat-direct-input .ql-editor::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 254, 251, 0.28);
    background-clip: content-box;
  }

  .input-card .chat-input-box {
    overflow: visible;
  }

  .input-card .chat-input-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 40px;
    margin-top: 13px;
    padding: 0 !important;
  }

  .input-card .chat-input-toolbar-left,
  .input-card .chat-input-toolbar-right {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .input-card .chat-upload-btn {
    width: 44px;
    height: 44px !important;
    min-width: 44px;
    min-height: 44px !important;
    max-height: 44px;
    padding: 0 !important;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--cream);
    border: 1px solid var(--divider);
    color: var(--warm-text);
    transition: background 0.2s ease, border-color 0.2s ease;
  }

  .input-card .chat-upload-btn:hover {
    background: var(--rose-bg);
    border-color: var(--rose-light);
  }

  .input-card .chat-input-action {
    width: 44px;
    height: 44px !important;
    min-width: 44px;
    min-height: 44px !important;
    max-height: 44px;
    padding: 0 !important;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--warm-text-light);
    transition: background 0.2s ease, color 0.2s ease;
  }

  .input-card .chat-input-action:hover {
    background: var(--sage-bg);
    color: var(--warm-text);
  }

  .input-card .chat-send-btn {
    width: 44px;
    height: 44px !important;
    min-width: 44px;
    min-height: 44px !important;
    max-height: 44px;
    padding: 0 !important;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--rose);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(212, 168, 154, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  }

  .input-card .chat-send-btn:hover {
    background: var(--rose, #C99485);
    transform: scale(1.02);
    box-shadow: 0 6px 18px rgba(212, 168, 154, 0.45);
  }

  .input-card .chat-send-btn.is-empty {
    opacity: 0.35;
    box-shadow: none;
  }

  .chat-ny-prompt-area,
  .chat-prompt-area {
    position: relative;
    z-index: 10;
    max-width: 960px !important;
    margin: 0 auto 36px;
  }

  .quick-actions,
  .chat-prompt-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    max-width: 960px !important;
    margin-left: auto;
    margin-right: auto;
  }

  .quick-actions:empty,
  .chat-prompt-chips:empty {
    display: none;
  }

  .chat-ny-prompt-area .quick-action,
  .chat-ny-prompt-area .chat-prompt-chip,
  body:not(.chat-ny-in-conversation) .quick-action,
  body:not(.chat-ny-in-conversation) .chat-prompt-chip {
    min-height: 44px;
    padding: 11px 20px;
    border-radius: 20px;
    border: 1px solid rgba(228, 220, 212, 0.7) !important;
    background: rgba(255, 254, 251, 0.85) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    color: var(--warm-text);
    cursor: pointer;
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    line-height: 1.4;
    box-shadow:
      0 1px 4px rgba(92, 77, 67, 0.05),
      inset 0 1px 0 rgba(255, 255, 255, 0.5);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  }

  .quick-action:hover,
  .chat-prompt-chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(92, 77, 67, 0.08);
    border-color: rgba(212, 168, 154, 0.4);
    background: rgba(255, 254, 251, 0.95);
  }

  .chat-prompt-chip svg {
    width: 18px;
    height: 18px;
  }

  /* Generic chip: warm fallback for chips without data-color */
  .chat-prompt-chip {
    background: rgba(255, 254, 251, 0.86) !important;
    border: 1px solid rgba(228, 220, 212, 0.72) !important;
    color: var(--warm-text) !important;
  }

  /* Colored chips must come after the generic !important fallback. */
  .quick-action--rose,
  .chat-ny-prompt-area .quick-action--rose,
  body:not(.chat-ny-in-conversation) .quick-action--rose,
  .chat-prompt-chip[data-color="red"],
  .chat-prompt-chip[data-color="orange"],
  .chat-prompt-chip[data-color="pink"],
  .chat-ny-prompt-area .chat-prompt-chip[data-color="red"],
  .chat-ny-prompt-area .chat-prompt-chip[data-color="orange"],
  .chat-ny-prompt-area .chat-prompt-chip[data-color="pink"],
  body:not(.chat-ny-in-conversation) .chat-prompt-chip[data-color="red"],
  body:not(.chat-ny-in-conversation) .chat-prompt-chip[data-color="orange"],
  body:not(.chat-ny-in-conversation) .chat-prompt-chip[data-color="pink"] {
    background: rgba(251, 230, 224, 0.65) !important;
    border-color: rgba(212, 168, 154, 0.35) !important;
  }

  .quick-action--sage,
  .chat-ny-prompt-area .quick-action--sage,
  body:not(.chat-ny-in-conversation) .quick-action--sage,
  .chat-prompt-chip[data-color="green"],
  .chat-prompt-chip[data-color="yellow"],
  .chat-ny-prompt-area .chat-prompt-chip[data-color="green"],
  .chat-ny-prompt-area .chat-prompt-chip[data-color="yellow"],
  body:not(.chat-ny-in-conversation) .chat-prompt-chip[data-color="green"],
  body:not(.chat-ny-in-conversation) .chat-prompt-chip[data-color="yellow"] {
    background: rgba(230, 245, 238, 0.55) !important;
    border-color: rgba(160, 200, 180, 0.35) !important;
  }

  .quick-action--slate,
  .chat-ny-prompt-area .quick-action--slate,
  body:not(.chat-ny-in-conversation) .quick-action--slate,
  .chat-prompt-chip[data-color="gray"],
  .chat-prompt-chip[data-color="blue"],
  .chat-prompt-chip[data-color="purple"],
  .chat-ny-prompt-area .chat-prompt-chip[data-color="gray"],
  .chat-ny-prompt-area .chat-prompt-chip[data-color="blue"],
  .chat-ny-prompt-area .chat-prompt-chip[data-color="purple"],
  body:not(.chat-ny-in-conversation) .chat-prompt-chip[data-color="gray"],
  body:not(.chat-ny-in-conversation) .chat-prompt-chip[data-color="blue"],
  body:not(.chat-ny-in-conversation) .chat-prompt-chip[data-color="purple"] {
    background: rgba(224, 232, 248, 0.50) !important;
    border-color: rgba(168, 176, 196, 0.35) !important;
  }

  .chat-prompt-chip:hover {
    background: rgba(251, 243, 240, 0.92) !important;
    border-color: rgba(212, 168, 154, 0.38) !important;
  }

  .chat-prompt-chip[data-color="red"]:hover,
  .chat-prompt-chip[data-color="orange"]:hover,
  .chat-prompt-chip[data-color="pink"]:hover {
    background: rgba(251, 230, 224, 0.95) !important;
    border-color: rgba(212, 168, 154, 0.5) !important;
  }

  .chat-prompt-chip[data-color="green"]:hover,
  .chat-prompt-chip[data-color="yellow"]:hover {
    background: rgba(230, 245, 238, 0.95) !important;
    border-color: rgba(160, 200, 180, 0.5) !important;
  }

  .chat-prompt-chip[data-color="gray"]:hover,
  .chat-prompt-chip[data-color="blue"]:hover,
  .chat-prompt-chip[data-color="purple"]:hover {
    background: rgba(234, 238, 248, 0.95) !important;
    border-color: rgba(168, 176, 196, 0.5) !important;
  }

  .chat-prompt-chip.chat-prompt-add,
  body:not(.chat-ny-in-conversation) .chat-prompt-chip.chat-prompt-add {
    background: transparent !important;
    border: 1.5px dashed rgba(110, 138, 126, 0.45) !important;
    color: #5F7A6F !important;
    font-weight: var(--font-weight-semibold) !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .chat-prompt-chip.chat-prompt-add svg {
    color: currentColor !important;
    opacity: 0.9;
  }

  .chat-prompt-chip.chat-prompt-add:hover,
  body:not(.chat-ny-in-conversation) .chat-prompt-chip.chat-prompt-add:hover {
    background: rgba(110, 138, 126, 0.08) !important;
    border-color: rgba(110, 138, 126, 0.7) !important;
    color: #4A7A68 !important;
  }

  .chat-prompt-panel {
    position: absolute;
    top: calc(100% + 12px);
    left: 20px;
    right: 20px;
    width: auto;
    transform: none;
    z-index: 100 !important;
    pointer-events: auto;
  }

  @media (max-width: 768px) {
    .chat-prompt-panel {
      position: fixed !important;
      top: auto !important;
      bottom: var(--mn-bar-height, 60px) !important;
      left: 0 !important;
      right: 0 !important;
      width: auto !important;
      height: auto !important;
      z-index: 9990 !important;
      background: transparent !important;
      box-shadow: none !important;
      transform: none !important;
      border-radius: 0 !important;
      pointer-events: auto;
    }
    .chat-prompt-panel::before {
      display: none !important;
    }
    .chat-prompt-panel-inner,
    .chat-prompt-panel-inner[data-color] {
      background: var(--color-card, #fff) !important;
      border-radius: 18px !important;
      max-height: min(60dvh, 440px);
      overflow-x: hidden;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      overscroll-behavior: contain;
      margin: 0 12px 8px !important;
      padding: 14px 16px calc(16px + env(safe-area-inset-bottom, 0px));
      box-shadow: 0 2px 20px rgba(92, 77, 67, 0.14), 0 0 0 1px rgba(228, 220, 212, 0.4) !important;
    }
  }

  .chat-prompt-panel-inner,
  .chat-prompt-panel-inner[data-color] {
    background: rgba(255, 254, 251, 1) !important;
    border: 1px solid rgba(228, 220, 212, 0.6);
    border-radius: var(--radius-card, 18px);
    box-shadow:
      0 24px 70px rgba(92, 77, 67, 0.12),
      0 4px 14px rgba(92, 77, 67, 0.06),
      inset 0 1px 0 rgba(255, 255, 255, 0.6);
    padding: 16px;
    overflow: visible;
    margin-bottom: 20px;
    backdrop-filter: blur(20px) saturate(1.6);
    -webkit-backdrop-filter: blur(20px) saturate(1.6);
  }

  .chat-prompt-panel-header {
    min-height: 42px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(228, 220, 212, 0.5);
  }

  .chat-prompt-icon-picker {
    display: grid;
    grid-template-columns: repeat(6, 38px);
    gap: 8px;
    align-items: center;
    margin-top: 10px;
  }

  .chat-prompt-icon-btn,
  .chat-prompt-color-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
  }

  .chat-prompt-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid rgba(92, 77, 67, 0.1);
    background: rgba(255, 254, 251, 0.86);
  }

  .chat-prompt-icon-btn.is-selected {
    background: var(--rose-bg);
    border-color: rgba(212, 168, 154, 0.55);
    box-shadow: 0 0 0 3px rgba(212, 168, 154, 0.16);
  }

  .chat-prompt-color-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
  }

  .chat-prompt-color-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid rgba(255, 254, 251, 0.95);
    box-shadow: 0 0 0 1px rgba(92, 77, 67, 0.12);
  }

  .chat-prompt-color-btn.is-selected {
    box-shadow: 0 0 0 3px rgba(212, 168, 154, 0.28);
  }

  .chat-prompt-form {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(228, 220, 212, 0.4);
  }

  .chat-prompt-panel-header + .chat-prompt-form {
    border-top: 0 !important;
  }

  .chat-prompt-form-input,
  .chat-prompt-form textarea {
    width: 100%;
    border: 1px solid rgba(228, 220, 212, 0.6);
    border-radius: 12px;
    background: rgba(255, 254, 251, 0.96);
    color: var(--warm-text);
    padding: 11px 12px;
  }

  .chat-prompt-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 14px;
  }

  .quick-action:active,
  .chat-prompt-chip:active {
    transform: scale(0.97) !important;
    box-shadow: 0 1px 3px rgba(92, 77, 67, 0.06);
    transition-duration: 0.08s;
  }

  .chat-prompt-panel-title {
    font-family: var(--font-family);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-medium);
    color: var(--warm-text);
  }

  .chat-prompt-panel-header svg {
    color: var(--warm-text-light);
  }

  .chat-prompt-header-action {
    border-radius: 10px;
    transition: all 0.15s ease;
  }

  .chat-prompt-header-action:hover {
    background: rgba(212, 168, 154, 0.12);
    color: var(--warm-text);
  }

  .chat-prompt-cat-delete:hover {
    background: rgba(184, 84, 80, 0.08);
    color: color-mix(in srgb, var(--rose-dark, #9B6050) 82%, var(--color-error, #ff3e1d) 18%);
  }

  .chat-prompt-panel-close {
    border-radius: 10px;
    width: 34px;
    height: 34px;
  }

  .chat-prompt-panel-close:hover {
    background: rgba(212, 168, 154, 0.10);
    color: var(--warm-text);
  }

  @keyframes promptPanelIn {
    from { opacity: 0; transform: translateY(-6px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }

  .chat-prompt-panel {
    animation: promptPanelIn 0.2s ease both;
  }

  .chat-prompt-panel-inner[data-color="red"],
  .chat-prompt-panel-inner[data-color="orange"],
  .chat-prompt-panel-inner[data-color="pink"] {
    background: rgba(251, 243, 240, 1) !important;
    border-color: rgba(232, 212, 206, 0.6);
  }

  .chat-prompt-panel-inner[data-color="green"],
  .chat-prompt-panel-inner[data-color="yellow"] {
    background: rgba(242, 248, 245, 1) !important;
    border-color: rgba(200, 221, 210, 0.6);
  }

  .chat-prompt-panel-inner[data-color="gray"],
  .chat-prompt-panel-inner[data-color="blue"],
  .chat-prompt-panel-inner[data-color="purple"] {
    background: rgba(248, 244, 240, 1) !important;
    border-color: rgba(228, 220, 212, 0.6);
  }

  .chat-prompt-item {
    border-bottom: 1px solid rgba(228, 220, 212, 0.35);
    border-radius: 10px;
    transition: all 0.15s ease;
  }

  .chat-prompt-item:last-child {
    border-bottom-color: transparent;
  }

  .chat-prompt-item:hover {
    background: rgba(212, 168, 154, 0.06);
    border-color: transparent;
  }

  .chat-prompt-suggestion-btn {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    color: var(--warm-text);
    height: 42px;
    padding: 11px 10px;
    border-radius: 10px;
  }

  .chat-prompt-arrow {
    color: var(--warm-text-light);
  }

  .chat-prompt-item-edit,
  .chat-prompt-item-delete {
    border-radius: 8px;
    transition: all 0.15s ease;
  }

  .chat-prompt-item-edit:hover {
    background: rgba(212, 168, 154, 0.10);
    color: var(--warm-text);
  }

  .chat-prompt-item-delete:hover {
    background: rgba(184, 84, 80, 0.08);
    color: color-mix(in srgb, var(--rose-dark, #9B6050) 82%, var(--color-error, #ff3e1d) 18%);
  }

  .chat-prompt-delete-confirm {
    color: var(--warm-text-light);
    font-family: var(--font-family);
  }

  .chat-prompt-delete-no {
    border-radius: 10px;
    color: var(--warm-text-light);
  }

  .chat-prompt-delete-no:hover {
    background: rgba(212, 168, 154, 0.10);
    color: var(--warm-text);
  }

  .chat-prompt-delete-yes {
    border-radius: 10px;
    background: color-mix(in srgb, var(--rose-dark, #9B6050) 82%, var(--color-error, #ff3e1d) 18%);
  }

  .chat-prompt-delete-yes:hover {
    background: color-mix(in srgb, var(--rose-dark, #9B6050) 88%, var(--color-error, #ff3e1d) 12%);
  }

  .chat-prompt-add-row {
    border-top: 1px solid rgba(228, 220, 212, 0.4);
    padding: 10px 6px 4px;
    margin-top: 4px;
  }

  .chat-prompt-add-prompt-btn {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    color: var(--warm-text-light);
    border-radius: 10px;
    padding: 8px 12px;
  }

  .chat-prompt-add-prompt-btn:hover {
    background: rgba(212, 168, 154, 0.08);
    color: var(--warm-text);
  }

  .chat-prompt-add-prompt-btn svg {
    color: var(--rose);
  }

  .chat-prompt-empty {
    padding: 24px 12px 16px;
  }

  .chat-prompt-empty p:first-child {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    color: var(--warm-text);
  }

  .chat-prompt-empty p {
    font-family: var(--font-family);
    color: var(--warm-text-light);
    font-size: var(--font-size-base);
    line-height: 1.4;
  }

  .chat-prompt-form-label {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    color: var(--warm-text);
    letter-spacing: 0;
    margin-bottom: 6px;
    margin-top: 12px;
  }

  .chat-prompt-icon-picker {
    display: grid;
    grid-template-columns: repeat(6, 38px);
    gap: 8px;
    padding: 6px 0 12px;
  }

  .chat-prompt-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid rgba(228, 220, 212, 0.5);
    background: rgba(255, 254, 251, 0.7);
    color: var(--warm-text-light);
    transition: all 0.15s ease;
  }

  .chat-prompt-icon-btn:hover {
    background: rgba(255, 254, 251, 0.95);
    border-color: rgba(212, 168, 154, 0.4);
    color: var(--warm-text);
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(92, 77, 67, 0.06);
  }

  .chat-prompt-icon-btn.is-selected {
    background: var(--rose-bg);
    border-color: rgba(212, 168, 154, 0.55);
    box-shadow: 0 0 0 3px rgba(212, 168, 154, 0.16);
    color: var(--warm-text);
  }

  .chat-prompt-color-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 6px 0 12px;
  }

  .chat-prompt-color-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid rgba(255, 254, 251, 0.95);
    box-shadow: 0 0 0 1px rgba(92, 77, 67, 0.10);
    transition: all 0.15s ease;
  }

  .chat-prompt-color-btn:hover {
    transform: scale(1.12);
    box-shadow: 0 0 0 1px rgba(92, 77, 67, 0.15);
  }

  .chat-prompt-color-btn.is-selected {
    box-shadow:
      0 0 0 2px rgba(255, 254, 251, 0.95),
      0 0 0 4px rgba(212, 168, 154, 0.5);
    transform: scale(1.08);
  }

  .chat-prompt-color-none {
    border: 2px dashed rgba(184, 168, 152, 0.3);
  }

  .chat-prompt-form-input,
  .chat-prompt-form textarea {
    width: 100%;
    border: 1px solid rgba(228, 220, 212, 0.6);
    border-radius: 14px;
    background: rgba(255, 254, 251, 0.7);
    backdrop-filter: blur(8px);
    color: var(--warm-text);
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    padding: 12px 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
  }

  .chat-prompt-form-input:focus-visible,
  .chat-prompt-form textarea:focus-visible {
    box-shadow: none;
    outline: none;
    background: rgba(255, 254, 251, 0.95);
  }

  .chat-prompt-form-input::placeholder,
  .chat-prompt-form textarea::placeholder {
    font-family: var(--font-family);
    color: var(--muted);
  }

  .chat-prompt-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 16px;
  }

  .chat-prompt-form-cancel,
  .chat-prompt-form-save {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    border-radius: 12px;
    padding: 8px 20px;
    transition: all 0.2s ease;
  }

  .chat-prompt-form-cancel {
    background: transparent;
    color: var(--warm-text-light);
    border: 1px solid rgba(228, 220, 212, 0.6);
  }

  .chat-prompt-form-cancel:hover {
    background: rgba(255, 254, 251, 0.9);
    border-color: rgba(212, 168, 154, 0.4);
    color: var(--warm-text);
  }

  .chat-prompt-form-save {
    background: var(--rose-dark, #9B6050) !important;
    color: var(--white, #FFFEFB) !important;
    border: none;
    box-shadow: 0 4px 12px rgba(155, 96, 80, 0.3);
    filter: none !important;
  }

  .chat-prompt-form-save:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 18px rgba(155, 96, 80, 0.4);
    background: var(--rose-dark, #9B6050) !important;
    filter: none !important;
  }

  [data-theme="dark"] .chat-prompt-form-save {
    background: var(--rose-dark, #E8B8A8) !important;
    color: #1c1b18 !important;
  }

  [data-theme="dark"] .chat-prompt-form-save:hover {
    background: var(--rose, #D4A89A) !important;
  }

  .chat-prompt-form-save:active {
    transform: scale(0.97);
    box-shadow: 0 2px 6px rgba(155, 96, 80, 0.25);
  }

  @media (max-width: 767px) {
    .input-card {
      padding: 12px 14px;
      border-radius: var(--radius-card, 18px);
    }

    .input-card .chat-input-toolbar {
      margin-top: 11px;
    }

    .chat-prompt-panel-inner,
    .chat-prompt-panel-inner[data-color] {
      padding: 12px 14px;
    }

    .chat-prompt-icon-picker {
      grid-template-columns: repeat(4, 38px);
      gap: 10px;
      justify-content: center;
    }

    .chat-prompt-form-input,
    .chat-prompt-form textarea {
      font-size: var(--font-size-base);
      padding: 12px 14px;
      border-radius: 12px;
    }

    .chat-prompt-form-save,
    .chat-prompt-form-cancel {
      padding: 10px 22px;
      font-size: var(--font-size-base);
    }
  }

  /* ── Hide global mobile nav inside chat conversation ── */
  @media (max-width: 767px) {
    body.chat-ny-in-conversation #bb-mobile-nav {
      display: none !important;
    }
    body.chat-ny-in-conversation .mn-fab-group {
      display: none !important;
    }
    body.chat-ny-in-conversation .mn-more-sheet,
    body.chat-ny-in-conversation .mn-more-backdrop {
      display: none !important;
    }
    body.chat-ny-in-conversation .chat-prompt-panel {
      bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important;
    }
  }

  body.chat-ny-in-conversation,
  body.chat-ny-in-conversation .app {
    background:
      radial-gradient(ellipse at 74% 18%, rgba(212, 168, 154, 0.055) 0%, transparent 48%),
      radial-gradient(ellipse at 22% 86%, rgba(168, 197, 184, 0.043) 0%, transparent 48%),
      linear-gradient(180deg, var(--cream, #FAF7F3) 0%, var(--pill-bg, #F0EAE4) 100%) !important;
  }

  body.chat-ny-in-conversation .main {
    display: flex !important;
    flex-direction: column !important;
    height: 100vh !important;
    height: 100dvh !important;
    min-height: 0 !important;
    max-height: 100dvh !important;
    overflow: hidden !important;
    overflow: clip !important;
    overscroll-behavior: none !important;
    padding: 0 !important;
    background: transparent !important;
  }

  body.chat-ny-in-conversation .decorative-arcs,
  body.chat-ny-in-conversation .decorative-arcs-2,
  body.chat-ny-in-conversation .decorative-arcs-bl,
  body.chat-ny-in-conversation .main::before,
  body.chat-ny-in-conversation .main::after,
  body.chat-ny-in-conversation .app::before,
  body.chat-ny-in-conversation .app::after {
    display: block;
  }

  body.chat-ny-in-conversation #bb-sidebar::before {
    display: block !important;
  }

  body.chat-ny-in-conversation #chat-main {
    display: flex !important;
    flex: 1 1 0 !important;
    min-height: 0 !important;
    max-height: 100% !important;
    flex-direction: column !important;
    overflow: hidden !important;
    overflow: clip !important;
  }

  body.chat-ny-in-conversation #chat-empty-voksen {
    display: none !important;
  }

  body.chat-ny-in-conversation #chat-conversation-panel {
    display: flex !important;
  }

  body.chat-ny-in-conversation .chat-ny-conversation {
    display: flex !important;
    flex: 1 1 0 !important;
    min-height: 0 !important;
    flex-direction: column !important;
    align-items: center !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch;
  }

  body.chat-ny-in-conversation .chat-ny-conversation > .chat-header,
  body.chat-ny-in-conversation .chat-ny-conversation > .chat-messages,
  body.chat-ny-in-conversation .chat-ny-conversation > .chat-input {
    width: min(768px, 100%, calc(100vw - 48px)) !important;
  }

  body.chat-ny-in-conversation .chat-ny-conversation :is(#chat-messages, .chat-messages, .chat-header, .chat-input, .chat-input-box) {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  body.chat-ny-in-conversation .chat-ny-conversation {
    scrollbar-gutter: stable both-edges;
  }
  /* Firefox-only standard properties */
  @supports not selector(::-webkit-scrollbar) {
    body.chat-ny-in-conversation .chat-ny-conversation {
      scrollbar-width: thin;
      scrollbar-color: rgba(0,0,0,0.15) transparent;
    }
  }
  /* WebKit/Chromium fine control */
  body.chat-ny-in-conversation .chat-ny-conversation::-webkit-scrollbar {
    width: 6px;
  }
  body.chat-ny-in-conversation .chat-ny-conversation::-webkit-scrollbar-track {
    background: transparent;
  }
  body.chat-ny-in-conversation .chat-ny-conversation::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.15);
    border-radius: 3px;
  }
  body.chat-ny-in-conversation .chat-ny-conversation::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.25);
  }
  /* Dark mode — must use !important */
  [data-theme="dark"] body.chat-ny-in-conversation .chat-ny-conversation::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15) !important;
  }
  [data-theme="dark"] body.chat-ny-in-conversation .chat-ny-conversation::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.25) !important;
  }
  @supports not selector(::-webkit-scrollbar) {
    [data-theme="dark"] body.chat-ny-in-conversation .chat-ny-conversation {
      scrollbar-color: rgba(255,255,255,0.15) transparent !important;
    }
  }

  body.chat-ny-in-conversation .chat-header {
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: sticky !important;
    top: 0 !important;
    flex: 0 0 auto !important;
    min-height: 58px;
    padding: 10px 0 4px;
    border: 0;
    background: linear-gradient(to bottom,
      rgba(250, 247, 243, 1) 0%,
      rgba(250, 247, 243, 1) 55%,
      rgba(250, 247, 243, 0.7) 80%,
      rgba(250, 247, 243, 0) 100%) !important;
    z-index: 60;
  }

  body.chat-ny-in-conversation .chat-message.received + .chat-message.sent {
    margin-top: 70px !important;
  }

  body.chat-ny-in-conversation .chat-header-user {
    display: flex !important;
    align-items: center;
    position: absolute;
    left: 0;
    top: 8px;
    z-index: 2;
  }

  body.chat-ny-in-conversation .chat-back-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    border: 1px solid rgba(228, 220, 212, 0.72);
    background: rgba(255, 254, 251, 0.76);
    color: var(--warm-text);
    box-shadow:
      0 2px 8px rgba(92, 77, 67, 0.06),
      inset 0 1px 0 rgba(255, 255, 255, 0.84);
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  }

  body.chat-ny-in-conversation .chat-back-btn:hover {
    transform: translateX(-1px);
    background: var(--rose-bg);
    box-shadow:
      0 4px 14px rgba(92, 77, 67, 0.09),
      inset 0 1px 0 rgba(255, 255, 255, 0.88);
  }

  body.chat-ny-in-conversation .chat-back-btn svg {
    width: 20px;
    height: 20px;
  }


  body.chat-ny-in-conversation .chat-messages {
    flex: 1 0 auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 24px 0 0 !important;
    justify-content: flex-start !important;
    gap: 18px !important;
    overflow: visible !important;
    overflow-y: visible !important;
    overflow-x: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  body.chat-ny-in-conversation .chat-message {
    min-height: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }

  body.chat-ny-in-conversation .chat-input {
    position: sticky !important;
    bottom: 16px !important;
    z-index: 10 !important;
    flex-shrink: 0 !important;
    padding: 16px 0 0 !important;
    background: linear-gradient(to top,
      rgba(250, 247, 243, 1) 0%,
      rgba(250, 247, 243, 1) 50%,
      rgba(250, 247, 243, 0) 100%) !important;
    border-bottom-left-radius: 18px !important;
    border-bottom-right-radius: 18px !important;
    overflow: hidden !important;
  }

  body.chat-ny-in-conversation .chat-input-box {
    border: 1px solid rgba(228, 220, 212, 0.78) !important;
    border-radius: 20px;
    background: rgba(255, 254, 251, 0.86) !important;
    box-shadow:
      0 14px 40px rgba(92, 77, 67, 0.07),
      0 2px 8px rgba(92, 77, 67, 0.04),
      inset 0 1px 0 rgba(255, 255, 255, 0.72) !important;
  }

  /* ===== Scroll-to-bottom FAB ===== */
  body.chat-ny-in-conversation #ss-scroll-bottom-fab {
    align-self: center !important;
    position: sticky !important;
    bottom: 140px !important;
    margin-top: -48px !important;
  }

  @media (max-width: 767px) {
    body.chat-ny-in-conversation #ss-scroll-bottom-fab {
      bottom: 170px !important;
    }
  }

  .ss-scroll-fab {
    z-index: 50;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(228, 220, 212, 0.6);
    border-radius: 50%;
    background: rgba(255, 254, 251, 0.92);
    color: var(--warm-text, #5C4D43);
    box-shadow: 0 4px 16px rgba(92, 77, 67, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .ss-scroll-fab.ss-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .ss-scroll-fab:hover {
    background: rgba(255, 254, 251, 1);
    box-shadow: 0 6px 20px rgba(92, 77, 67, 0.18);
    transform: scale(1.08);
  }

  .ss-scroll-fab:active {
    transform: scale(0.95);
  }

  .ss-scroll-fab:focus-visible {
    outline: none;
    outline-offset: 2px;
  }

  @media (prefers-reduced-motion: reduce) {
    .ss-scroll-fab {
      transition: none;
    }
  }

  @media (max-width: 640px) {
    .ss-scroll-fab {
      width: 44px;
      height: 44px;
    }
  }

  /* ── Conversation dropdown, confirm dialog, input and bubbles ── */

  body.chat-ny-in-conversation .confirm-overlay,
  body.chat-ny-in-conversation .chat-confirm-overlay,
  body.chat-ny-in-conversation [class*="modal-overlay"],
  body.chat-ny-in-conversation [class*="dialog-overlay"] {
    background: rgba(92, 77, 67, 0.24) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
  }

  body.chat-ny-in-conversation .confirm-dialog,
  body.chat-ny-in-conversation .chat-confirm-dialog,
  body.chat-ny-in-conversation [class*="modal-content"],
  body.chat-ny-in-conversation [class*="dialog-content"] {
    min-width: 320px !important;
    max-width: min(420px, calc(100vw - 40px)) !important;
    padding: 24px !important;
    border: 1px solid rgba(228, 220, 212, 0.72) !important;
    border-radius: var(--radius-card, 18px) !important;
    background: rgba(255, 254, 251, 0.96) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    box-shadow:
      0 4px 16px rgba(92, 77, 67, 0.08),
      0 16px 48px rgba(92, 77, 67, 0.06),
      inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
  }

  body.chat-ny-in-conversation .confirm-title,
  body.chat-ny-in-conversation .confirm-message {
    color: var(--warm-text, #5C4D43) !important;
  }

  body.chat-ny-in-conversation .confirm-title {
    font-family: var(--font-family) !important;
    font-size: var(--font-size-lg) !important;
    font-weight: var(--font-weight-semibold) !important;
    margin: 0 0 8px !important;
  }

  body.chat-ny-in-conversation .confirm-message {
    font-family: var(--font-family) !important;
    font-size: var(--font-size-base) !important;
    line-height: 1.55 !important;
    margin: 0 0 22px !important;
  }

  body.chat-ny-in-conversation .confirm-actions {
    display: flex !important;
    justify-content: flex-end !important;
    gap: 12px !important;
  }

  body.chat-ny-in-conversation .chat-confirm-dialog textarea,
  body.chat-ny-in-conversation [class*="dialog-content"] input,
  body.chat-ny-in-conversation [class*="dialog-content"] textarea {
    width: 100% !important;
    padding: 10px 14px !important;
    border: 1px solid rgba(228, 220, 212, 0.6) !important;
    border-radius: 12px !important;
    background: rgba(255, 254, 251, 0.92) !important;
    font-family: var(--font-family) !important;
    font-size: var(--font-size-base) !important;
    color: var(--warm-text, #5C4D43) !important;
    outline: 2px solid transparent !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 3px rgba(212, 168, 154, 0.10) !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
  }

  body.chat-ny-in-conversation .chat-confirm-dialog textarea:focus-visible,
  body.chat-ny-in-conversation [class*="dialog-content"] input:focus-visible,
  body.chat-ny-in-conversation [class*="dialog-content"] textarea:focus-visible {
    border-color: var(--rose, #D4A89A) !important;
    box-shadow: none !important;
  }

  body.chat-ny-in-conversation .confirm-btn,
  body.chat-ny-in-conversation .chat-confirm-dialog button,
  body.chat-ny-in-conversation [class*="dialog-content"] button {
    min-height: 42px !important;
    padding: 10px 20px !important;
    border: 1px solid rgba(228, 220, 212, 0.6) !important;
    border-radius: 14px !important;
    font-family: var(--font-family) !important;
    font-size: var(--font-size-base) !important;
    font-weight: var(--font-weight-semibold) !important;
    cursor: pointer !important;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease !important;
  }

  body.chat-ny-in-conversation .confirm-cancel,
  body.chat-ny-in-conversation .chat-confirm-dialog button:first-of-type,
  body.chat-ny-in-conversation [class*="dialog-content"] button:first-of-type {
    background: rgba(255, 254, 251, 0.92) !important;
    color: var(--warm-text, #5C4D43) !important;
  }

  body.chat-ny-in-conversation .confirm-cancel:hover,
  body.chat-ny-in-conversation .chat-confirm-dialog button:first-of-type:hover {
    background: rgba(212, 168, 154, 0.10) !important;
  }

  body.chat-ny-in-conversation .confirm-ok,
  body.chat-ny-in-conversation .chat-confirm-dialog button:last-of-type,
  body.chat-ny-in-conversation [class*="dialog-content"] button:last-of-type {
    background: var(--rose-dark, #9B6050) !important;
    border-color: transparent !important;
    color: var(--white, #FFFEFB) !important;
    box-shadow: 0 4px 12px rgba(155, 96, 80, 0.3) !important;
  }

  body.chat-ny-in-conversation .confirm-ok:hover,
  body.chat-ny-in-conversation .chat-confirm-dialog button:last-of-type:hover {
    transform: scale(1.02) !important;
    box-shadow: 0 6px 18px rgba(155, 96, 80, 0.4) !important;
  }

  body.chat-ny-in-conversation .chat-ny-conversation .chat-input-box {
    border: 1px solid rgba(228, 220, 212, 0.78) !important;
    border-radius: var(--radius-card, 18px) !important;
    background: rgba(255, 254, 251, 0.86) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    box-shadow:
      0 14px 40px rgba(92, 77, 67, 0.07),
      0 2px 8px rgba(92, 77, 67, 0.04),
      inset 0 1px 0 rgba(255, 255, 255, 0.72) !important;
  }

  body.chat-ny-in-conversation .chat-ny-conversation .chat-input-box textarea,
  body.chat-ny-in-conversation .chat-ny-conversation .chat-input-box input {
    font-family: var(--font-family) !important;
    font-style: normal !important;
    font-size: var(--font-size-base) !important;
    color: var(--warm-text, #5C4D43) !important;
    min-height: 44px;
  }

  body.chat-ny-in-conversation .chat-ny-conversation .chat-input-box textarea::placeholder,
  body.chat-ny-in-conversation .chat-ny-conversation .chat-input-box input::placeholder {
    font-family: var(--font-family) !important;
    font-style: normal !important;
    color: var(--warm-text-light, #8A7E72) !important;
  }

  body.chat-ny-in-conversation .chat-ny-conversation .chat-input-box:focus-within {
    border-color: rgba(212, 168, 154, 0.3) !important;
    box-shadow: none !important;
  }

  body.chat-ny-in-conversation .chat-ny-conversation .chat-send-btn {
    width: 36px !important;
    height: 36px !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: var(--rose-dark, #9B6050) !important;
    color: var(--white, #FFFEFB) !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    box-shadow: 0 4px 12px rgba(155, 96, 80, 0.3) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
  }

  body.chat-ny-in-conversation .chat-ny-conversation .chat-send-btn:not(.is-empty):not([hidden]),
  body.chat-ny-in-conversation .chat-ny-conversation .chat-send-btn.is-stop:not([hidden]) {
    display: inline-flex !important;
  }

  body.chat-ny-in-conversation .chat-ny-conversation .chat-send-btn:hover {
    transform: scale(1.02) !important;
    box-shadow: 0 6px 18px rgba(155, 96, 80, 0.4) !important;
  }

  body.chat-ny-in-conversation .chat-ny-conversation .chat-send-btn svg {
    width: 18px !important;
    height: 18px !important;
    color: var(--white, #FFFEFB) !important;
    stroke: var(--white, #FFFEFB) !important;
  }

  body.chat-ny-in-conversation .chat-message.sent .chat-bubble,
  body.chat-ny-in-conversation .chat-message.user .chat-bubble,
  body.chat-ny-in-conversation .chat-message--user .chat-bubble {
    background: linear-gradient(135deg, rgba(253, 247, 243, 0.95), rgba(244, 232, 226, 0.85)) !important;
    border: 1px solid rgba(212, 168, 154, 0.18) !important;
    border-radius: 22px 22px 6px 22px !important;
    color: var(--warm-text, #5C4D43) !important;
    font-family: var(--font-family) !important;
    font-size: var(--font-size-base) !important;
    line-height: 1.6 !important;
    box-shadow:
      0 1px 2px rgba(92, 77, 67, 0.04),
      inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
  }

  /* AI-beskeder: no visible bubble */
  body.chat-ny-in-conversation .chat-message.received .chat-bubble,
  body.chat-ny-in-conversation .chat-message.assistant .chat-bubble,
  body.chat-ny-in-conversation .chat-message--assistant .chat-bubble {
    max-width: 100% !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: var(--warm-text, #5C4D43) !important;
    font-family: var(--font-family) !important;
    font-size: var(--font-size-base) !important;
    line-height: 1.7 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
  }

  body.chat-ny-in-conversation .chat-message-time {
    font-family: var(--font-family) !important;
    font-size: var(--font-size-base) !important;
    color: var(--warm-text-light, #8A7E72) !important;
  }

  /* Keep message actions out of normal flow.
     The bundle renders `.chat-msg-footer` below every bubble; if it stays in flow,
     short conversations look vertically loose even when the input is sticky. */
  body.chat-ny-in-conversation .chat-message {
    position: relative !important;
    overflow: visible !important;
  }

  body.chat-ny-in-conversation .chat-message-content {
    position: relative !important;
    gap: 0 !important;
    overflow: visible !important;
  }

  body.chat-ny-in-conversation .chat-msg-footer {
    position: absolute !important;
    top: calc(100% + 4px) !important;
    left: 0 !important;
    right: auto !important;
    height: 28px !important;
    margin-top: 12px !important;
    opacity: 0 !important;
    pointer-events: none !important;
    z-index: 6 !important;
  }

  body.chat-ny-in-conversation .chat-message.sent .chat-msg-footer,
  body.chat-ny-in-conversation .chat-message.user .chat-msg-footer,
  body.chat-ny-in-conversation .chat-message--user .chat-msg-footer {
    left: auto !important;
    right: 0 !important;
    justify-content: flex-end !important;
  }

  body.chat-ny-in-conversation .chat-message:hover .chat-msg-footer,
  body.chat-ny-in-conversation .chat-message:focus-within .chat-msg-footer {
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  body.chat-ny-in-conversation .chat-message.received,
  body.chat-ny-in-conversation .chat-message.assistant,
  body.chat-ny-in-conversation .chat-message--assistant {
    margin-bottom: 14px !important;
  }

  body.chat-ny-in-conversation .chat-message.received .chat-msg-footer,
  body.chat-ny-in-conversation .chat-message.assistant .chat-msg-footer,
  body.chat-ny-in-conversation .chat-message--assistant .chat-msg-footer {
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  body.chat-ny-in-conversation .chat-message.received .chat-msg-actions,
  body.chat-ny-in-conversation .chat-message.assistant .chat-msg-actions,
  body.chat-ny-in-conversation .chat-message--assistant .chat-msg-actions {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  body.chat-ny-in-conversation .chat-message.received .chat-msg-action-btn,
  body.chat-ny-in-conversation .chat-message.assistant .chat-msg-action-btn,
  body.chat-ny-in-conversation .chat-message--assistant .chat-msg-action-btn {
    opacity: 1 !important;
    color: var(--warm-text, #5C4D43) !important;
    background: transparent !important;
    border: 1px solid transparent !important;
    border-radius: 8px !important;
    box-shadow: none !important;
  }

  body.chat-ny-in-conversation .chat-message.received .chat-msg-action-btn:hover,
  body.chat-ny-in-conversation .chat-message.assistant .chat-msg-action-btn:hover,
  body.chat-ny-in-conversation .chat-message--assistant .chat-msg-action-btn:hover,
  body.chat-ny-in-conversation .chat-message.received .chat-msg-action-btn:focus-visible,
  body.chat-ny-in-conversation .chat-message.assistant .chat-msg-action-btn:focus-visible,
  body.chat-ny-in-conversation .chat-message--assistant .chat-msg-action-btn:focus-visible {
    background: rgba(212, 168, 154, 0.10) !important;
    border-color: transparent !important;
    box-shadow: none !important;
  }

  body.chat-ny-in-conversation .chat-message.received .chat-msg-action-btn svg,
  body.chat-ny-in-conversation .chat-message.assistant .chat-msg-action-btn svg,
  body.chat-ny-in-conversation .chat-message--assistant .chat-msg-action-btn svg,
  body.chat-ny-in-conversation .chat-message.received .chat-msg-action-btn path,
  body.chat-ny-in-conversation .chat-message.assistant .chat-msg-action-btn path,
  body.chat-ny-in-conversation .chat-message--assistant .chat-msg-action-btn path,
  body.chat-ny-in-conversation .chat-message.received .chat-msg-action-btn rect,
  body.chat-ny-in-conversation .chat-message.assistant .chat-msg-action-btn rect,
  body.chat-ny-in-conversation .chat-message--assistant .chat-msg-action-btn rect,
  body.chat-ny-in-conversation .chat-message.received .chat-msg-action-btn polygon,
  body.chat-ny-in-conversation .chat-message.assistant .chat-msg-action-btn polygon,
  body.chat-ny-in-conversation .chat-message--assistant .chat-msg-action-btn polygon {
    opacity: 1 !important;
    stroke: currentColor !important;
  }

  body.chat-ny-in-conversation .chat-msg-action-btn.tts-playing {
    color: var(--warm-text, #5C4D43) !important;
    opacity: 1 !important;
    background: rgba(212, 168, 154, 0.15) !important;
    border-radius: 6px !important;
  }

  body.chat-ny-in-conversation .chat-msg-action-btn.tts-paused {
    color: var(--warm-text, #5C4D43) !important;
    opacity: 0.8 !important;
    background: rgba(212, 168, 154, 0.10) !important;
    border-radius: 6px !important;
  }

  body.chat-ny-in-conversation .chat-tts-active-block {
    /* visual styling now in chat-tts-highlight.css (#2760) */
  }

  body.chat-ny-in-conversation .chat-tts-block-playing .chat-tts-active-block {
    /* visual styling now in chat-tts-highlight.css (#2760) */
  }

  .section-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 32px;
    padding: 0 24px;
  }

  .section-divider::before,
  .section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--divider), transparent);
  }

  .section-divider span {
    font-family: var(--font-family);
    font-style: italic;
    font-size: var(--font-size-base);
    line-height: 1.4;
    color: var(--warm-text-light);
    white-space: nowrap;
    letter-spacing: 0;
  }

  .cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: auto;
    align-items: start;
    gap: 20px;
  }

  @media (max-width: 1100px) {
    .cards { grid-template-columns: repeat(2, 1fr); }
  }

  @media (max-width: 640px) {
    .cards { grid-template-columns: 1fr; gap: 16px; }
  }

  .card {
    border-radius: var(--radius-card, 18px);
    padding: 18px 20px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(228, 220, 212, 0.6);
    box-shadow:
      0 1px 2px rgba(92, 77, 67, 0.06),
      0 4px 16px rgba(92, 77, 67, 0.05),
      0 12px 40px rgba(92, 77, 67, 0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  }

  .card[data-card-href] {
    cursor: pointer;
  }

  .card[data-card-href]:focus-visible {
    outline: none;
    outline-offset: 4px;
  }

  .card:hover,
  .card:focus-within {
    transform: translateY(-3px);
    border-color: rgba(92, 77, 67, 0.20);
    box-shadow: none;

  }

  @media (prefers-reduced-motion: reduce) {
    #chat-app .main *,
    #chat-app .main *::before,
    #chat-app .main *::after {
      transition: none !important;
      animation: none !important;
      scroll-behavior: auto !important;
    }
  }

  .card--todo {
    background: linear-gradient(135deg, #FDF7F3 0%, #F4E8E2 100%);
    border-color: rgba(244, 232, 226, 0.8);
  }

  .card--email {
    background: linear-gradient(135deg, #F5FAF7 0%, #E0EDE6 100%);
    border-color: rgba(224, 237, 230, 0.8);
  }

  .card--email .card-items {
    gap: 16px;
  }

  .card--email .card-item {
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid rgba(168, 197, 184, 0.24);
    border-radius: 14px;
    background: rgba(255, 254, 251, 0.54);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  }

  .card--email .card-item--ai {
    background: linear-gradient(135deg, rgba(255, 254, 251, 0.78), rgba(224, 237, 230, 0.52));
    border-color: rgba(168, 197, 184, 0.34);
  }

  .card-item--ai .card-item-link {
    display: inline-flex;
    min-height: 44px;
    flex-direction: column;
    justify-content: center;
  }

  .card-item--sending {
    opacity: 0.7;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  .card-item--sending .card-item-link {
    flex-direction: row;
    align-items: center;
  }

  .card-item--sending .card-item-link::after {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid var(--sage-dark, #4A7A68);
    border-top-color: transparent;
    border-radius: 50%;
    animation: card-ai-spin 0.6s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
  }

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

  .card--email .card-item--unread {
    background: rgba(255, 254, 251, 0.82);
    border-color: rgba(168, 197, 184, 0.48);
  }

  .card--email .card-item--quiet {
    opacity: 0.86;
  }

  .card--email .card-item-dot--pulse {
    box-shadow: 0 0 0 4px rgba(168, 197, 184, 0.18);
  }

  .card--calendar {
    background: linear-gradient(135deg, #F5F7FC 0%, #E0E4EE 100%);
    border-color: rgba(224, 228, 238, 0.8);
  }

  .card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
  }

  .card-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    flex-shrink: 0;
  }

  .card-dot--rose {
    background: var(--rose);
    box-shadow: 0 2px 8px rgba(212, 168, 154, 0.4);
  }

  .card-dot--sage {
    background: var(--sage);
    box-shadow: 0 2px 8px rgba(168, 197, 184, 0.4);
  }

  .card-dot--slate {
    background: var(--slate);
    box-shadow: 0 2px 8px rgba(168, 176, 196, 0.4);
  }

  .card-title {
    font-family: var(--font-family);
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-2xl);
    color: var(--warm-text);
    flex: 1;
  }

  .card-count {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    color: var(--warm-text-light);
  }

  .card-count::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: card-pulse 1.8s ease-in-out infinite;
  }

  .card--todo .card-count::after {
    background: var(--rose);
    box-shadow: 0 0 6px rgba(212, 168, 154, 0.5);
  }

  .card--email .card-count::after {
    background: var(--sage);
    box-shadow: 0 0 6px rgba(168, 197, 184, 0.5);
  }

  .card--calendar .card-count::after {
    background: var(--slate);
    box-shadow: 0 0 6px rgba(168, 176, 196, 0.5);
  }

  @keyframes card-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.85); }
  }

  .card-divider {
    height: 1px;
    margin: 14px 0 16px;
    opacity: 1;
    border-radius: 999px;
  }

  .card--todo .card-divider {
    background: linear-gradient(90deg, rgba(212, 168, 154, 0.18) 0%, rgba(212, 168, 154, 0.58) 14%, rgba(212, 168, 154, 0.58) 86%, rgba(212, 168, 154, 0.18) 100%);
  }

  .card--email .card-divider {
    background: linear-gradient(90deg, rgba(168, 197, 184, 0.18) 0%, rgba(168, 197, 184, 0.58) 14%, rgba(168, 197, 184, 0.58) 86%, rgba(168, 197, 184, 0.18) 100%);
  }

  .card--calendar .card-divider {
    background: linear-gradient(90deg, rgba(168, 176, 196, 0.18) 0%, rgba(168, 176, 196, 0.58) 14%, rgba(168, 176, 196, 0.58) 86%, rgba(168, 176, 196, 0.18) 100%);
  }

  .card-items {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .card-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: var(--font-size-base);
    color: var(--warm-text);
    line-height: 1.55;
    transform-origin: left center;
    transition: background 0.2s ease, filter 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
  }

  .card-item.is-completing {
    pointer-events: none;
    animation: cardItemCompleteOut 420ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
  }

  .card-item.is-completing .card-item-text {
    color: var(--warm-text-light);
  }

  .card-item-checkbox {
    width: 16px;
    height: 16px;
    min-width: 16px;
    border-radius: 4px;
    border: 1.5px solid var(--rose);
    margin-top: 1px;
    cursor: pointer;
    display: inline-grid;
    place-items: center;
    overflow: hidden;
    position: relative;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.2s ease, transform 0.2s ease;
  }

  .card-item-checkbox:hover { background: var(--rose-light); }

  .card-item-checkbox::before {
    content: "";
    position: absolute;
    inset: -7px;
    border-radius: 999px;
    background: rgba(212, 168, 154, 0.22);
    opacity: 0;
    transform: scale(0.35);
    pointer-events: none;
  }

  .card-item-checkbox.is-checked {
    background: var(--rose);
    border-color: var(--rose);
    box-shadow: 0 0 0 6px rgba(212, 168, 154, 0);
    transform: scale(1.08);
    animation: cardCheckboxPop 320ms cubic-bezier(0.2, 1.4, 0.32, 1);
  }

  .card-item-checkbox.is-checked::before {
    animation: cardCheckboxRipple 360ms ease-out;
  }

  .card-item-checkbox.is-checked::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 1px;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    animation: cardCheckboxTick 180ms ease-out;
  }

  button.card-item-checkbox {
    background: transparent;
    padding: 0;
  }

  @keyframes cardCheckboxPop {
    0% { transform: scale(0.72); }
    62% { transform: scale(1.16); }
    100% { transform: scale(1.08); }
  }

  @keyframes cardCheckboxRipple {
    0% { opacity: 0.9; transform: scale(0.25); }
    100% { opacity: 0; transform: scale(1.6); }
  }

  @keyframes cardCheckboxTick {
    0% { opacity: 0; transform: rotate(45deg) scale(0.3); }
    100% { opacity: 1; transform: rotate(45deg) scale(1); }
  }

  @keyframes cardItemCompleteOut {
    0% {
      opacity: 1;
      transform: translateX(0) scale(1);
      filter: saturate(1);
    }
    58% {
      opacity: 1;
      transform: translateX(4px) scale(0.995);
      filter: saturate(0.95);
    }
    100% {
      opacity: 0;
      transform: translateX(14px) scale(0.985);
      filter: saturate(0.8);
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .card-item,
    .card-item.is-completing,
    .card-item-checkbox,
    .card-item-checkbox.is-checked,
    .card-item-checkbox.is-checked::before,
    .card-item-checkbox.is-checked::after {
      animation: none !important;
      transition: none !important;
    }

    .card-item.is-completing {
      opacity: 0.55;
      transform: none;
    }
  }

  .card-item-text {
    min-width: 0;
    overflow-wrap: anywhere;
    font-weight: var(--font-weight-normal);
  }

  .card--todo .card-items::after {
    content: '';
    display: none;
    height: 4px;
    margin-top: 16px;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--rose-light) 0%, var(--rose) 50%, var(--rose-light) 100%);
    background-size: 200% 100%;
    animation: shimmer-bar 2s ease-in-out infinite;
  }

  .card--todo.is-loading .card-items::after {
    display: block;
  }

  @keyframes shimmer-bar {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
  }

  .card-item-meta {
    display: block;
    margin-top: 2px;
    font-size: var(--font-size-base);
    color: var(--warm-text-light);
  }

  .card-status {
    font-size: var(--font-size-base);
    color: var(--warm-text-light);
    line-height: 1.5;
  }

  .card-status strong {
    color: var(--warm-text);
    font-weight: var(--font-weight-semibold);
  }

  .program-footer {
    margin-top: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
  }

  .program-action {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 999px;
    text-decoration: none;
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    color: var(--warm-text);
    background: rgba(255, 254, 251, 0.72);
    border: 1px solid rgba(92, 77, 67, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  }

  .program-action:hover,
  .program-action:focus-visible {
    color: var(--avatar-dark, #2F2639);
    background: rgba(255, 254, 251, 0.95);
    outline: none;
    outline-offset: 2px;
  }

  /* ══════════════════════════════════════════════
     SIGNAL CARDS - ADHD-first redesign
     ══════════════════════════════════════════════ */

  .card-body {
    padding: 16px 20px;
    margin: 0 -4px;
    border-radius: var(--radius-card, 18px);
  }

  .card--todo .card-body {
    background: rgba(155, 96, 80, 0.06);
    padding: 16px 20px;
  }

  .card--calendar .card-body {
    background: rgba(78, 83, 112, 0.06);
    padding: 16px 20px;
  }

  .card--email .card-body {
    padding: 16px 20px;
  }

  .card-body-title {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    color: var(--warm-text, #5C4D43);
    line-height: 1.4;
    margin-bottom: 4px;
  }

  .card-body-meta {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    color: var(--rose-dark, #9B6050);
    line-height: 1.4;
  }

  .card--calendar .card-body-meta {
    color: var(--slate-dark, #4E5370);
  }

  .card--email .card-body-meta {
    color: var(--warm-text-light, #8A7E72);
    font-weight: var(--font-weight-medium);
  }

  .card--calendar .card-body[data-urgency="soon"] .card-body-meta {
    color: var(--rose-dark, #9B6050);
    font-weight: var(--font-weight-semibold);
  }

  .card--calendar .card-body[data-urgency="now"] .card-body-meta {
    color: var(--rose-dark, #9B6050);
    font-weight: var(--font-weight-semibold);
  }

  .card--email .card-body[data-signal="ok"],
  .card--email .card-body[data-signal="clear"] {
    background: rgba(74, 122, 104, 0.06);
  }

  .card--email .card-body[data-signal="attention"] {
    background: rgba(155, 96, 80, 0.06);
  }

  .card--email .card-body[data-signal="demo"][data-i18n-aria="a11y.emailDemo"] {
    background-color: rgba(168, 197, 184, 0.18);
    border-radius: 18px;
    padding: 16px 20px;
  }

  .card--email .card-body[data-signal="loading"] {
    background: transparent;
  }

  .card-later {
    margin-top: 12px;
  }

  .card-later-label {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    color: var(--warm-text-light, #8A7E72);
    text-transform: none;
    letter-spacing: 0;
    line-height: 1.4;
    margin-bottom: 8px;
  }

  .card-later-item {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    color: var(--warm-text-light, #8A7E72);
    line-height: 1.6;
  }

  [data-theme="dark"] .card--todo .card-body {
    background: rgba(212, 168, 154, 0.06);
  }

  [data-theme="dark"] .card[data-card-href]:focus-visible {
    outline: none;
  }

  [data-theme="dark"] .card--calendar .card-body {
    background: rgba(168, 176, 196, 0.06);
  }

  [data-theme="dark"] .card-body-title {
    color: #E8DDD4;
  }

  [data-theme="dark"] .card-body-meta {
    color: var(--rose, #D4A89A);
  }

  [data-theme="dark"] .card--calendar .card-body-meta {
    color: var(--slate, #A8B0C4);
  }

  [data-theme="dark"] .card--email .card-body-meta {
    color: #C8BEB2;
  }

  [data-theme="dark"] .card--email .card-body[data-signal="ok"],
  [data-theme="dark"] .card--email .card-body[data-signal="clear"] {
    background: rgba(168, 197, 184, 0.06);
  }

  [data-theme="dark"] .card--email .card-body[data-signal="attention"] {
    background: rgba(212, 168, 154, 0.06);
  }

  [data-theme="dark"] .card-later-label,
  [data-theme="dark"] .card-later-item {
    color: #C8BEB2;
  }

  .card-item-link {
    color: inherit;
    text-decoration: none;
    min-width: 0;
  }

  .card-item-link:hover .card-item-text,
  .card-item-link:focus-visible .card-item-text {
    text-decoration: underline;
    text-underline-offset: 3px;
  }

  .sofia-live-note {
    margin-top: 14px;
    font-size: var(--font-size-base);
    line-height: 1.4;
    color: var(--warm-text-light);
    text-align: center;
  }

  .card-item-dot {
    width: 10px;
    height: 10px;
    min-width: 10px;
    border-radius: 50%;
    margin-top: 4px;
  }

  .card-item-dot--rose { background: var(--rose, #D4A89A); }
  .card-item-dot--sage { background: var(--sage, #A8C5B8); }
  .card-item-dot--slate { background: var(--slate, #A8B0C4); }

  .content {
    max-width: 1180px;
    padding-top: 36px;
  }

  .greeting {
    margin-bottom: 40px;
  }

  .greeting h1 {
    font-size: clamp(42px, 4.2vw, 54px);
    line-height: 1.05;
    color: var(--avatar-dark, #2F2639);
    margin-bottom: 14px;
    letter-spacing: 0;
  }

  .greeting p {
    font-family: var(--font-family);
    font-style: normal;
    font-size: var(--font-size-lg);
    line-height: 1.45;
    color: rgba(92, 77, 67, 0.68);
  }

  .input-wrapper {
    width: min(960px, calc(100vw - 184px));
    max-width: none;
    margin-bottom: 30px;
  }

  .input-glow {
    inset: -22px;
    border-radius: 48px;
    background:
      radial-gradient(ellipse at 50% 55%, rgba(212, 168, 154, 0.1) 0%, transparent 68%);
  }

  .input-card {
    min-height: 210px;
    border-radius: 30px;
    padding: 34px 48px 36px;
    border: 1px solid rgba(228, 220, 212, 0.86);
    box-shadow:
      0 1px 2px rgba(92, 77, 67, 0.06),
      0 10px 34px rgba(92, 77, 67, 0.06),
      inset 0 1px 0 rgba(255, 255, 255, 0.75);
  }

  .input-card .chat-input-field {
    font-size: var(--font-size-4xl);
    line-height: 1.4;
  }

  .input-card textarea.chat-input-field {
    min-height: 44px !important;
    height: 44px;
  }

  .input-card .chat-input-toolbar {
    min-height: 58px;
    margin-top: 56px;
  }

  .input-card .chat-upload-btn,
  .input-card .chat-input-action {
    width: 54px;
    height: 54px !important;
    min-width: 54px;
    min-height: 54px !important;
    max-height: 54px;
  }

  .input-card .chat-upload-btn {
    background: rgba(255, 254, 251, 0.86);
    border-color: rgba(228, 220, 212, 0.9);
    box-shadow:
      0 4px 14px rgba(92, 77, 67, 0.08),
      inset 0 1px 0 rgba(255, 255, 255, 0.78);
  }

  .input-card .chat-send-btn {
    width: 64px;
    height: 64px !important;
    min-width: 64px;
    min-height: 64px !important;
    max-height: 64px;
    background: linear-gradient(135deg, var(--chat-send-from) 0%, var(--chat-send-to) 100%);
    box-shadow:
      0 0 0 8px rgba(217, 154, 122, 0.12),
      0 8px 22px rgba(217, 154, 122, 0.35),
      inset 0 1px 0 rgba(255, 255, 255, 0.34);
  }

  .input-card .chat-send-btn:hover {
    background: linear-gradient(135deg, var(--chat-send-hover-from) 0%, var(--chat-send-hover-to) 100%);
    box-shadow:
      0 0 0 9px rgba(217, 154, 122, 0.14),
      0 10px 28px rgba(217, 154, 122, 0.42),
      inset 0 1px 0 rgba(255, 255, 255, 0.38);
  }

  .input-card .chat-send-btn.is-empty {
    opacity: 0.82;
    box-shadow:
      0 0 0 8px rgba(217, 154, 122, 0.1),
      0 8px 22px rgba(217, 154, 122, 0.24),
      inset 0 1px 0 rgba(255, 255, 255, 0.28);
    background: linear-gradient(135deg, rgba(230, 170, 143, 0.72) 0%, rgba(217, 154, 122, 0.72) 100%);
  }

  .chat-ny-prompt-area,
  .chat-prompt-area {
    max-width: 960px !important;
    margin-bottom: 42px;
  }

  .quick-actions,
  .chat-prompt-chips {
    max-width: 960px !important;
    gap: 14px !important;
  }

  .chat-ny-prompt-area .quick-action,
  .chat-ny-prompt-area .chat-prompt-chip {
    min-height: 48px;
    padding: 12px 24px !important;
    border-radius: 24px;
    font-size: var(--font-size-base);
    box-shadow:
      0 2px 5px rgba(92, 77, 67, 0.05),
      0 8px 24px rgba(92, 77, 67, 0.04);
  }

  @media (max-width: 767px) {
    .content {
      padding-left: 20px;
      padding-right: 20px;
    }

    .greeting h1 {
      font-size: var(--font-size-6xl);
    }

    .greeting p {
      font-size: var(--font-size-base);
      font-family: var(--font-family);
      font-style: italic;
    }

    .input-wrapper {
      width: 100%;
    }

    .input-card {
      min-height: 132px;
      border-radius: var(--radius-card, 18px);
      padding: 16px 18px;
    }

    .input-card .chat-input-field {
      font-size: var(--font-size-lg);
    }

    .input-card textarea.chat-input-field {
      min-height: 34px !important;
      height: 34px;
    }

    .input-card .chat-input-toolbar {
      min-height: 46px;
      margin-top: 22px;
    }

    .input-card .chat-upload-btn,
    .input-card .chat-input-action,
    .input-card .chat-send-btn {
      width: 44px;
      height: 44px !important;
      min-width: 44px;
      min-height: 44px !important;
      max-height: 44px;
    }

    .chat-ny-prompt-area,
    .chat-prompt-area,
    .quick-actions,
    .chat-prompt-chips {
      max-width: 100% !important;
    }

    .chat-ny-prompt-area .quick-action,
    .chat-ny-prompt-area .chat-prompt-chip,
    body:not(.chat-ny-in-conversation) .quick-action,
    body:not(.chat-ny-in-conversation) .chat-prompt-chip {
      min-height: 44px;
      padding: 10px 18px !important;
      gap: 10px;
      font-size: var(--font-size-base);
      line-height: 1.4;
    }
  }

  /* Touch target minimum 44px for mobile */
  @media (max-width: 767px) {
    .voice-overlay-close,
    .voice-type-toggle,
    .voice-stop-btn,
    .chat-prompt-panel-close,
    .chat-prompt-item-edit,
    .chat-prompt-item-delete,
    .chat-prompt-icon-btn,
    .chat-prompt-color-btn {
      width: 48px !important;
      height: 48px !important;
      min-height: 48px !important;
      min-width: 48px !important;
    }

    .voice-action-pill {
      min-height: 48px !important;
      min-width: 48px !important;
      height: auto !important;
      padding: 13px 20px !important;
    }

    .voice-stop-btn {
      width: auto !important;
      padding: 13px 20px !important;
    }

    .skip-link,
    .skip-link:focus-visible {
      min-height: 44px;
      padding: 12px 24px;
    }
  }

  .content {
    padding-top: 34px;
  }

  .greeting {
    margin-bottom: 34px;
  }

  .greeting h1 {
    font-size: var(--text-h1, 32px);
    line-height: 1.08;
    margin-bottom: 10px;
  }

  .greeting p {
    font-size: var(--font-size-base);
    color: rgba(92, 77, 67, 0.72);
  }

  .input-wrapper {
    width: min(920px, calc(100vw - 204px));
    margin-bottom: 24px;
  }

  .input-card {
    min-height: 178px;
    border-radius: 28px;
    padding: 30px 48px 28px;
  }

  .input-card .chat-input-field {
    font-size: var(--font-size-xl);
  }

  .input-card textarea.chat-input-field {
    min-height: 38px !important;
    height: 38px;
  }

  .input-card .chat-input-toolbar {
    min-height: 54px;
    margin-top: 40px;
  }

  .input-card .chat-upload-btn,
  .input-card .chat-input-action {
    width: 52px;
    height: 52px !important;
    min-width: 52px;
    min-height: 52px !important;
    max-height: 52px;
  }

  .input-card .chat-send-btn {
    width: 58px;
    height: 58px !important;
    min-width: 58px;
    min-height: 58px !important;
    max-height: 58px;
    box-shadow:
      0 0 0 6px rgba(217, 154, 122, 0.12),
      0 7px 18px rgba(217, 154, 122, 0.32),
      inset 0 1px 0 rgba(255, 255, 255, 0.32);
  }

  .input-card .chat-send-btn:hover {
    box-shadow:
      0 0 0 7px rgba(217, 154, 122, 0.14),
      0 9px 22px rgba(217, 154, 122, 0.38),
      inset 0 1px 0 rgba(255, 255, 255, 0.36);
  }

  .input-card .chat-send-btn.is-empty {
    opacity: 0.9;
    box-shadow:
      0 0 0 6px rgba(217, 154, 122, 0.1),
      0 7px 18px rgba(217, 154, 122, 0.22),
      inset 0 1px 0 rgba(255, 255, 255, 0.3);
  }

  .chat-ny-prompt-area,
  .chat-prompt-area {
    margin-bottom: 34px;
  }

  .quick-action,
  .chat-prompt-chip {
    min-height: 42px;
    padding: 10px 22px;
    font-size: var(--font-size-base);
  }

  @media (max-width: 767px) {
    .input-wrapper {
      width: 100%;
    }

    .input-card {
      min-height: 132px;
      padding: 16px 18px;
    }
  }

  /* Final premium composer reset */
  body:not(.chat-ny-in-conversation) .content {
    max-width: 1160px;
    padding-top: 62px;
    padding-bottom: 24px;
  }

  body:not(.chat-ny-in-conversation) .greeting {
    margin-bottom: 40px;
  }

  body:not(.chat-ny-in-conversation) .greeting h1 {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 12px;
    font-family: var(--font-family);
    font-size: clamp(32px, 3.45vw, 48px) !important;
    line-height: 1.08;
    font-weight: var(--font-weight-semibold);
    color: var(--avatar-dark, #2F2639);
    letter-spacing: -0.02em;
  }

  body:not(.chat-ny-in-conversation) .greeting p {
    font-family: var(--font-family);
    font-style: normal;
    font-size: var(--font-size-lg);
    line-height: 1.45;
    color: rgba(92, 77, 67, 0.7);
  }

  body:not(.chat-ny-in-conversation) .input-wrapper {
    width: min(960px, calc(100vw - 280px));
    max-width: none !important;
    margin: 0 auto 28px;
  }

  body:not(.chat-ny-in-conversation) .input-glow {
    inset: -18px;
    border-radius: 42px;
    background: radial-gradient(ellipse at center, rgba(212, 168, 154, 0.085) 0%, transparent 70%);
  }

  body:not(.chat-ny-in-conversation) .input-card {
    min-height: 206px !important;
    border-radius: 26px !important;
    padding: 30px 32px 28px !important;
    background: rgba(255, 254, 251, 0.52) !important;
    backdrop-filter: blur(16px) saturate(1.4) !important;
    -webkit-backdrop-filter: blur(16px) saturate(1.4) !important;
    border: 1px solid rgba(228, 220, 212, 0.92) !important;
    box-shadow:
      0 1px 2px rgba(92, 77, 67, 0.06),
      0 12px 34px rgba(92, 77, 67, 0.07),
      inset 0 1px 0 rgba(255, 255, 255, 0.85) !important;
  }

  body:not(.chat-ny-in-conversation) .input-card::before {
    content: '';
    position: absolute;
    inset: 1px 1px auto 1px;
    height: 58%;
    border-radius: 25px 25px 18px 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.48) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
    opacity: 0.62;
    z-index: 0;
  }

  body:not(.chat-ny-in-conversation) .input-card:focus-within {
    border-color: rgba(212, 168, 154, 0.3) !important;
    box-shadow: none !important;
  }

  body:not(.chat-ny-in-conversation) .input-card .chat-input-field {
    font-size: var(--font-size-xl) !important;
    line-height: 1.4;
    color: var(--warm-text);
  }

  body:not(.chat-ny-in-conversation) .input-card:focus-within .chat-input-field::placeholder {
    color: rgba(184, 168, 152, 0.66);
  }

  body:not(.chat-ny-in-conversation) .input-card textarea.chat-input-field {
    min-height: 38px !important;
    height: 38px !important;
  }

  body:not(.chat-ny-in-conversation) .input-card .chat-empty-input-area,
  body:not(.chat-ny-in-conversation) .input-card .chat-input-box--welcome {
    width: 100% !important;
    max-width: none !important;
    position: relative;
    z-index: 1;
    overflow: visible !important;
  }

  body:not(.chat-ny-in-conversation) .input-card .chat-input-toolbar {
    width: 100% !important;
    max-width: none !important;
    min-height: 58px;
    margin-top: 50px !important;
  }

  body:not(.chat-ny-in-conversation) .input-card .chat-plus-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  body:not(.chat-ny-in-conversation) .input-card .chat-upload-btn,
  body:not(.chat-ny-in-conversation) .input-card .chat-plus-btn {
    width: 52px !important;
    height: 52px !important;
    min-width: 52px !important;
    min-height: 52px !important;
    max-height: 52px !important;
    border-radius: 50% !important;
    background: rgba(255, 254, 251, 0.9) !important;
    border: 1px solid rgba(228, 220, 212, 0.92) !important;
    box-shadow:
      0 5px 16px rgba(92, 77, 67, 0.09),
      inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
    transition:
      transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1),
      border-color 0.2s ease,
      background 0.2s ease,
      box-shadow 0.2s ease,
      color 0.2s ease;
  }

  body:not(.chat-ny-in-conversation) .input-card .chat-upload-btn:hover,
  body:not(.chat-ny-in-conversation) .input-card .chat-plus-btn:hover {
    transform: translateY(-2px) scale(1.02);
    background: linear-gradient(180deg, rgba(255, 254, 251, 0.98) 0%, rgba(251, 243, 240, 0.92) 100%) !important;
    border-color: rgba(212, 168, 154, 0.44) !important;
    color: var(--avatar-dark, #3A2E42);
    box-shadow:
      0 0 0 4px rgba(212, 168, 154, 0.08),
      0 9px 20px rgba(92, 77, 67, 0.12),
      inset 0 1px 0 rgba(255, 255, 255, 0.96) !important;
  }

  body:not(.chat-ny-in-conversation) .input-card .chat-upload-btn:active,
  body:not(.chat-ny-in-conversation) .input-card .chat-plus-btn:active {
    transform: translateY(0) scale(0.985);
    box-shadow:
      0 3px 10px rgba(92, 77, 67, 0.1),
      inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
  }

  body:not(.chat-ny-in-conversation) .input-card .chat-input-action {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    background: transparent !important;
    box-shadow: none !important;
    transition:
      transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1),
      background 0.2s ease,
      color 0.2s ease;
  }

  body:not(.chat-ny-in-conversation) .input-card .chat-input-action:hover {
    transform: translateY(-1px);
    background: rgba(251, 243, 240, 0.58) !important;
    color: var(--warm-text);
  }

  body:not(.chat-ny-in-conversation) .input-card #chat-direct-mic-btn {
    color: var(--warm-text-light, #6F6259) !important;
  }

  body:not(.chat-ny-in-conversation) .input-card #chat-direct-mic-btn:hover {
    color: var(--warm-text, #4F443D) !important;
  }

  body:not(.chat-ny-in-conversation) .input-card #chat-direct-mic-btn svg {
    width: 26px !important;
    height: 26px !important;
    stroke-width: 2.15px;
  }

  body:not(.chat-ny-in-conversation) .input-card .chat-upload-btn svg,
  body:not(.chat-ny-in-conversation) .input-card .chat-plus-btn svg,
  body:not(.chat-ny-in-conversation) .input-card .chat-input-action svg,
  body:not(.chat-ny-in-conversation) .input-card .chat-send-btn svg {
    transform-origin: 50% 50%;
    transition:
      transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1),
      opacity 0.2s ease;
  }

  body:not(.chat-ny-in-conversation) .input-card .chat-upload-btn:hover svg,
  body:not(.chat-ny-in-conversation) .input-card .chat-plus-btn:hover svg,
  body:not(.chat-ny-in-conversation) .input-card .chat-input-action:hover svg {
    transform: scale(1.08);
  }

  body:not(.chat-ny-in-conversation) .input-card .chat-send-btn,
  body:not(.chat-ny-in-conversation) .input-card .chat-send-btn.is-empty {
    position: relative;
    width: 64px !important;
    height: 64px !important;
    min-width: 64px !important;
    min-height: 64px !important;
    max-height: 64px !important;
    border-radius: 50% !important;
    overflow: visible !important;
    opacity: 1 !important;
    border: 0 !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    background: transparent !important;
    background-color: transparent !important;
    background-clip: padding-box !important;
    color: var(--white) !important;
    box-shadow: none !important;
    filter: none !important;
  }

  body:not(.chat-ny-in-conversation) .input-card .chat-send-btn:hover {
    transform: translateY(-1px) scale(1.02);
    background: transparent !important;
    box-shadow: none !important;
    filter: none !important;
  }

  body:not(.chat-ny-in-conversation) .input-card .chat-send-btn::before {
    content: '' !important;
    display: block !important;
    position: absolute;
    inset: 0;
    z-index: 0;
    box-sizing: border-box;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--chat-send-from) 0%, var(--chat-send-to) 100%);
    box-shadow: 0 2px 8px rgba(92, 77, 67, 0.12);
    pointer-events: none;
  }

  body:not(.chat-ny-in-conversation) .input-card .chat-send-btn:hover::before {
    background: linear-gradient(135deg, var(--chat-send-hover-from) 0%, var(--chat-send-hover-to) 100%);
    box-shadow: 0 3px 10px rgba(92, 77, 67, 0.16);
  }

  body:not(.chat-ny-in-conversation) .input-card .chat-send-btn:active::before {
    box-shadow:
      0 0 0 6px rgba(217, 154, 122, 0.09),
      0 2px 6px rgba(92, 77, 67, 0.1),
      inset 0 1px 0 rgba(255, 255, 255, 0.28);
  }

  body:not(.chat-ny-in-conversation) .input-card .chat-send-btn.is-empty:hover {
    transform: none !important;
    background: transparent !important;
    box-shadow: none !important;
    filter: none !important;
  }

  body:not(.chat-ny-in-conversation) .input-card .chat-send-btn.is-empty::before {
    border-color: rgba(244, 232, 226, 0.9);
    background: linear-gradient(135deg, rgba(230, 170, 143, 0.74) 0%, rgba(217, 154, 122, 0.74) 100%);
    box-shadow:
      0 0 0 7px rgba(217, 154, 122, 0.075),
      0 0 18px rgba(217, 154, 122, 0.12),
      0 3px 8px rgba(92, 77, 67, 0.08),
      inset 0 1px 0 rgba(255, 255, 255, 0.28);
  }

  body:not(.chat-ny-in-conversation) .input-card .chat-send-btn.is-empty:hover::before {
    border-color: rgba(244, 232, 226, 0.9);
    background: linear-gradient(135deg, rgba(230, 170, 143, 0.74) 0%, rgba(217, 154, 122, 0.74) 100%);
    box-shadow:
      0 0 0 7px rgba(217, 154, 122, 0.075),
      0 0 18px rgba(217, 154, 122, 0.12),
      0 3px 8px rgba(92, 77, 67, 0.08),
      inset 0 1px 0 rgba(255, 255, 255, 0.28);
  }

  body:not(.chat-ny-in-conversation) .input-card .chat-send-btn::after {
    content: none !important;
    display: none !important;
  }

  body:not(.chat-ny-in-conversation) .input-card .chat-send-btn svg {
    position: relative;
    z-index: 1;
  }

  body:not(.chat-ny-in-conversation) .input-card .chat-send-btn:hover svg {
    transform: translateY(-1px);
  }

  body:not(.chat-ny-in-conversation) .input-card .chat-send-btn:active {
    transform: translateY(0) scale(0.985);
  }

  body:not(.chat-ny-in-conversation) .chat-ny-prompt-area,
  body:not(.chat-ny-in-conversation) .chat-prompt-area {
    max-width: 960px;
    margin: 0 auto 40px;
  }

  body:not(.chat-ny-in-conversation) .quick-actions,
  body:not(.chat-ny-in-conversation) .chat-prompt-chips {
    max-width: 960px !important;
    gap: 14px !important;
  }

  body:not(.chat-ny-in-conversation) .quick-action,
  body:not(.chat-ny-in-conversation) .chat-prompt-chip {
    min-height: 44px;
    padding: 10px 22px;
    border-radius: 22px;
    font-size: var(--font-size-base);
  }

  body:not(.chat-ny-in-conversation) .quick-action:active,
  body:not(.chat-ny-in-conversation) .chat-prompt-chip:active {
    transform: scale(0.97) !important;
  }

  body:not(.chat-ny-in-conversation) .input-card .chat-input-field,
  body:not(.chat-ny-in-conversation) .input-card .chat-input-field::placeholder {
    line-height: 1.45 !important;
  }

  body:not(.chat-ny-in-conversation) .input-card textarea.chat-input-field {
    min-height: 48px !important;
    padding: 4px 14px 8px !important;
    overflow-y: hidden;
  }

  .chat-plus-menu,
  .chat-doc-picker {
    border: 1px solid rgba(228, 220, 212, 0.78) !important;
    border-radius: 18px !important;
    background: rgba(255, 254, 251, 1) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow:
      0 10px 34px rgba(92, 77, 67, 0.12),
      0 2px 8px rgba(92, 77, 67, 0.06),
      inset 0 1px 0 rgba(255, 255, 255, 0.82) !important;
    overflow: hidden;
  }

  .chat-plus-menu-item,
  .chat-plus-menu-toggle,
  .chat-doc-import-gdocs {
    min-height: 38px;
    padding-top: 9px !important;
    padding-bottom: 9px !important;
    color: var(--warm-text) !important;
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
  }

  .chat-plus-menu-item:hover,
  .chat-plus-menu-toggle:hover,
  .chat-doc-import-gdocs:hover {
    background: rgba(251, 243, 240, 0.84) !important;
    color: var(--icon-active) !important;
  }

  .chat-plus-menu-item svg,
  .chat-plus-menu-toggle svg,
  .chat-doc-import-gdocs svg {
    color: var(--warm-text-light) !important;
  }

  .chat-plus-menu-sep {
    background: rgba(228, 220, 212, 0.82) !important;
  }

  @media (prefers-reduced-motion: reduce) {
    body:not(.chat-ny-in-conversation) .input-card *,
    body:not(.chat-ny-in-conversation) .quick-action,
    body:not(.chat-ny-in-conversation) .chat-prompt-chip {
      animation: none !important;
      transition: none !important;
      scroll-behavior: auto !important;
    }
  }

  @media (max-width: 767px) {
    body:not(.chat-ny-in-conversation) .content {
      padding: 40px 20px 24px;
    }

    body:not(.chat-ny-in-conversation) .greeting h1 {
      font-size: var(--font-size-7xl) !important;
    }

    body:not(.chat-ny-in-conversation) .input-wrapper {
      width: 100%;
    }

    body:not(.chat-ny-in-conversation) .input-card {
      min-height: 132px !important;
      padding: 16px 18px !important;
      border-radius: var(--radius-card, 18px) !important;
    }

    body:not(.chat-ny-in-conversation) .input-card .chat-input-toolbar {
      margin-top: 22px !important;
      min-height: 46px;
    }

    body:not(.chat-ny-in-conversation) .input-card .chat-upload-btn,
    body:not(.chat-ny-in-conversation) .input-card .chat-plus-btn,
    body:not(.chat-ny-in-conversation) .input-card .chat-input-action,
    body:not(.chat-ny-in-conversation) .input-card .chat-send-btn {
      width: 44px !important;
      height: 44px !important;
      min-width: 44px !important;
      min-height: 44px !important;
      max-height: 44px !important;
      border-width: 0 !important;
    }
  }


  .skip-link {
    position: absolute;
    top: -60px;
    left: 0;
    background: var(--warm-text);
    color: var(--white);
    padding: 12px 24px;
    z-index: 9000; /* --z-skip */
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    border-radius: 0 0 8px 0;
    text-decoration: none;
    transition: top 0.15s ease;
  }

  .skip-link:focus-visible {
    top: 0;
  }

  /* Prompt panel premium cascade guards */
  body:not(.chat-ny-in-conversation) .quick-action,
  body:not(.chat-ny-in-conversation) .chat-prompt-chip {
    box-shadow:
      0 1px 4px rgba(92, 77, 67, 0.05),
      inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
  }

  body:not(.chat-ny-in-conversation) .quick-action:hover,
  body:not(.chat-ny-in-conversation) .chat-prompt-chip:hover {
    box-shadow:
      0 4px 14px rgba(92, 77, 67, 0.08),
      inset 0 1px 0 rgba(255, 255, 255, 0.55) !important;
  }

  body:not(.chat-ny-in-conversation) .chat-prompt-chip.chat-prompt-add:hover {
    background: rgba(110, 138, 126, 0.08) !important;
    border-color: rgba(110, 138, 126, 0.7) !important;
    color: #4A7A68 !important;
    box-shadow:
      0 4px 14px rgba(92, 77, 67, 0.08),
      inset 0 1px 0 rgba(255, 255, 255, 0.55) !important;
  }

  body:not(.chat-ny-in-conversation) .chat-prompt-panel .chat-prompt-list .chat-prompt-item:hover,
  body:not(.chat-ny-in-conversation) .chat-prompt-panel .chat-prompt-list .chat-prompt-item:focus-within,
  body:not(.chat-ny-in-conversation) .chat-prompt-item:hover {
    background: rgba(212, 168, 154, 0.06) !important;
    border-color: transparent !important;
  }

  body:not(.chat-ny-in-conversation) .chat-prompt-form .chat-prompt-form-input,
  body:not(.chat-ny-in-conversation) .chat-prompt-form textarea {
    border: 1px solid rgba(228, 220, 212, 0.6) !important;
    border-radius: 14px !important;
    background: rgba(255, 254, 251, 0.7) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--warm-text) !important;
    font-family: var(--font-family) !important;
    font-size: var(--font-size-base) !important;
    padding: 12px 14px !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  }

  body:not(.chat-ny-in-conversation) .chat-prompt-panel .chat-prompt-form .chat-prompt-form-input:focus-visible,
  body:not(.chat-ny-in-conversation) .chat-prompt-panel .chat-prompt-form textarea:focus-visible,
  body:not(.chat-ny-in-conversation) .chat-prompt-form .chat-prompt-form-input:focus-visible,
  body:not(.chat-ny-in-conversation) .chat-prompt-form textarea:focus-visible {
    border-color: rgba(212, 168, 154, 0.5) !important;
    box-shadow: none !important;
    outline: none !important;
    outline-offset: 2px !important;
    background: rgba(255, 254, 251, 0.9) !important;
  }

  @media (max-width: 767px) {
    body:not(.chat-ny-in-conversation) .chat-prompt-form .chat-prompt-form-input,
    body:not(.chat-ny-in-conversation) .chat-prompt-form textarea {
      font-size: var(--font-size-base) !important;
      padding: 12px 14px !important;
      border-radius: 12px !important;
    }
  }

  /* === Blød Bølge Warm Dark === */
  [data-theme="dark"] body,
  [data-theme="dark"] body.chat-ny-in-conversation,
  [data-theme="dark"] .app,
  [data-theme="dark"] body.chat-ny-in-conversation .app {
    background: linear-gradient(180deg, var(--color-bg, #171512) 0%, var(--color-card, #201B18) 55%, var(--color-bg, #181613) 100%) !important;
    color: #E8DDD4;
  }

  [data-theme="dark"] .main,
  [data-theme="dark"] #chat-main {
    background: transparent !important;
    color: #E8DDD4;
  }

  [data-theme="dark"] body.chat-ny-in-conversation .chat-header {
    background: linear-gradient(to bottom,
      rgba(30, 28, 26, 1) 0%,
      rgba(30, 28, 26, 1) 55%,
      rgba(30, 28, 26, 0.70) 80%,
      rgba(30, 28, 26, 0) 100%) !important;
  }

  [data-theme="dark"] body.chat-ny-in-conversation .chat-input {
    background: linear-gradient(to top,
      rgba(30, 28, 26, 1) 0%,
      rgba(30, 28, 26, 1) 50%,
      rgba(30, 28, 26, 0) 100%) !important;
  }

  [data-theme="dark"] .main::before,
  [data-theme="dark"] .main::after {
    border-color: rgba(212, 168, 154, 0.08);
  }

  [data-theme="dark"] .decorative-arcs,
  [data-theme="dark"] .decorative-arcs-2 {
    border-color: rgba(212, 168, 154, 0.07);
    opacity: 0.38;
  }

  [data-theme="dark"] .decorative-arcs-bl,
  [data-theme="dark"] .decorative-arcs-bl-2 {
    border-color: rgba(168, 197, 184, 0.07);
    opacity: 0.35;
  }

  [data-theme="dark"] .input-card,
  [data-theme="dark"] body:not(.chat-ny-in-conversation) .input-card,
  [data-theme="dark"] .card,
  [data-theme="dark"] .chat-input-box,
  [data-theme="dark"] body.chat-ny-in-conversation .chat-input-box,
  [data-theme="dark"] .chat-prompt-panel-inner,
  [data-theme="dark"] .chat-prompt-form-input,
  [data-theme="dark"] .chat-prompt-form textarea,
  [data-theme="dark"] .chat-plus-menu,
  [data-theme="dark"] .chat-doc-picker,
  [data-theme="dark"] .quick-action,
  [data-theme="dark"] .chat-prompt-chip {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  [data-theme="dark"] .chat-plus-menu,
  [data-theme="dark"] .chat-doc-picker {
    background: rgba(42, 38, 34, 0.95) !important;
    border-color: rgba(232, 224, 216, 0.10) !important;
    box-shadow:
      0 10px 34px rgba(20, 18, 15, 0.4),
      0 2px 8px rgba(20, 18, 15, 0.3),
      inset 0 1px 0 rgba(232, 224, 216, 0.06) !important;
  }

  [data-theme="dark"] .chat-plus-menu-item,
  [data-theme="dark"] .chat-plus-menu-toggle,
  [data-theme="dark"] .chat-doc-import-gdocs {
    color: #E8DDD4 !important;
  }

  [data-theme="dark"] .chat-plus-menu-item:hover,
  [data-theme="dark"] .chat-plus-menu-toggle:hover,
  [data-theme="dark"] .chat-doc-import-gdocs:hover {
    background: rgba(232, 224, 216, 0.08) !important;
    color: #E8DDD4 !important;
  }

  [data-theme="dark"] .chat-plus-menu-item svg,
  [data-theme="dark"] .chat-plus-menu-toggle svg,
  [data-theme="dark"] .chat-doc-import-gdocs svg {
    color: rgba(232, 224, 216, 0.6) !important;
  }

  [data-theme="dark"] .chat-plus-menu-sep {
    background: rgba(232, 224, 216, 0.08) !important;
  }

  [data-theme="dark"] .greeting h1,
  [data-theme="dark"] .card-title,
  [data-theme="dark"] .chat-prompt-panel-title {
    color: #E8DDD4 !important;
  }

  [data-theme="dark"] .card-dot--rose {
    background: rgba(212, 168, 154, 0.74) !important;
    box-shadow: 0 2px 6px rgba(212, 168, 154, 0.14) !important;
  }

  [data-theme="dark"] .card-dot--sage {
    background: rgba(168, 197, 184, 0.72) !important;
    box-shadow: 0 2px 6px rgba(168, 197, 184, 0.12) !important;
  }

  [data-theme="dark"] .card-dot--slate {
    background: rgba(168, 176, 196, 0.72) !important;
    box-shadow: 0 2px 6px rgba(168, 176, 196, 0.12) !important;
  }

  [data-theme="dark"] .card-count::after {
    width: 7px !important;
    height: 7px !important;
    opacity: 0.52 !important;
    animation: none !important;
    box-shadow: none !important;
  }


  [data-theme="dark"] .card--todo .card-count::after {
    background: rgba(212, 168, 154, 0.58) !important;
  }

  [data-theme="dark"] .card--email .card-count::after {
    background: rgba(168, 197, 184, 0.54) !important;
  }

  [data-theme="dark"] .card--calendar .card-count::after {
    background: rgba(168, 176, 196, 0.54) !important;
  }

  [data-theme="dark"] .greeting p,
  [data-theme="dark"] .card-item-text,
  [data-theme="dark"] .card-item-meta,
  [data-theme="dark"] .card-empty,
  [data-theme="dark"] .chat-message-time,
  [data-theme="dark"] .chat-prompt-empty p {
    color: var(--color-text-secondary, #B8AFA6) !important;
  }

  [data-theme="dark"] .card,
  [data-theme="dark"] .chat-message.received .chat-bubble,
  [data-theme="dark"] .chat-message.sent .chat-bubble,
  [data-theme="dark"] .chat-bubble-file-chip,
  [data-theme="dark"] .chat-code-block,
  [data-theme="dark"] .chat-prompt-item {
    background: rgb(42, 38, 34) !important;
    border-color: rgba(232, 224, 216, 0.08) !important;
    color: #E8DDD4 !important;
  }

  [data-theme="dark"] .card:hover,
  [data-theme="dark"] .card:focus-within {
    border-color: rgba(232, 224, 216, 0.18) !important;
  }

  [data-theme="dark"] body:not(.chat-ny-in-conversation) .input-card {
    background: rgba(42, 38, 34, 0.85) !important;
    border-color: rgba(232, 224, 216, 0.10) !important;
    box-shadow:
      0 14px 40px rgba(20, 18, 15, 0.34),
      0 2px 8px rgba(20, 18, 15, 0.22),
      inset 0 1px 0 rgba(232, 224, 216, 0.06) !important;
  }

  [data-theme="dark"] body:not(.chat-ny-in-conversation) .input-card::before {
    background: linear-gradient(180deg, rgba(232, 224, 216, 0.06) 0%, rgba(232, 224, 216, 0) 100%) !important;
    opacity: 0.42;
  }

  [data-theme="dark"] body:not(.chat-ny-in-conversation) .input-card:focus-within {
    border-color: rgba(212, 168, 154, 0.42) !important;
    box-shadow: none !important;
  }

  [data-theme="dark"] .chat-ny-prompt-area .quick-action,
  [data-theme="dark"] .chat-ny-prompt-area .chat-prompt-chip,
  [data-theme="dark"] body:not(.chat-ny-in-conversation) .quick-action,
  [data-theme="dark"] body:not(.chat-ny-in-conversation) .chat-prompt-chip,
  [data-theme="dark"] .chat-prompt-chip,
  [data-theme="dark"] .quick-action {
    background: rgba(42, 38, 34, 0.85) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-color: rgba(232, 224, 216, 0.15) !important;
    color: #E8DDD4 !important;
  }

  [data-theme="dark"] .bb-lang-list {
    border-color: rgba(200, 190, 178, 0.15);
    background: rgba(42, 38, 34, 0.96);
    box-shadow: 0 8px 24px rgba(20, 18, 15, 0.34);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  [data-theme="dark"] .bb-lang-option {
    color: #E8DDD4;
  }

  [data-theme="dark"] .bb-lang-option:hover {
    background: rgba(212, 168, 154, 0.10);
  }

  [data-theme="dark"] .bb-lang-option.bb-lang-active {
    color: var(--rose-light, #F4E8E2);
  }

  [data-theme="dark"] .quick-action--rose,
  [data-theme="dark"] .chat-ny-prompt-area .quick-action--rose,
  [data-theme="dark"] body:not(.chat-ny-in-conversation) .quick-action--rose,
  [data-theme="dark"] .chat-prompt-chip[data-color="red"],
  [data-theme="dark"] .chat-prompt-chip[data-color="orange"],
  [data-theme="dark"] .chat-prompt-chip[data-color="pink"],
  [data-theme="dark"] .chat-ny-prompt-area .chat-prompt-chip[data-color="red"],
  [data-theme="dark"] .chat-ny-prompt-area .chat-prompt-chip[data-color="orange"],
  [data-theme="dark"] .chat-ny-prompt-area .chat-prompt-chip[data-color="pink"],
  [data-theme="dark"] body:not(.chat-ny-in-conversation) .chat-prompt-chip[data-color="red"],
  [data-theme="dark"] body:not(.chat-ny-in-conversation) .chat-prompt-chip[data-color="orange"],
  [data-theme="dark"] body:not(.chat-ny-in-conversation) .chat-prompt-chip[data-color="pink"] {
    background: rgba(212, 168, 154, 0.16) !important;
    border-color: rgba(212, 168, 154, 0.19) !important;
  }

  [data-theme="dark"] .quick-action--sage,
  [data-theme="dark"] .chat-ny-prompt-area .quick-action--sage,
  [data-theme="dark"] body:not(.chat-ny-in-conversation) .quick-action--sage,
  [data-theme="dark"] .chat-prompt-chip[data-color="green"],
  [data-theme="dark"] .chat-prompt-chip[data-color="yellow"],
  [data-theme="dark"] .chat-ny-prompt-area .chat-prompt-chip[data-color="green"],
  [data-theme="dark"] .chat-ny-prompt-area .chat-prompt-chip[data-color="yellow"],
  [data-theme="dark"] body:not(.chat-ny-in-conversation) .chat-prompt-chip[data-color="green"],
  [data-theme="dark"] body:not(.chat-ny-in-conversation) .chat-prompt-chip[data-color="yellow"] {
    background: rgba(160, 200, 170, 0.14) !important;
    border-color: rgba(160, 200, 170, 0.16) !important;
  }

  [data-theme="dark"] .quick-action--slate,
  [data-theme="dark"] .chat-ny-prompt-area .quick-action--slate,
  [data-theme="dark"] body:not(.chat-ny-in-conversation) .quick-action--slate,
  [data-theme="dark"] .chat-prompt-chip[data-color="gray"],
  [data-theme="dark"] .chat-prompt-chip[data-color="blue"],
  [data-theme="dark"] .chat-prompt-chip[data-color="purple"],
  [data-theme="dark"] .chat-ny-prompt-area .chat-prompt-chip[data-color="gray"],
  [data-theme="dark"] .chat-ny-prompt-area .chat-prompt-chip[data-color="blue"],
  [data-theme="dark"] .chat-ny-prompt-area .chat-prompt-chip[data-color="purple"],
  [data-theme="dark"] body:not(.chat-ny-in-conversation) .chat-prompt-chip[data-color="gray"],
  [data-theme="dark"] body:not(.chat-ny-in-conversation) .chat-prompt-chip[data-color="blue"],
  [data-theme="dark"] body:not(.chat-ny-in-conversation) .chat-prompt-chip[data-color="purple"] {
    background: rgba(168, 176, 196, 0.14) !important;
    border-color: rgba(168, 176, 196, 0.16) !important;
  }

  /* --- chat-prompt-panel dark mode --- */
  [data-theme="dark"] .chat-prompt-panel-inner,
  [data-theme="dark"] .chat-prompt-panel-inner[data-color],
  [data-theme="dark"] .chat-prompt-panel-inner[data-color="red"],
  [data-theme="dark"] .chat-prompt-panel-inner[data-color="orange"],
  [data-theme="dark"] .chat-prompt-panel-inner[data-color="pink"],
  [data-theme="dark"] .chat-prompt-panel-inner[data-color="green"],
  [data-theme="dark"] .chat-prompt-panel-inner[data-color="yellow"],
  [data-theme="dark"] .chat-prompt-panel-inner[data-color="gray"],
  [data-theme="dark"] .chat-prompt-panel-inner[data-color="blue"],
  [data-theme="dark"] .chat-prompt-panel-inner[data-color="purple"] {
    background: rgba(42, 38, 34, 1) !important;
    border: 1px solid rgba(232, 224, 216, 0.10) !important;
    color: #E8DDD4 !important;
    position: relative;
    isolation: isolate;
    box-shadow:
      0 24px 70px rgba(20, 18, 15, 0.45),
      0 4px 14px rgba(20, 18, 15, 0.3),
      inset 0 1px 0 rgba(232, 224, 216, 0.06) !important;
  }

  [data-theme="dark"] .chat-prompt-panel-inner::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: inherit;
    background: rgb(42, 38, 34);
    pointer-events: none;
  }

  [data-theme="dark"] .chat-prompt-panel-inner > * {
    position: relative;
    z-index: 1;
  }

  [data-theme="dark"] .card--email .card-item,
  [data-theme="dark"] .card--email .card-item--ai,
  [data-theme="dark"] .card--email .card-item--unread {
    background: rgba(42, 38, 34, 0.72) !important;
    border-color: rgba(232, 224, 216, 0.10) !important;
    color: #E8DDD4 !important;
    box-shadow: inset 0 1px 0 rgba(232, 224, 216, 0.04) !important;
  }

  [data-theme="dark"] .card--email .card-item--quiet {
    opacity: 1;
  }

  [data-theme="dark"] .card-item--sending .card-item-link::after {
    border-color: var(--sage, #A8C5B8) !important;
    border-top-color: transparent !important;
  }

  [data-theme="dark"] body.chat-ny-in-conversation .chat-input,
  body.chat-ny-in-conversation[data-theme="dark"] .chat-input {
    background: linear-gradient(to top,
      rgba(30, 28, 26, 1) 0%,
      rgba(30, 28, 26, 1) 50%,
      rgba(30, 28, 26, 0) 100%) !important;
  }

  [data-theme="dark"] .ss-scroll-fab {
    background: rgba(42, 38, 34, 0.88);
    border-color: rgba(200, 190, 178, 0.15);
    color: #E8DDD4;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  [data-theme="dark"] .ss-scroll-fab:hover {
    background: rgba(42, 38, 34, 0.95);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  }

  [data-theme="dark"] .chat-input-box,
  [data-theme="dark"] .chat-input-box--welcome,
  [data-theme="dark"] body.chat-ny-in-conversation .chat-input-box,
  [data-theme="dark"] .chat-prompt-form-input,
  [data-theme="dark"] .chat-prompt-form textarea,
  [data-theme="dark"] body:not(.chat-ny-in-conversation) .chat-prompt-form .chat-prompt-form-input,
  [data-theme="dark"] body:not(.chat-ny-in-conversation) .chat-prompt-form textarea {
    background: rgba(42, 38, 34, 0.60) !important;
    border-color: rgba(232, 224, 216, 0.10) !important;
    color: #E8DDD4 !important;
  }

  html[data-theme="dark"] body.chat-ny-in-conversation .chat-input-box {
    background: rgb(42, 38, 34) !important;
  }

  [data-theme="dark"] .chat-input-field,
  [data-theme="dark"] .chat-input-field::placeholder,
  [data-theme="dark"] .chat-prompt-form-input::placeholder,
  [data-theme="dark"] .chat-prompt-form textarea::placeholder {
    color: #E8DDD4 !important;
  }

  [data-theme="dark"] .chat-input-field::placeholder,
  [data-theme="dark"] .chat-prompt-form-input::placeholder,
  [data-theme="dark"] .chat-prompt-form textarea::placeholder {
    opacity: 0.62;
  }

  [data-theme="dark"] .chat-prompt-panel-inner .chat-prompt-form-input,
  [data-theme="dark"] .chat-prompt-panel-inner .chat-prompt-form textarea {
    background: rgba(52, 47, 42, 0.90) !important;
    border-color: rgba(232, 224, 216, 0.12) !important;
  }

  [data-theme="dark"] body:not(.chat-ny-in-conversation) .chat-prompt-panel .chat-prompt-panel-inner .chat-prompt-form .chat-prompt-form-input,
  [data-theme="dark"] body:not(.chat-ny-in-conversation) .chat-prompt-panel .chat-prompt-panel-inner .chat-prompt-form textarea {
    background: rgba(52, 47, 42, 0.90) !important;
    border-color: rgba(232, 224, 216, 0.12) !important;
  }

  [data-theme="dark"] body:not(.chat-ny-in-conversation) .chat-prompt-panel .chat-prompt-panel-inner .chat-prompt-form .chat-prompt-form-input:focus-visible,
  [data-theme="dark"] body:not(.chat-ny-in-conversation) .chat-prompt-panel .chat-prompt-panel-inner .chat-prompt-form textarea:focus-visible {
    background: rgba(52, 47, 42, 0.90) !important;
    border-color: rgba(212, 168, 154, 0.30) !important;
    box-shadow: none !important;
    outline: none !important;
  }

  [data-theme="dark"] .chat-prompt-icon-btn {
    background: rgba(52, 47, 42, 0.80) !important;
    border-color: rgba(232, 224, 216, 0.10) !important;
    color: #E8DDD4 !important;
  }

  [data-theme="dark"] .chat-prompt-icon-btn.is-selected {
    background: rgba(212, 168, 154, 0.18) !important;
    border-color: rgba(212, 168, 154, 0.30) !important;
    box-shadow: 0 0 0 3px rgba(212, 168, 154, 0.10) !important;
  }

  [data-theme="dark"] .chat-prompt-color-btn {
    border-color: rgba(42, 38, 34, 0.80) !important;
    box-shadow: 0 0 0 1px rgba(232, 224, 216, 0.15) !important;
  }

  [data-theme="dark"] .chat-prompt-color-btn.is-selected {
    box-shadow: 0 0 0 3px rgba(212, 168, 154, 0.22) !important;
  }

  [data-theme="dark"] .chat-prompt-panel-header svg {
    color: rgba(232, 224, 216, 0.60) !important;
  }

  [data-theme="dark"] .chat-prompt-panel-close {
    color: rgba(232, 224, 216, 0.50) !important;
  }

  [data-theme="dark"] .chat-prompt-panel-header {
    border-bottom-color: rgba(232, 224, 216, 0.08) !important;
  }

  [data-theme="dark"] .chat-prompt-form {
    border-top-color: rgba(232, 224, 216, 0.08) !important;
  }

  html[data-theme="dark"] body.chat-ny-in-conversation .chat-input-box:focus-within,
  html[data-theme="dark"] body.chat-ny-in-conversation .chat-input:focus-within .chat-input-box,
  [data-theme="dark"] body.chat-ny-in-conversation .chat-input-box:focus-within,
  [data-theme="dark"] body.chat-ny-in-conversation .chat-input:focus-within .chat-input-box {
    border-color: rgba(212, 168, 154, 0.42) !important;
    box-shadow: none !important;

  }

  [data-theme="dark"] .chat-input-action:hover,
  [data-theme="dark"] .chat-upload-btn:hover,
  [data-theme="dark"] .chat-plus-btn:hover,
  [data-theme="dark"] .chat-back-btn:hover,
  [data-theme="dark"] .chat-prompt-chip:hover,
  [data-theme="dark"] .chat-prompt-header-action:hover,
  [data-theme="dark"] .chat-prompt-panel-close:hover,
  [data-theme="dark"] .chat-prompt-item:hover,
  [data-theme="dark"] .chat-prompt-item:focus-within,
  [data-theme="dark"] .chat-prompt-icon-btn:hover,
  [data-theme="dark"] .chat-prompt-color-btn:hover,
  [data-theme="dark"] .chat-prompt-form-cancel:hover {
    background: rgba(212, 168, 154, 0.08) !important;
  }

  [data-theme="dark"] .chat-prompt-header-action.chat-prompt-cat-delete:hover,
  [data-theme="dark"] .chat-prompt-cat-delete:hover {
    background: rgba(220, 38, 38, 0.12) !important;
    color: var(--color-error, #f87171) !important;
  }

  [data-theme="dark"] .chat-prompt-chip[data-color="red"]:hover,
  [data-theme="dark"] .chat-prompt-chip[data-color="orange"]:hover,
  [data-theme="dark"] .chat-prompt-chip[data-color="pink"]:hover {
    background: rgba(212, 168, 154, 0.18) !important;
    border-color: rgba(212, 168, 154, 0.22) !important;
  }

  [data-theme="dark"] .chat-prompt-chip[data-color="green"]:hover,
  [data-theme="dark"] .chat-prompt-chip[data-color="yellow"]:hover {
    background: rgba(160, 200, 170, 0.15) !important;
    border-color: rgba(160, 200, 170, 0.18) !important;
  }

  [data-theme="dark"] .chat-prompt-chip[data-color="gray"]:hover,
  [data-theme="dark"] .chat-prompt-chip[data-color="blue"]:hover,
  [data-theme="dark"] .chat-prompt-chip[data-color="purple"]:hover {
    background: rgba(168, 176, 196, 0.15) !important;
    border-color: rgba(168, 176, 196, 0.18) !important;
  }

  [data-theme="dark"] body:not(.chat-ny-in-conversation) .input-card .chat-upload-btn,
  [data-theme="dark"] body:not(.chat-ny-in-conversation) .input-card .chat-plus-btn {
    width: clamp(44px, 4.6vw, 52px) !important;
    height: clamp(44px, 4.6vw, 52px) !important;
    min-width: clamp(44px, 4.6vw, 52px) !important;
    min-height: clamp(44px, 4.6vw, 52px) !important;
    max-height: clamp(44px, 4.6vw, 52px) !important;
    background: rgba(42, 38, 34, 0.78) !important;
    border-color: rgba(232, 224, 216, 0.12) !important;
    color: var(--color-text-secondary, #B8AFA6) !important;
    box-shadow:
      0 4px 14px rgba(20, 18, 15, 0.28),
      inset 0 1px 0 rgba(232, 224, 216, 0.08) !important;
  }

  [data-theme="dark"] body:not(.chat-ny-in-conversation) .input-card .chat-upload-btn:hover,
  [data-theme="dark"] body:not(.chat-ny-in-conversation) .input-card .chat-plus-btn:hover {
    background: rgba(212, 168, 154, 0.10) !important;
    border-color: rgba(212, 168, 154, 0.28) !important;
    color: #E8DDD4 !important;
    box-shadow:
      0 0 0 4px rgba(212, 168, 154, 0.06),
      0 8px 18px rgba(20, 18, 15, 0.30),
      inset 0 1px 0 rgba(232, 224, 216, 0.10) !important;
  }

  [data-theme="dark"] body:not(.chat-ny-in-conversation) .input-card #chat-direct-mic-btn {
    color: var(--color-text-secondary, #B8AFA6) !important;
  }

  [data-theme="dark"] body:not(.chat-ny-in-conversation) .input-card #chat-direct-mic-btn:hover {
    background: rgba(212, 168, 154, 0.08) !important;
    color: #E8DDD4 !important;
  }

  [data-theme="dark"] body:not(.chat-ny-in-conversation) .input-card .chat-send-btn,
  [data-theme="dark"] body:not(.chat-ny-in-conversation) .input-card .chat-send-btn.is-empty {
    width: clamp(44px, 5vw, 58px) !important;
    height: clamp(44px, 5vw, 58px) !important;
    min-width: clamp(44px, 5vw, 58px) !important;
    min-height: clamp(44px, 5vw, 58px) !important;
    max-height: clamp(44px, 5vw, 58px) !important;
    color: #E8DDD4 !important;
  }

  [data-theme="dark"] body:not(.chat-ny-in-conversation) .input-card .chat-send-btn::before {
    border: 0 solid transparent !important;
    background: linear-gradient(135deg, var(--rose-dark) 0%, rgba(155, 96, 80, 0.82) 100%) !important;
    box-shadow:
      0 0 0 5px rgba(212, 168, 154, 0.08),
      0 8px 18px rgba(20, 18, 15, 0.30),
      inset 0 1px 0 rgba(232, 224, 216, 0.16) !important;
  }

  [data-theme="dark"] body:not(.chat-ny-in-conversation) .input-card .chat-send-btn:hover::before {
    border-color: transparent !important;
    background: linear-gradient(135deg, var(--rose-dark) 0%, rgba(155, 96, 80, 0.92) 100%) !important;
    box-shadow:
      0 0 0 5px rgba(212, 168, 154, 0.10),
      0 10px 22px rgba(20, 18, 15, 0.34),
      inset 0 1px 0 rgba(232, 224, 216, 0.18) !important;
  }

  [data-theme="dark"] body:not(.chat-ny-in-conversation) .input-card .chat-send-btn.is-empty::before,
  [data-theme="dark"] body:not(.chat-ny-in-conversation) .input-card .chat-send-btn.is-empty:hover::before {
    border-color: transparent !important;
    background: linear-gradient(135deg, rgba(155, 96, 80, 0.78) 0%, rgba(155, 96, 80, 0.66) 100%) !important;
    box-shadow:
      0 0 0 4px rgba(212, 168, 154, 0.06),
      0 7px 16px rgba(20, 18, 15, 0.26),
      inset 0 1px 0 rgba(232, 224, 216, 0.14) !important;
  }

  [data-theme="dark"] body.chat-ny-in-conversation .confirm-overlay,
  [data-theme="dark"] body.chat-ny-in-conversation .chat-confirm-overlay,
  [data-theme="dark"] body.chat-ny-in-conversation [class*="modal-overlay"],
  [data-theme="dark"] body.chat-ny-in-conversation [class*="dialog-overlay"] {
    background: rgba(20, 18, 15, 0.48) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  [data-theme="dark"] body.chat-ny-in-conversation .confirm-dialog,
  [data-theme="dark"] body.chat-ny-in-conversation .chat-confirm-dialog,
  [data-theme="dark"] body.chat-ny-in-conversation [class*="dialog-content"],
  [data-theme="dark"] body.chat-ny-in-conversation [class*="modal-content"] {
    background: rgba(42, 38, 34, 1) !important;
    border-color: rgba(232, 224, 216, 0.10) !important;
    color: #E8DDD4 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow:
      0 4px 16px rgba(20, 18, 15, 0.30),
      0 16px 48px rgba(20, 18, 15, 0.22),
      inset 0 1px 0 rgba(232, 224, 216, 0.06) !important;
  }

  [data-theme="dark"] body.chat-ny-in-conversation .confirm-title,
  [data-theme="dark"] body.chat-ny-in-conversation .confirm-message {
    color: #E8DDD4 !important;
  }

  [data-theme="dark"] body.chat-ny-in-conversation .chat-confirm-dialog textarea,
  [data-theme="dark"] body.chat-ny-in-conversation [class*="dialog-content"] input,
  [data-theme="dark"] body.chat-ny-in-conversation [class*="dialog-content"] textarea {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(232, 224, 216, 0.12) !important;
    color: #E8DDD4 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  [data-theme="dark"] body.chat-ny-in-conversation .confirm-cancel {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(232, 224, 216, 0.12) !important;
    color: #E8DDD4 !important;
  }

  [data-theme="dark"] body.chat-ny-in-conversation .confirm-ok {
    background: var(--rose, #D4A89A) !important;
    border-color: transparent !important;
    color: var(--color-bg, #1A1714) !important;
    box-shadow: 0 4px 12px rgba(212, 168, 154, 0.24) !important;
  }

  [data-theme="dark"] body.chat-ny-in-conversation .chat-message.sent .chat-bubble,
  [data-theme="dark"] body.chat-ny-in-conversation .chat-message.user .chat-bubble,
  [data-theme="dark"] body.chat-ny-in-conversation .chat-message--user .chat-bubble {
    background: rgba(212, 168, 154, 0.10) !important;
    border-color: rgba(212, 168, 154, 0.12) !important;
    color: #E8DDD4 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  [data-theme="dark"] body.chat-ny-in-conversation .chat-message.received .chat-bubble,
  [data-theme="dark"] body.chat-ny-in-conversation .chat-message.assistant .chat-bubble,
  [data-theme="dark"] body.chat-ny-in-conversation .chat-message--assistant .chat-bubble {
    max-width: 100% !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #E8DDD4 !important;
    font-family: var(--font-family) !important;
    font-size: var(--font-size-base) !important;
    line-height: 1.7 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
  }

  [data-theme="dark"] body.chat-ny-in-conversation .chat-message-time {
    color: var(--warm-text-light, #9F9184) !important;
  }

  [data-theme="dark"] body.chat-ny-in-conversation .chat-message.received .chat-msg-action-btn,
  [data-theme="dark"] body.chat-ny-in-conversation .chat-message.assistant .chat-msg-action-btn,
  [data-theme="dark"] body.chat-ny-in-conversation .chat-message--assistant .chat-msg-action-btn {
    background: transparent !important;
    border-color: transparent !important;
    color: #E8DDD4 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  [data-theme="dark"] body.chat-ny-in-conversation .chat-message.received .chat-msg-action-btn:hover,
  [data-theme="dark"] body.chat-ny-in-conversation .chat-message.assistant .chat-msg-action-btn:hover,
  [data-theme="dark"] body.chat-ny-in-conversation .chat-message--assistant .chat-msg-action-btn:hover,
  [data-theme="dark"] body.chat-ny-in-conversation .chat-message.received .chat-msg-action-btn:focus-visible,
  [data-theme="dark"] body.chat-ny-in-conversation .chat-message.assistant .chat-msg-action-btn:focus-visible,
  [data-theme="dark"] body.chat-ny-in-conversation .chat-message--assistant .chat-msg-action-btn:focus-visible {
    background: rgba(212, 168, 154, 0.10) !important;
    border-color: transparent !important;
    box-shadow: none !important;
  }

  [data-theme="dark"] body.chat-ny-in-conversation .chat-msg-action-btn.tts-playing {
    color: var(--warm-text, #E8DDD4) !important;
    background: rgba(255, 255, 255, 0.10) !important;
  }

  [data-theme="dark"] body.chat-ny-in-conversation .chat-msg-action-btn.tts-paused {
    color: var(--warm-text, #E8DDD4) !important;
    background: rgba(255, 255, 255, 0.06) !important;
  }

  [data-theme="dark"] body.chat-ny-in-conversation .chat-message.ss-reading-active {
    background: rgba(255, 255, 255, 0.04) !important;
  }

  [data-theme="dark"] body.chat-ny-in-conversation .chat-ny-conversation .chat-send-btn {
    background: var(--rose, #D4A89A) !important;
    color: var(--color-bg, #1A1714) !important;
    box-shadow: 0 4px 12px rgba(212, 168, 154, 0.24) !important;
  }

  [data-theme="dark"] body.chat-ny-in-conversation .chat-ny-conversation .chat-send-btn svg {
    color: var(--color-bg, #1A1714) !important;
    stroke: var(--color-bg, #1A1714) !important;
  }

  [data-theme="dark"] body.chat-ny-in-conversation .chat-ny-conversation .chat-input-box {
    background: rgb(42, 38, 34) !important;
    border-color: rgba(232, 224, 216, 0.12) !important;
    color: #E8DDD4 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  html[data-theme="dark"] body.chat-ny-in-conversation .chat-ny-conversation .chat-input-box:focus-within,
  [data-theme="dark"] body.chat-ny-in-conversation .chat-ny-conversation .chat-input-box:focus-within {
    border-color: rgba(212, 168, 154, 0.42) !important;
    box-shadow: none !important;
  }

  [data-theme="dark"] body.chat-ny-in-conversation .chat-ny-conversation .chat-input-box textarea,
  [data-theme="dark"] body.chat-ny-in-conversation .chat-ny-conversation .chat-input-box input {
    color: #E8DDD4 !important;
  }

  [data-theme="dark"] body.chat-ny-in-conversation .chat-ny-conversation .chat-input-box textarea::placeholder,
  [data-theme="dark"] body.chat-ny-in-conversation .chat-ny-conversation .chat-input-box input::placeholder {
    color: var(--warm-text-light, #9F9184) !important;
  }

  /* Mobile viewport hardening */
  @media (max-width: 767px) {
    .main {
      height: 100vh;
      height: 100dvh;
    }

    body.chat-ny-in-conversation .chat-input {
      bottom: max(16px, env(safe-area-inset-bottom)) !important;
      padding-bottom: 0 !important;
    }

    .chat-prompt-chip,
    .chat-prompt-suggestion-btn {
      min-height: 44px !important;
      padding: 12px 16px !important;
      font-size: var(--font-size-base) !important;
    }

    .chat-prompt-panel .chat-prompt-item {
      min-height: 44px !important;
      padding: 12px 14px !important;
    }

    .card-item-link {
      min-height: 44px !important;
    }

    body.chat-ny-in-conversation .chat-header {
      flex-wrap: nowrap !important;
      gap: 4px !important;
    }


    body.chat-ny-in-conversation .chat-message.sent .chat-bubble,
    body.chat-ny-in-conversation .chat-message.user .chat-bubble,
    body.chat-ny-in-conversation .chat-message--user .chat-bubble {
      max-width: 88% !important;
      min-width: 60px !important;
    }

    body.chat-ny-in-conversation .chat-message.received .chat-bubble,
    body.chat-ny-in-conversation .chat-message.assistant .chat-bubble,
    body.chat-ny-in-conversation .chat-message--assistant .chat-bubble {
      max-width: 100% !important;
      min-width: 0 !important;
    }

    .chat-bubble pre,
    .chat-bubble code {
      max-width: 100% !important;
      overflow-x: auto !important;
      font-size: var(--font-size-base) !important;
    }
  }

  /* Landscape phones with keyboard pressure */
  @media (max-width: 767px) and (max-height: 400px) {
    body.chat-ny-in-conversation .chat-messages {
      padding-top: 8px !important;
      padding-bottom: 0 !important;
    }

    body.chat-ny-in-conversation .chat-input {
      bottom: max(16px, env(safe-area-inset-bottom)) !important;
      padding: 8px 0 0 !important;
    }

    .chat-input-box {
      min-height: 44px !important;
      max-height: 80px !important;
    }
  }

  /* Small phones */
  @media (max-width: 380px) {
    .greeting h1 {
      font-size: var(--font-size-2xl) !important;
    }

    .greeting p {
      font-size: var(--font-size-base) !important;
    }

    .chat-prompt-chip {
      min-height: 44px !important;
      padding: 10px 12px !important;
      font-size: var(--font-size-base) !important;
    }

    .chat-input-box,
    .chat-input-box textarea,
    .chat-input-box input {
      font-size: var(--font-size-base) !important;
    }

    body.chat-ny-in-conversation .chat-messages {
      padding: 16px 0 0 !important;
      gap: 14px !important;
    }
  }

  @media (max-width: 380px) and (max-height: 400px) {
    body.chat-ny-in-conversation .chat-messages {
      padding-top: 8px !important;
      padding-bottom: 0 !important;
    }
  }

  body.chat-ny-in-conversation .chat-messages {
    padding-bottom: 40px !important;
  }

  /* Final dark conversation guard: keep the rounded input pill opaque so content cannot bleed through it. */
  html[data-theme="dark"] body.chat-ny-in-conversation .chat-input-box,
  html[data-theme="dark"] body.chat-ny-in-conversation .chat-input .chat-input-box,
  [data-theme="dark"] body.chat-ny-in-conversation .chat-input-box,
  [data-theme="dark"] body.chat-ny-in-conversation .chat-input .chat-input-box {
    background: rgb(42, 38, 34) !important;
    border-color: rgba(232, 224, 216, 0.12) !important;
    color: #E8DDD4 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  /* Deep QA 2026-05-03: the welcome textarea lives inside .input-card, so the inner
     input box must stay transparent in dark mode instead of drawing a second card. */
  html[data-theme="dark"] body:not(.chat-ny-in-conversation) .input-card .chat-input-box--welcome,
  [data-theme="dark"] body:not(.chat-ny-in-conversation) .input-card .chat-input-box--welcome {
    background: transparent !important;
    border-color: transparent !important;
    color: #E8DDD4 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  /* Deep QA 2026-05-03: voice overlay is shared, but chat-ny exposes it here. Keep
     its local controls at BDA/WCAG touch size without editing the shared overlay. */
  body:has(#chat-app) .voice-overlay-close,
  body:has(#chat-app) .voice-type-toggle,
  body:has(#chat-app) .voice-action-pill,
  body:has(#chat-app) .voice-stop-btn {
    min-width: 44px !important;
    min-height: 44px !important;
    font-size: var(--font-size-base) !important;
    line-height: 1.4 !important;
  }

  body:has(#chat-app) .voice-type-toggle {
    height: 44px !important;
    padding: 0 16px !important;
  }

  body:has(#chat-app) .voice-overlay p,
  body:has(#chat-app) .voice-overlay button,
  body:has(#chat-app) .voice-overlay .voice-transcript-hint,
  body:has(#chat-app) .voice-overlay .voice-typed-hint,
  body:has(#chat-app) .voice-overlay .voice-footer-hint,
  body:has(#chat-app) .voice-overlay .voice-result-label,
  body:has(#chat-app) .voice-overlay .voice-result-task-meta,
  body:has(#chat-app) .voice-overlay .voice-action-pill {
    font-size: var(--font-size-base) !important;
    line-height: 1.4 !important;
  }

  body:has(#chat-app) .voice-overlay-close {
    width: 44px !important;
    height: 44px !important;
  }

  body:not(.chat-ny-in-conversation) .input-card #chat-direct-mic-btn {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
  }

  body:has(#chat-app) .skip-link {
    min-height: 44px !important;
    display: inline-flex !important;
    align-items: center;
  }

  body:has(#chat-app) .onb-skip,
  body:has(#chat-app) .onb-mini-label,
  body:has(#chat-app) .onb-mini-badge {
    font-size: var(--font-size-base) !important;
    line-height: 1.4 !important;
  }

  body:has(#chat-app) .onb-card h2,
  body:has(#chat-app) .onb-dialog h2,
  body:has(#chat-app) .onb-modal h2 {
    line-height: 1.4 !important;
  }

  @media (prefers-reduced-motion: reduce) {
    #chat-main *,
    #chat-main *::before,
    #chat-main *::after,
    body:has(#chat-app) .onb-backdrop,
    body:has(#chat-app) .onb-backdrop *,
    body:has(#chat-app) .onb-backdrop *::before,
    body:has(#chat-app) .onb-backdrop *::after {
      animation: none !important;
      transition: none !important;
      scroll-behavior: auto !important;
    }
  }

  /* Deep QA 2026-05-03: closed voice overlay must not stay in keyboard order. */
  body:has(#chat-app) .voice-overlay[aria-hidden="true"],
  body:has(#chat-app) .voice-overlay:not(.is-open),
  body:has(#chat-app) .voice-overlay-backdrop[aria-hidden="true"],
  body:has(#chat-app) .voice-overlay-backdrop:not(.is-open) {
    visibility: hidden !important;
  }

  body:has(#chat-app) .voice-overlay.is-open,
  body:has(#chat-app) .voice-overlay-backdrop.is-open {
    visibility: visible !important;
  }

  @media (prefers-reduced-motion: reduce) {
    body:has(#chat-app) .voice-overlay,
    body:has(#chat-app) .voice-overlay-backdrop,
    body:has(#chat-app) .voice-overlay * {
      animation: none !important;
      transition: none !important;
    }
  }

  body:has(#chat-app) .voice-overlay {
    transform: translate(-50%, -50%) scale(1) !important;
    transition: opacity 0.2s ease !important;
  }

  @media (max-width: 767px) and (max-height: 450px) {
    body:has(#chat-app) .voice-overlay--typing,
    body:has(#chat-app) .voice-overlay--typing.is-open {
      transform: translateX(-50%) scale(1) !important;
    }
  }

  /* Deep QA 2026-05-03: bundle/voice runtime controls are appended outside
     normal dashboard cards. Keep them touch-safe from this page overlay. */
  body:has(#chat-app) .ss-scroll-fab {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
  }

  body:has(#chat-app) .chat-scroll-fab {
    display: none !important;
  }

  body:has(#chat-app) .section-label {
    font-size: var(--font-size-base) !important;
    line-height: 1.4 !important;
  }

  /* Chat-ny auto-resize restore: keep the premium shell, but let text set height. */
  body:not(.chat-ny-in-conversation) .input-card {
    min-height: 0 !important;
    padding: 15px 16px 14px !important;
  }

  body:not(.chat-ny-in-conversation) .input-card .chat-input-field,
  body:not(.chat-ny-in-conversation) .input-card .chat-input-field::placeholder {
    font-family: var(--font-family) !important;
    font-style: normal !important;
    font-size: var(--font-size-lg) !important;
    line-height: 1.45 !important;
  }

  body:not(.chat-ny-in-conversation) .input-card textarea.chat-input-field {
    min-height: 48px !important;
    max-height: 200px !important;
    padding: 4px 14px 8px !important;
    overflow-y: hidden;
  }

  #chat-main :is(#chat-direct-input, #chat-input-field):focus-visible {
    outline-color: transparent !important;
    outline-width: 0 !important;
    outline-offset: 0 !important;
    border-color: transparent !important;
    box-shadow: none !important;
    background: transparent !important;
  }

  body:not(.chat-ny-in-conversation) .input-card .chat-input-toolbar {
    min-height: 52px !important;
    margin-top: 12px !important;
  }

  @media (max-width: 767px) {
    body:not(.chat-ny-in-conversation) .input-card {
      min-height: 0 !important;
      padding: 8px 10px 8px !important;
    }

    body:not(.chat-ny-in-conversation) .input-card .chat-input-field,
    body:not(.chat-ny-in-conversation) .input-card .chat-input-field::placeholder {
      font-size: var(--font-size-base) !important;
    }

    body:not(.chat-ny-in-conversation) .input-card .chat-input-toolbar {
      min-height: 44px !important;
      margin-top: 10px !important;
    }
  }

  /* Visual QA 2026-05-09: keep the chat welcome surface on fixed design
     tokens after the older premium-shell overrides above. */
  html[data-theme="dark"]:has(#chat-app) {
    --color-bg: #1E1C1A !important;
    --color-bg-rgb: 30, 28, 26 !important;
    background: #1E1C1A !important;
  }

  body:not(.chat-ny-in-conversation) .input-card {
    border-radius: 18px !important;
  }

  body:not(.chat-ny-in-conversation) .input-card::before {
    border-radius: 17px 17px 12px 12px !important;
  }

  body:not(.chat-ny-in-conversation) .chat-prompt-chip {
    border-radius: 20px !important;
  }

  body:not(.chat-ny-in-conversation) .card {
    border-radius: 16px !important;
  }

  body:not(.chat-ny-in-conversation) .input-card .chat-upload-btn,
  body:not(.chat-ny-in-conversation) .input-card .chat-plus-btn,
  body:not(.chat-ny-in-conversation) .input-card .chat-input-action,
  body:not(.chat-ny-in-conversation) .input-card .chat-send-btn,
  body:not(.chat-ny-in-conversation) .input-card .chat-send-btn.is-empty {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    box-sizing: border-box !important;
  }

  body:not(.chat-ny-in-conversation) .input-card .chat-send-btn.is-empty {
    opacity: 0.35 !important;
  }

  html[data-theme="dark"] body:not(.chat-ny-in-conversation) .input-card .chat-upload-btn,
  html[data-theme="dark"] body:not(.chat-ny-in-conversation) .input-card .chat-plus-btn,
  html[data-theme="dark"] body:not(.chat-ny-in-conversation) .input-card .chat-input-action,
  html[data-theme="dark"] body:not(.chat-ny-in-conversation) .input-card .chat-send-btn,
  html[data-theme="dark"] body:not(.chat-ny-in-conversation) .input-card .chat-send-btn.is-empty {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    box-sizing: border-box !important;
  }

  html[data-theme="dark"] body:not(.chat-ny-in-conversation) .input-card .chat-send-btn.is-empty {
    opacity: 0.35 !important;
  }

  body:has(#chat-app) .decorative-arcs,
  body:has(#chat-app) .decorative-arcs-2,
  body:has(#chat-app) .decorative-arcs-bl {
    display: block !important;
  }

  body:has(#chat-app) .card-body[data-signal="loading"] {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    gap: 10px !important;
    min-height: 72px !important;
    overflow: hidden !important;
  }

  body:has(#chat-app) .card-body[data-signal="loading"] .card-body-title,
  body:has(#chat-app) .card-body[data-signal="loading"] .card-body-meta {
    display: block !important;
    color: transparent !important;
    height: 14px !important;
    margin: 0 !important;
    border-radius: 999px !important;
    background: linear-gradient(90deg, rgba(212, 168, 154, 0.12) 0%, rgba(212, 168, 154, 0.24) 50%, rgba(212, 168, 154, 0.12) 100%) !important;
    background-size: 200% 100% !important;
    animation: shimmer-bar 1.5s ease-in-out infinite !important;
  }

  body:has(#chat-app) .card-body[data-signal="loading"] .card-body-title {
    width: 72% !important;
  }

  body:has(#chat-app) .card-body[data-signal="loading"] .card-body-meta {
    width: 48% !important;
    height: 12px !important;
    opacity: 0.72 !important;
  }

  html[data-theme="dark"] body:has(#chat-app) .card-body[data-signal="loading"] .card-body-title,
  html[data-theme="dark"] body:has(#chat-app) .card-body[data-signal="loading"] .card-body-meta {
    background: linear-gradient(90deg, rgba(232, 224, 216, 0.06) 0%, rgba(232, 224, 216, 0.14) 50%, rgba(232, 224, 216, 0.06) 100%) !important;
    background-size: 200% 100% !important;
  }

  html[data-theme="dark"] body.chat-ny-in-conversation .chat-back-btn,
  [data-theme="dark"] body.chat-ny-in-conversation .chat-back-btn {
    box-shadow:
      0 2px 8px rgba(0, 0, 0, 0.28),
      inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
  }

  body.chat-ny-in-conversation .chat-ny-conversation .chat-upload-btn,
  body.chat-ny-in-conversation .chat-ny-conversation .chat-plus-btn,
  body.chat-ny-in-conversation .chat-ny-conversation .chat-input-action,
  body.chat-ny-in-conversation .chat-ny-conversation .chat-send-btn,
  body.chat-ny-in-conversation .chat-ny-conversation .chat-send-btn.is-empty {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    box-sizing: border-box !important;
  }

  .chat-send-btn.is-empty:not(.is-stop),
  .chat-send-btn[hidden] {
    display: none !important;
  }

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

/* Chat font compliance: keep /chat/ on the Inter guide grid. */
body:has(#chat-app) {
  /* Display-scale type tokens (above global --font-size-3xl: 22px) */
  --font-size-4xl: 24px;
  --font-size-5xl: 28px;
  --font-size-6xl: 32px;
  --font-size-7xl: 36px;
  --font-size-8xl: 40px;
  /* Component-specific display sizes */
  --font-size-flow-heading: 38px;
  --font-size-flow-heading-sm: 31px;

  font-family: var(--font-family) !important;
  font-size: var(--font-size-base) !important;
}

body:has(#chat-app) :is(
  #chat-main,
  #bb-sidebar,
  #bb-mobile-nav,
  .mn-fab-group,
  .mn-more-sheet,
  .skip-link,
  .voice-overlay,
  .voice-overlay-backdrop,
  #onb-backdrop,
  .chat-plus-menu
),
body:has(#chat-app) :is(
  #chat-main,
  #bb-sidebar,
  #bb-mobile-nav,
  .mn-fab-group,
  .mn-more-sheet,
  .voice-overlay,
  .voice-overlay-backdrop,
  #onb-backdrop,
  .chat-plus-menu
) :where(*:not(pre):not(code):not(kbd):not(samp)) {
  font-family: var(--font-family) !important;
}

body:has(#chat-app) #bb-sidebar .bb-sidebar-tooltip-target::after {
  font-family: var(--font-family) !important;
  font-size: var(--font-size-base) !important;
  font-weight: var(--font-weight-medium) !important;
  letter-spacing: 0 !important;
}

body:has(#chat-app) #chat-main :is(pre, code, kbd, samp, pre *) {
  font-family: var(--font-mono, 'SF Mono', 'SFMono-Regular', Monaco, 'Cascadia Code', Consolas, monospace) !important;
  font-size: var(--font-size-sm) !important;
}

body:has(#chat-app) .greeting h1 {
  font-size: var(--font-size-8xl) !important;
  font-weight: var(--font-weight-bold) !important;
  line-height: 1.15 !important;
  letter-spacing: 0 !important;
}

body:has(#chat-app) .greeting p {
  font-size: var(--font-size-base) !important;
  font-weight: var(--font-weight-normal) !important;
  line-height: 1.45 !important;
  letter-spacing: 0 !important;
}

body:has(#chat-app) :is(
  .card-title,
  .chat-prompt-panel-title,
  .confirm-title,
  #onb-backdrop .onb-screen h2
) {
  font-size: var(--font-size-2xl) !important;
  font-weight: var(--font-weight-semibold) !important;
  line-height: 1.25 !important;
  letter-spacing: 0 !important;
}

body:has(#chat-app) .card-body-title {
  font-size: var(--font-size-base) !important;
  font-weight: var(--font-weight-medium) !important;
  line-height: 1.4 !important;
  letter-spacing: 0 !important;
}

body:has(#chat-app) .chat-prompt-chip {
  font-size: var(--font-size-base) !important;
  font-weight: var(--font-weight-medium) !important;
  letter-spacing: 0 !important;
}

body:has(#chat-app) :is(#chat-direct-input, #chat-input-field),
body:has(#chat-app) :is(#chat-direct-input, #chat-input-field)::placeholder {
  font-size: var(--font-size-lg) !important;
  font-weight: var(--font-weight-normal) !important;
  line-height: 1.45 !important;
  letter-spacing: 0 !important;
}

body:has(#chat-app) :is(
  .chat-plus-btn,
  .chat-upload-btn,
  .chat-input-action,
  .chat-send-btn,
  .chat-msg-footer,
  .chat-msg-footer button,
  #bb-sidebar .sidebar-mic,
  #bb-sidebar .sidebar-avatar,
  .ss-scroll-fab,
  .voice-overlay-close,
  .voice-mic-btn
) {
  font-size: var(--font-size-sm) !important;
}

body:has(#chat-app) #bb-mobile-nav :is(.mn-tab, .mn-tab-label) {
  font-size: var(--font-size-xs) !important;
  font-weight: var(--font-weight-medium) !important;
  letter-spacing: 0 !important;
}

body:has(#chat-app) #bb-mobile-nav .mn-badge {
  font-size: var(--font-size-xs) !important;
  font-weight: var(--font-weight-semibold) !important;
  letter-spacing: 0 !important;
}

body:has(#chat-app) :is(.mn-fab, .mn-fab-mini, .mn-more-link) {
  font-size: var(--font-size-sm) !important;
  font-weight: var(--font-weight-semibold) !important;
  letter-spacing: 0 !important;
}

body:has(#chat-app) .voice-overlay-sofia-badge {
  font-size: var(--font-size-sm) !important;
  font-weight: var(--font-weight-semibold) !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
}

@media (max-width: 767px) {
  body:has(#chat-app) .greeting h1 {
    font-size: var(--font-size-7xl) !important;
  }
}

@media (max-width: 380px) {
  body:has(#chat-app) .greeting h1 {
    font-size: var(--font-size-6xl) !important;
  }
}

/* ============================================================================
   Calm view chooser + view switching (port from app #2952/#2874 for #465)
   Surface: public. Segmented Brief/Kort/Ingen tablist with sage active pill,
   view-switching via .content[data-calm-view].
   ========================================================================== */


.calm-chooser {
  display: flex;
  width: fit-content;
  margin: 30px auto 14px;
  padding: 3px;
  gap: 2px;
  background: rgba(58, 47, 38, 0.04);
  border: 1px solid rgba(58, 47, 38, 0.08);
  border-radius: 999px;
  position: relative;
}

.calm-chooser::before {
  content: "";
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 160px;
  max-width: 60vw;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(228, 220, 212, 0.9), transparent);
  pointer-events: none;
}

#chat-main .calm-chooser-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 16px;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: #5C4D43;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

#chat-main .calm-chooser-btn:hover {
  background: rgba(58, 47, 38, 0.05);
  color: #3A2F26;
}

#chat-main .calm-chooser-btn[aria-selected="true"] {
  background: #6E8A7E;
  border-color: #6E8A7E;
  color: #FFFEFB;
  box-shadow: 0 1px 2px rgba(58, 47, 38, 0.10);
}

.calm-chooser-btn svg {
  width: 16px;
  height: 16px;
  stroke: #9A8E82;
  transition: stroke 0.15s ease;
}

#chat-main .calm-chooser-btn:hover svg {
  stroke: #5C4D43;
}

#chat-main .calm-chooser-btn[aria-selected="true"] svg {
  stroke: #FFFEFB;
}

#chat-main .calm-chooser-btn:focus-visible {
  outline: 2px solid #6E8A7E;
  outline-offset: 2px;
}

/* ── View switching ── */

.content[data-calm-view="brief"] .cards {
  display: none;
}

.content[data-calm-view="cards"] .sofia-signal-panel {
  display: none;
}

.content[data-calm-view="none"] .sofia-signal-panel {
  display: none;
}

.content[data-calm-view="none"] .cards {
  display: none;
}

/* ── Public Brief demo panel ── */

.sofia-signal-panel {
  width: 100%;
  max-width: 820px;
  margin: 0 auto 20px;
  padding: 0 20px;
}

.sofia-signal {
  border-radius: var(--radius-card, 18px);
  padding: 24px 28px;
  border: 1px solid rgba(228, 220, 212, 0.6);
  box-shadow:
    0 1px 2px rgba(92, 77, 67, 0.06),
    0 2px 8px rgba(92, 77, 67, 0.04);
  background: var(--white, #FFFEFB);
  transition: opacity 0.2s ease;
}

#chat-main .sofia-signal--active.calm-brief2 {
  display: block;
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  padding: 28px 30px;
  border-radius: 18px;
  background: var(--white, #FFFEFB);
  border: 1px solid rgba(228, 220, 212, 0.6);
  box-shadow:
    0 1px 2px rgba(92, 77, 67, 0.06),
    0 8px 28px rgba(92, 77, 67, 0.06);
  text-align: left;
  overflow: hidden;
}

#chat-main .calm-brief2 .sofia-signal-title,
#chat-main .calm-brief2 .calm-title {
  margin: 0 0 8px;
  font-size: var(--font-size-2xl);
  line-height: 1.18;
  color: #3A2F26;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

#chat-main .calm-brief2 .sofia-signal-summary,
#chat-main .calm-brief2 .calm-reassure {
  margin: 0 0 18px;
  font-size: var(--font-size-base, 15px);
  line-height: 1.5;
  color: var(--warm-text-light, #8C7B6F);
}

.calm-brief2--done {
  text-align: center;
}

#chat-main .sofia-signal--active.calm-brief2--done {
  position: relative;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  min-height: 92px;
  padding: 30px 40px 30px 120px;
  border: 1px solid rgba(110, 138, 126, 0.20);
  background: linear-gradient(157deg, #FBF4EA 0%, #FCF7EF 58%, #F5F1E6 100%);
}

#chat-main .sofia-signal--active.calm-brief2--done::before {
  content: "";
  position: absolute;
  inset: auto auto -10px 40px;
  width: 180px;
  height: 120px;
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(245, 206, 130, 0.34), rgba(245, 206, 130, 0) 72%);
  filter: blur(8px);
  opacity: 0.7;
}

#chat-main .calm-brief2--done .calm-scene {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

#chat-main .calm-brief2--done .calm-title {
  position: relative;
  z-index: 2;
  box-sizing: border-box;
  padding-left: 36px;
  padding-right: 36px;
  margin: 0;
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.1px;
  line-height: 1.2;
}

#chat-main .calm-brief2--done .calm-reassure {
  display: none;
}

#chat-main .calm-brief2--done .calm-flower {
  position: absolute;
  left: 30px;
  top: 50%;
  margin-top: -42px;
  width: 64px;
  height: 84px;
  transform-origin: 50% 100%;
  animation: calmFlowerSway 6.5s ease-in-out infinite;
}

#chat-main .calm-brief2--done .calm-hill {
  fill: rgba(110, 138, 126, 0.18);
}

#chat-main .calm-brief2--done .calm-stem {
  fill: none;
  stroke: #6E8A7E;
  stroke-width: 2.4;
  stroke-linecap: round;
}

#chat-main .calm-brief2--done .calm-leaf {
  fill: #7E9B8C;
}

#chat-main .calm-brief2--done .calm-petal {
  fill: #8FB0A0;
}

#chat-main .calm-brief2--done .calm-core {
  fill: #E8B85C;
}

#chat-main .calm-brief2--done .calm-meadow {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 46px;
  line-height: 0;
}

#chat-main .calm-brief2--done .calm-meadow svg {
  display: block;
  width: 100%;
  height: 46px;
}

#chat-main .calm-brief2--done .calm-meadow-hill--back {
  fill: rgba(110, 138, 126, 0.07);
}

#chat-main .calm-brief2--done .calm-meadow-hill--front {
  fill: rgba(110, 138, 126, 0.10);
}

#chat-main .calm-brief2--done .calm-far {
  position: absolute;
  width: 18px;
  height: 34px;
  transform-origin: 50% 100%;
}

#chat-main .calm-brief2--done .calm-far-stem {
  fill: none;
  stroke: #6E8A7E;
  stroke-width: 1.6;
  stroke-linecap: round;
}

#chat-main .calm-brief2--done .calm-far-head {
  fill: #7E9B8C;
}

#chat-main .calm-brief2--done .calm-far--a {
  right: 18%;
  bottom: 30px;
  opacity: 0.34;
}

#chat-main .calm-brief2--done .calm-far--b {
  right: 9%;
  bottom: 26px;
  opacity: 0.30;
}

#chat-main .calm-brief2--done .calm-far--b .calm-far-head {
  fill: #E8B85C;
}

#chat-main .calm-brief2--done .calm-far--c {
  right: 31%;
  bottom: 24px;
  width: 15px;
  height: 28px;
  opacity: 0.20;
}

#chat-main .calm-brief2--done .calm-spark {
  display: none;
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 206, 130, 0.9), rgba(245, 206, 130, 0) 70%);
  opacity: 0.5;
}

#chat-main .calm-brief2--done .calm-spark--1 {
  left: 17%;
  bottom: 34px;
}

#chat-main .calm-brief2--done .calm-spark--2 {
  left: 47%;
  bottom: 30px;
}

#chat-main .calm-brief2--done .calm-spark--3 {
  left: 73%;
  bottom: 40px;
}

#chat-main .calm-brief2--done .calm-refresh {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(110, 138, 126, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: rgba(110, 138, 126, 0.65);
  opacity: 0.55;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

#chat-main .calm-brief2--done .calm-refresh::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
}

#chat-main .calm-brief2--done .calm-refresh:hover,
#chat-main .calm-brief2--done .calm-refresh:focus-visible {
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(110, 138, 126, 0.40);
  color: rgba(110, 138, 126, 1);
  opacity: 1;
}

#chat-main .calm-brief2--done .calm-refresh:focus-visible {
  outline: 2px solid #6E8A7E;
  outline-offset: 2px;
}

#chat-main .calm-brief2--done .calm-refresh[disabled] {
  cursor: default;
}

#chat-main .calm-brief2--done .calm-refresh-ico {
  width: 16px;
  height: 16px;
  display: block;
}

#chat-main .calm-brief2--done .calm-refresh--busy {
  cursor: default;
  color: rgba(110, 138, 126, 1);
  opacity: 0.9;
}

#chat-main .calm-brief2--done .calm-refresh--busy .calm-refresh-ico {
  animation: calmRefreshSpin 0.8s linear infinite;
}

#chat-main .calm-brief2--done .calm-refresh--error {
  color: #B4664F;
  border-color: rgba(180, 102, 79, 0.40);
  opacity: 1;
}

@keyframes calmRefreshSpin {
  to { transform: rotate(360deg); }
}

/* ── Dark mode: chooser + public Brief ── */

html[data-theme="dark"] .calm-chooser {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.10);
}

html[data-theme="dark"] .calm-chooser::before {
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.14), transparent);
}

html[data-theme="dark"] #chat-main .calm-chooser-btn {
  border-color: transparent;
  color: var(--color-text-secondary, #A89B91);
}

html[data-theme="dark"] #chat-main .calm-chooser-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-text-primary, #FAF5EF);
}

html[data-theme="dark"] #chat-main .calm-chooser-btn:hover svg {
  stroke: var(--color-text-primary, #FAF5EF);
}

html[data-theme="dark"] #chat-main .calm-chooser-btn[aria-selected="true"] {
  background: #6E8A7E;
  border-color: #6E8A7E;
  color: #FFFEFB;
}

html[data-theme="dark"] #chat-main .calm-chooser-btn[aria-selected="true"] svg {
  stroke: #FFFEFB;
}

html[data-theme="dark"] #chat-main .sofia-signal--active.calm-brief2--done {
  background: linear-gradient(157deg, #201B18 0%, #1E1C1A 58%, #181613 100%);
  border-color: rgba(143, 165, 147, 0.20);
}

html[data-theme="dark"] #chat-main .calm-brief2--done .calm-title {
  color: #FAF5EF;
}

html[data-theme="dark"] #chat-main .calm-brief2--done .calm-reassure {
  color: #A89B91;
}

html[data-theme="dark"] #chat-main .sofia-signal--active.calm-brief2--done::before {
  opacity: 0.45;
}

html[data-theme="dark"] #chat-main .calm-brief2--done .calm-meadow-hill--back {
  fill: rgba(143, 165, 147, 0.10);
}

html[data-theme="dark"] #chat-main .calm-brief2--done .calm-meadow-hill--front {
  fill: rgba(143, 165, 147, 0.16);
}

html[data-theme="dark"] #chat-main .calm-brief2--done .calm-hill {
  fill: rgba(143, 165, 147, 0.18);
}

html[data-theme="dark"] #chat-main .calm-brief2--done .calm-refresh {
  border-color: rgba(143, 165, 147, 0.28);
  background: rgba(255, 255, 255, 0.06);
  color: #9FB6A6;
  opacity: 0.7;
}

html[data-theme="dark"] #chat-main .calm-brief2--done .calm-refresh:hover,
html[data-theme="dark"] #chat-main .calm-brief2--done .calm-refresh:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(143, 165, 147, 0.45);
  color: #C5D8CC;
  opacity: 1;
}

html[data-theme="dark"] #chat-main .calm-brief2--done .calm-refresh--error {
  color: #E0997F;
  border-color: rgba(224, 153, 127, 0.45);
}

/* ── Mobile: chooser + public Brief ── */

@keyframes calmFlowerSway {
  0%, 100% { transform: rotate(-2deg); }
  50% { transform: rotate(2deg); }
}

@media (max-width: 400px) {
  #chat-main .sofia-signal--active.calm-brief2--done {
    padding: 26px 22px 26px 96px;
  }

  #chat-main .calm-brief2--done .calm-title {
    padding-left: 0;
    padding-right: 18px;
    overflow-wrap: normal;
  }

  #chat-main .calm-brief2--done .calm-flower {
    left: 24px;
  }
}

@media (max-width: 380px) {
  .calm-chooser {
    gap: 1px;
    padding: 2px;
  }

  #chat-main .calm-chooser-btn {
    padding: 5px 10px;
    gap: 4px;
  }
}

@media (max-width: 360px) {
  .sofia-signal-panel {
    padding-left: 14px;
    padding-right: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #chat-main .calm-chooser-btn {
    transition: none;
  }
  .calm-chooser-btn svg {
    transition: none;
  }
  #chat-main .calm-brief2--done .calm-flower,
  #chat-main .calm-brief2--done .calm-stem,
  #chat-main .calm-brief2--done .calm-leaves,
  #chat-main .calm-brief2--done .calm-bloom,
  #chat-main .calm-brief2--done .calm-far,
  #chat-main .calm-brief2--done .calm-spark,
  #chat-main .sofia-signal--active.calm-brief2--done::before {
    animation: none;
    transform: none;
  }
  #chat-main .calm-brief2--done .calm-refresh {
    transition: none;
  }
  #chat-main .calm-brief2--done .calm-refresh--busy .calm-refresh-ico {
    animation: none;
  }
}

/* Public /chatgpt-dansk current app-parity welcome composer. */
@media (min-width: 768px) {
  .ss-public-chat:not(.chat-ny-in-conversation) .input-card {
    position: relative;
    min-height: 0 !important;
    padding: 12px !important;
    border-radius: 18px !important;
    background: #FFFEFB !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1px solid #E6E1D8 !important;
    box-shadow: 0 1px 2px rgba(58, 47, 38, 0.04), 0 4px 16px rgba(58, 47, 38, 0.04) !important;
  }

  .ss-public-chat:not(.chat-ny-in-conversation) .input-card::before {
    content: none !important;
    display: none !important;
  }

  .ss-public-chat:not(.chat-ny-in-conversation) .input-card .chat-empty-input-area {
    padding: 0 !important;
    margin: 0 !important;
  }

  .ss-public-chat:not(.chat-ny-in-conversation) .input-card textarea.chat-input-field {
    min-height: 26px !important;
    height: auto !important;
    padding: 0 !important;
    line-height: 1.5 !important;
  }

  .ss-public-chat:not(.chat-ny-in-conversation) .input-card .chat-input-box--welcome {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "files"
      "editor"
      "footer";
    align-items: stretch !important;
    gap: 0 !important;
    position: relative;
    z-index: 1;
    padding: 0 !important;
    overflow: visible !important;
  }

  .ss-public-chat:not(.chat-ny-in-conversation) .input-card .chat-file-preview {
    grid-area: files;
    padding: 0 0 8px 0 !important;
  }

  .ss-public-chat:not(.chat-ny-in-conversation) .input-card #chat-direct-input.ql-container {
    grid-area: editor;
    min-height: 26px !important;
    height: auto !important;
    padding: 0 !important;
    line-height: 1.5 !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
  }

  .ss-public-chat:not(.chat-ny-in-conversation) .input-card #chat-direct-input .ql-editor {
    min-height: 26px !important;
    height: auto !important;
    max-height: 180px !important;
    padding: 0 11px !important;
    line-height: 1.5 !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    touch-action: manipulation;
  }

  .ss-public-chat:not(.chat-ny-in-conversation) .input-card #chat-direct-input .ql-editor:not(.ql-blank) {
    overflow-y: auto !important;
  }

  .ss-public-chat:not(.chat-ny-in-conversation) .input-card #chat-direct-input .ql-editor > p {
    min-height: 26px !important;
    line-height: 1.5 !important;
    margin: 0 !important;
    overflow: visible !important;
  }

  .ss-public-chat:not(.chat-ny-in-conversation) .input-card #chat-direct-input .ql-editor.ql-blank::before,
  .ss-public-chat:not(.chat-ny-in-conversation) .input-card #chat-direct-input .ql-editor.ql-blank > p::before {
    left: 11px !important;
    right: 11px !important;
    top: 0 !important;
    color: #9A8E82 !important;
    line-height: 1.5 !important;
  }

  .ss-public-chat:not(.chat-ny-in-conversation) .input-card .chat-input-toolbar {
    grid-area: footer;
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    z-index: 1;
    min-height: 52px !important;
    margin: 12px 0 0 0 !important;
    padding: 0 !important;
    cursor: default !important;
  }

  .ss-public-chat:not(.chat-ny-in-conversation) .input-card .chat-input-toolbar-left,
  .ss-public-chat:not(.chat-ny-in-conversation) .input-card .chat-input-toolbar-right {
    align-items: center !important;
  }

  .ss-public-chat:not(.chat-ny-in-conversation) .input-card .chat-input-toolbar-right {
    gap: 4px !important;
  }

  .ss-public-chat:not(.chat-ny-in-conversation) .input-card .chat-plus-btn,
  .ss-public-chat:not(.chat-ny-in-conversation) .input-card .chat-input-action.ss-mic,
  .ss-public-chat:not(.chat-ny-in-conversation) .input-card .ss-voice-trigger {
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    cursor: pointer !important;
    transition: background-color .15s ease, color .15s ease, transform .15s cubic-bezier(.2,.8,.2,1) !important;
  }

  .ss-public-chat:not(.chat-ny-in-conversation) .input-card .ss-voice-trigger[hidden],
  .ss-public-chat:not(.chat-ny-in-conversation) .input-card .ss-voice-trigger[style*="display: none"] {
    display: none !important;
  }

  .ss-public-chat:not(.chat-ny-in-conversation) .input-card .chat-send-btn {
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    padding: 0 !important;
  }

  .ss-public-chat:not(.chat-ny-in-conversation) .input-card .chat-plus-wrap {
    width: 44px !important;
    height: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .ss-public-chat:not(.chat-ny-in-conversation) .input-card .chat-plus-btn svg,
  .ss-public-chat:not(.chat-ny-in-conversation) .input-card .chat-input-action.ss-mic svg,
  .ss-public-chat:not(.chat-ny-in-conversation) .input-card .ss-voice-trigger svg {
    width: 22px !important;
    height: 22px !important;
    display: block !important;
  }

  .ss-public-chat:not(.chat-ny-in-conversation) .input-card .chat-send-btn svg {
    display: block !important;
  }

  .ss-public-chat:not(.chat-ny-in-conversation) .input-card .chat-plus-btn svg *,
  .ss-public-chat:not(.chat-ny-in-conversation) .input-card .chat-input-action.ss-mic svg * {
    stroke-width: 2px !important;
    vector-effect: non-scaling-stroke;
  }

  .ss-public-chat:not(.chat-ny-in-conversation) .input-card .chat-plus-btn,
  .ss-public-chat:not(.chat-ny-in-conversation) .input-card .chat-plus-btn svg,
  .ss-public-chat:not(.chat-ny-in-conversation) .input-card .chat-plus-btn svg *,
  .ss-public-chat:not(.chat-ny-in-conversation) .input-card .chat-input-action.ss-mic,
  .ss-public-chat:not(.chat-ny-in-conversation) .input-card .chat-input-action.ss-mic svg,
  .ss-public-chat:not(.chat-ny-in-conversation) .input-card .chat-input-action.ss-mic svg * {
    color: #6B5B4E !important;
    stroke: #6B5B4E !important;
    fill: none !important;
  }

  .ss-public-chat:not(.chat-ny-in-conversation) .input-card .ss-voice-trigger,
  .ss-public-chat:not(.chat-ny-in-conversation) .input-card .ss-voice-trigger svg,
  .ss-public-chat:not(.chat-ny-in-conversation) .input-card .ss-voice-trigger svg * {
    color: #6B5B4E !important;
    fill: #6B5B4E !important;
  }

  .ss-public-chat:not(.chat-ny-in-conversation) .input-card .chat-plus-btn:hover,
  .ss-public-chat:not(.chat-ny-in-conversation) .input-card .chat-input-action.ss-mic:hover,
  .ss-public-chat:not(.chat-ny-in-conversation) .input-card .ss-voice-trigger:hover {
    background-color: rgba(92, 77, 67, .08) !important;
    box-shadow: none !important;
  }

  .ss-public-chat:not(.chat-ny-in-conversation) .input-card .chat-plus-btn:active,
  .ss-public-chat:not(.chat-ny-in-conversation) .input-card .chat-input-action:active,
  .ss-public-chat:not(.chat-ny-in-conversation) .input-card .ss-voice-trigger:active {
    transform: scale(.92) !important;
  }

  .ss-public-chat:not(.chat-ny-in-conversation) .input-card .chat-input-toolbar button:focus-visible,
  .ss-public-chat:not(.chat-ny-in-conversation) .input-card .chat-plus-btn:focus-visible,
  .ss-public-chat:not(.chat-ny-in-conversation) .input-card .ss-voice-trigger:focus-visible {
    outline: 2px solid #5C4D43 !important;
    outline-offset: 2px !important;
  }

  .ss-public-chat:not(.chat-ny-in-conversation) .input-card .chat-input-toolbar button:focus:not(:focus-visible) {
    outline: none !important;
  }
}

html[data-theme="dark"] .ss-public-chat:not(.chat-ny-in-conversation) .input-card {
  background: rgba(42, 38, 34, 0.85) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-color: rgba(232, 224, 216, 0.10) !important;
  box-shadow:
    0 14px 40px rgba(20, 18, 15, 0.34),
    0 2px 8px rgba(20, 18, 15, 0.22),
    inset 0 1px 0 rgba(232, 224, 216, 0.06) !important;
}

html[data-theme="dark"] .ss-public-chat:not(.chat-ny-in-conversation) .input-card::before {
  content: none !important;
  display: none !important;
}

/* ==========================================================================
   Mobile native composer fallback (#496 — port from app #3103/#3126).
   On mobile (≤767px) composer-quill.js replaces the Quill <div> with a native
   <textarea rows="1"> to avoid iOS WebKit caret bugs in contenteditable.
   ========================================================================== */
@media (max-width: 767px) {
  html body:not(.chat-ny-in-conversation) .input-card[data-mobile-native-card="1"],
  html body .input-card[data-mobile-native-card="1"] {
    min-height: 102px !important;
    height: auto !important;
    padding: 8px 8px 6px 8px !important;
    background: #FFFEFB !important;
    border: 1px solid #E6E1D8 !important;
    border-radius: 18px !important;
    box-shadow: 0 1px 2px rgba(58, 47, 38, 0.04), 0 4px 16px rgba(58, 47, 38, 0.04) !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }

  html body:not(.chat-ny-in-conversation) .input-card[data-mobile-native-card="1"]:focus-within,
  html body .input-card[data-mobile-native-card="1"]:focus-within {
    border-color: #E6E1D8 !important;
    box-shadow: 0 1px 2px rgba(58, 47, 38, 0.04), 0 4px 16px rgba(58, 47, 38, 0.04) !important;
    background: #FFFEFB !important;
  }

  html[data-theme="dark"] body:not(.chat-ny-in-conversation) .input-card[data-mobile-native-card="1"],
  html[data-theme="dark"] body .input-card[data-mobile-native-card="1"],
  [data-theme="dark"] body:not(.chat-ny-in-conversation) .input-card[data-mobile-native-card="1"],
  [data-theme="dark"] body .input-card[data-mobile-native-card="1"] {
    background: rgba(42, 38, 34, 0.85) !important;
    border-color: rgba(232, 224, 216, 0.10) !important;
    box-shadow:
      0 14px 40px rgba(20, 18, 15, 0.34),
      0 2px 8px rgba(20, 18, 15, 0.22),
      inset 0 1px 0 rgba(232, 224, 216, 0.06) !important;
  }

  html[data-theme="dark"] body:not(.chat-ny-in-conversation) .input-card[data-mobile-native-card="1"]:focus-within,
  html[data-theme="dark"] body .input-card[data-mobile-native-card="1"]:focus-within,
  [data-theme="dark"] body:not(.chat-ny-in-conversation) .input-card[data-mobile-native-card="1"]:focus-within,
  [data-theme="dark"] body .input-card[data-mobile-native-card="1"]:focus-within {
    background: rgba(42, 38, 34, 0.85) !important;
    border-color: rgba(212, 168, 154, 0.42) !important;
    box-shadow: none !important;
  }

  html body:not(.chat-ny-in-conversation) .input-card .chat-empty-input-area,
  html body .input-card .chat-empty-input-area {
    display: block !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
  }

  html body:not(.chat-ny-in-conversation) .input-card .chat-input-box--welcome,
  html body .input-card .chat-input-box--welcome {
    display: grid !important;
    grid-template-columns: 44px minmax(0, 1fr) auto !important;
    grid-template-areas:
      "files files files"
      "left editor right" !important;
    align-items: center !important;
    column-gap: 8px !important;
    row-gap: 0 !important;
    min-height: 44px !important;
  }

  html body:not(.chat-ny-in-conversation) .input-card #chat-direct-input.ql-container,
  html body .input-card #chat-direct-input.ql-container {
    grid-area: editor !important;
    align-self: center !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  html body:not(.chat-ny-in-conversation) .input-card .chat-input-toolbar,
  html body .input-card .chat-input-toolbar {
    display: contents !important;
    width: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  html body:not(.chat-ny-in-conversation) .input-card .chat-input-toolbar-left,
  html body .input-card .chat-input-toolbar-left {
    grid-area: left !important;
    justify-self: start !important;
    align-self: center !important;
  }

  html body:not(.chat-ny-in-conversation) .input-card .chat-input-toolbar-right,
  html body .input-card .chat-input-toolbar-right {
    grid-area: right !important;
    justify-self: end !important;
    gap: 2px !important;
    margin-left: auto !important;
    margin-right: 0 !important;
  }

  html body:not(.chat-ny-in-conversation) .input-card .chat-file-preview,
  html body .input-card .chat-file-preview {
    grid-area: files !important;
  }

  html body:not(.chat-ny-in-conversation) .input-card .chat-input-box--welcome[data-mobile-native-composer="1"],
  html body .input-card .chat-input-box--welcome[data-mobile-native-composer="1"] {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    grid-template-rows: auto auto auto !important;
    grid-template-areas:
      "files files"
      "editor editor"
      "left right" !important;
    align-items: center !important;
    width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
    box-sizing: border-box !important;
    column-gap: 0 !important;
    row-gap: 2px !important;
  }

  html body:not(.chat-ny-in-conversation) .input-card .chat-input-box--welcome[data-mobile-native-composer="1"]:has(.chat-file-preview:not(:empty)),
  html body .input-card .chat-input-box--welcome[data-mobile-native-composer="1"]:has(.chat-file-preview:not(:empty)) {
    flex-wrap: wrap !important;
  }

  html body:not(.chat-ny-in-conversation) .input-card .chat-input-box--welcome[data-mobile-native-composer="1"] .chat-file-preview:empty,
  html body .input-card .chat-input-box--welcome[data-mobile-native-composer="1"] .chat-file-preview:empty {
    display: none !important;
  }

  html body:not(.chat-ny-in-conversation) .input-card .chat-input-box--welcome[data-mobile-native-composer="1"] > .chat-file-preview,
  html body .input-card .chat-input-box--welcome[data-mobile-native-composer="1"] > .chat-file-preview {
    grid-area: files !important;
    padding: 0 6px !important;
  }

  html body:not(.chat-ny-in-conversation) .input-card .chat-input-box--welcome[data-mobile-native-composer="1"] .chat-file-preview:not(:empty),
  html body .input-card .chat-input-box--welcome[data-mobile-native-composer="1"] .chat-file-preview:not(:empty) {
    width: 100% !important;
  }

  html body:not(.chat-ny-in-conversation) .input-card .chat-input-box--welcome[data-mobile-native-composer="1"] > .chat-input-toolbar-left,
  html body:not(.chat-ny-in-conversation) .input-card .chat-input-box--welcome[data-mobile-native-composer="1"] > .chat-input-toolbar-right,
  html body .input-card .chat-input-box--welcome[data-mobile-native-composer="1"] > .chat-input-toolbar-left,
  html body .input-card .chat-input-box--welcome[data-mobile-native-composer="1"] > .chat-input-toolbar-right {
    display: inline-flex !important;
    align-items: center !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
  }

  html body:not(.chat-ny-in-conversation) .input-card .chat-input-box--welcome[data-mobile-native-composer="1"] > .chat-input-toolbar-left,
  html body .input-card .chat-input-box--welcome[data-mobile-native-composer="1"] > .chat-input-toolbar-left {
    grid-area: left !important;
    justify-self: start !important;
    margin-left: 0 !important;
  }

  html body:not(.chat-ny-in-conversation) .input-card .chat-input-box--welcome[data-mobile-native-composer="1"] > .chat-input-toolbar-right,
  html body .input-card .chat-input-box--welcome[data-mobile-native-composer="1"] > .chat-input-toolbar-right {
    grid-area: right !important;
    justify-self: end !important;
    gap: 2px !important;
    margin-left: auto !important;
    margin-right: 0 !important;
  }

  html body:not(.chat-ny-in-conversation) .input-card #chat-direct-input.ss-mobile-native-input,
  html body .input-card #chat-direct-input.ss-mobile-native-input {
    grid-area: editor !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 34px !important;
    max-height: 140px !important;
    padding: 6px 10px 4px 12px !important;
    margin: 0 !important;
    font-size: 16px !important;
    line-height: 1.5 !important;
    color: #3A2F26 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box !important;
    white-space: pre-wrap !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    resize: none !important;
  }

  html body:not(.chat-ny-in-conversation) .input-card #chat-direct-input.ss-mobile-native-input::placeholder,
  html body .input-card #chat-direct-input.ss-mobile-native-input::placeholder {
    color: #9A8E82 !important;
    opacity: 1 !important;
  }

  html body:not(.chat-ny-in-conversation) .input-card #chat-direct-input.ss-mobile-native-input:focus,
  html body:not(.chat-ny-in-conversation) .input-card #chat-direct-input.ss-mobile-native-input:focus-visible,
  html body .input-card #chat-direct-input.ss-mobile-native-input:focus,
  html body .input-card #chat-direct-input.ss-mobile-native-input:focus-visible {
    outline: none !important;
    box-shadow: none !important;
  }

  body:has(#chat-app) #chat-direct-input.ss-mobile-native-input,
  body:has(#chat-app) #chat-direct-input.ss-mobile-native-input::placeholder {
    font-size: 16px !important;
    line-height: 1.5 !important;
  }

  body:has(#chat-app) #chat-direct-input.ss-mobile-native-input.ss-mobile-welcome-single-line,
  body:has(#chat-app) #chat-direct-input.ss-mobile-native-input:placeholder-shown {
    line-height: 34px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  html[data-theme="dark"] body:not(.chat-ny-in-conversation) .input-card .chat-input-box--welcome[data-mobile-native-composer="1"],
  html[data-theme="dark"] body .input-card .chat-input-box--welcome[data-mobile-native-composer="1"],
  [data-theme="dark"] body:not(.chat-ny-in-conversation) .input-card .chat-input-box--welcome[data-mobile-native-composer="1"],
  [data-theme="dark"] body .input-card .chat-input-box--welcome[data-mobile-native-composer="1"] {
    background: transparent !important;
    border-color: transparent !important;
    color: #E8DDD4 !important;
  }

  html[data-theme="dark"] body:not(.chat-ny-in-conversation) .input-card #chat-direct-input.ss-mobile-native-input,
  html[data-theme="dark"] body .input-card #chat-direct-input.ss-mobile-native-input,
  [data-theme="dark"] body:not(.chat-ny-in-conversation) .input-card #chat-direct-input.ss-mobile-native-input,
  [data-theme="dark"] body .input-card #chat-direct-input.ss-mobile-native-input {
    color: #E8DDD4 !important;
  }

  html[data-theme="dark"] body:not(.chat-ny-in-conversation) .input-card #chat-direct-input.ss-mobile-native-input::placeholder,
  html[data-theme="dark"] body .input-card #chat-direct-input.ss-mobile-native-input::placeholder,
  [data-theme="dark"] body:not(.chat-ny-in-conversation) .input-card #chat-direct-input.ss-mobile-native-input::placeholder,
  [data-theme="dark"] body .input-card #chat-direct-input.ss-mobile-native-input::placeholder {
    color: rgba(232, 224, 216, 0.55) !important;
  }

  /* Mobile native card toolbar buttons */
  html body:not(.chat-ny-in-conversation) .input-card[data-mobile-native-card="1"] .chat-plus-btn,
  html body:not(.chat-ny-in-conversation) .input-card[data-mobile-native-card="1"] .chat-input-action,
  html body:not(.chat-ny-in-conversation) .input-card[data-mobile-native-card="1"] .ss-voice-trigger,
  html body .input-card[data-mobile-native-card="1"] .chat-plus-btn,
  html body .input-card[data-mobile-native-card="1"] .chat-input-action,
  html body .input-card[data-mobile-native-card="1"] .ss-voice-trigger {
    width: 40px !important;
    height: 40px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    max-height: none !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    cursor: pointer !important;
    transition: background 0.15s ease, transform 0.1s ease !important;
  }

  html body:not(.chat-ny-in-conversation) .input-card[data-mobile-native-card="1"] .chat-plus-btn svg,
  html body:not(.chat-ny-in-conversation) .input-card[data-mobile-native-card="1"] .chat-input-action svg,
  html body:not(.chat-ny-in-conversation) .input-card[data-mobile-native-card="1"] .ss-voice-trigger svg,
  html body .input-card[data-mobile-native-card="1"] .chat-plus-btn svg,
  html body .input-card[data-mobile-native-card="1"] .chat-input-action svg,
  html body .input-card[data-mobile-native-card="1"] .ss-voice-trigger svg {
    width: 22px !important;
    height: 22px !important;
    stroke-width: 2px !important;
    color: #6B5B4E !important;
    stroke: #6B5B4E !important;
    transform: none !important;
  }

  html body:not(.chat-ny-in-conversation) .input-card[data-mobile-native-card="1"] .chat-input-action.ss-mic svg *[fill]:not([fill="none"]),
  html body:not(.chat-ny-in-conversation) .input-card[data-mobile-native-card="1"] .ss-voice-trigger svg *[fill]:not([fill="none"]),
  html body .input-card[data-mobile-native-card="1"] .chat-input-action.ss-mic svg *[fill]:not([fill="none"]),
  html body .input-card[data-mobile-native-card="1"] .ss-voice-trigger svg *[fill]:not([fill="none"]) {
    fill: #6B5B4E !important;
  }

  html[data-theme="dark"] body:not(.chat-ny-in-conversation) .input-card[data-mobile-native-card="1"] .chat-plus-btn svg,
  html[data-theme="dark"] body:not(.chat-ny-in-conversation) .input-card[data-mobile-native-card="1"] .chat-input-action svg,
  html[data-theme="dark"] body:not(.chat-ny-in-conversation) .input-card[data-mobile-native-card="1"] .ss-voice-trigger svg,
  html[data-theme="dark"] body .input-card[data-mobile-native-card="1"] .chat-plus-btn svg,
  html[data-theme="dark"] body .input-card[data-mobile-native-card="1"] .chat-input-action svg,
  html[data-theme="dark"] body .input-card[data-mobile-native-card="1"] .ss-voice-trigger svg,
  [data-theme="dark"] body:not(.chat-ny-in-conversation) .input-card[data-mobile-native-card="1"] .chat-plus-btn svg,
  [data-theme="dark"] body:not(.chat-ny-in-conversation) .input-card[data-mobile-native-card="1"] .chat-input-action svg,
  [data-theme="dark"] body:not(.chat-ny-in-conversation) .input-card[data-mobile-native-card="1"] .ss-voice-trigger svg,
  [data-theme="dark"] body .input-card[data-mobile-native-card="1"] .chat-plus-btn svg,
  [data-theme="dark"] body .input-card[data-mobile-native-card="1"] .chat-input-action svg,
  [data-theme="dark"] body .input-card[data-mobile-native-card="1"] .ss-voice-trigger svg {
    color: var(--color-text-secondary, #B8AFA6) !important;
    stroke: var(--color-text-secondary, #B8AFA6) !important;
  }

  html[data-theme="dark"] body:not(.chat-ny-in-conversation) .input-card[data-mobile-native-card="1"] .chat-input-action.ss-mic svg *[fill]:not([fill="none"]),
  html[data-theme="dark"] body:not(.chat-ny-in-conversation) .input-card[data-mobile-native-card="1"] .ss-voice-trigger svg *[fill]:not([fill="none"]),
  html[data-theme="dark"] body .input-card[data-mobile-native-card="1"] .chat-input-action.ss-mic svg *[fill]:not([fill="none"]),
  html[data-theme="dark"] body .input-card[data-mobile-native-card="1"] .ss-voice-trigger svg *[fill]:not([fill="none"]),
  [data-theme="dark"] body:not(.chat-ny-in-conversation) .input-card[data-mobile-native-card="1"] .chat-input-action.ss-mic svg *[fill]:not([fill="none"]),
  [data-theme="dark"] body:not(.chat-ny-in-conversation) .input-card[data-mobile-native-card="1"] .ss-voice-trigger svg *[fill]:not([fill="none"]),
  [data-theme="dark"] body .input-card[data-mobile-native-card="1"] .chat-input-action.ss-mic svg *[fill]:not([fill="none"]),
  [data-theme="dark"] body .input-card[data-mobile-native-card="1"] .ss-voice-trigger svg *[fill]:not([fill="none"]) {
    fill: var(--color-text-secondary, #B8AFA6) !important;
  }

  html body:not(.chat-ny-in-conversation) .input-card[data-mobile-native-card="1"] .chat-plus-btn:hover,
  html body:not(.chat-ny-in-conversation) .input-card[data-mobile-native-card="1"] .chat-input-action:hover,
  html body:not(.chat-ny-in-conversation) .input-card[data-mobile-native-card="1"] .ss-voice-trigger:hover,
  html body .input-card[data-mobile-native-card="1"] .chat-plus-btn:hover,
  html body .input-card[data-mobile-native-card="1"] .chat-input-action:hover,
  html body .input-card[data-mobile-native-card="1"] .ss-voice-trigger:hover {
    background: rgba(92, 77, 67, 0.08) !important;
  }

  html body:not(.chat-ny-in-conversation) .input-card[data-mobile-native-card="1"] .chat-plus-btn:active,
  html body:not(.chat-ny-in-conversation) .input-card[data-mobile-native-card="1"] .chat-input-action:active,
  html body:not(.chat-ny-in-conversation) .input-card[data-mobile-native-card="1"] .ss-voice-trigger:active,
  html body .input-card[data-mobile-native-card="1"] .chat-plus-btn:active,
  html body .input-card[data-mobile-native-card="1"] .chat-input-action:active,
  html body .input-card[data-mobile-native-card="1"] .ss-voice-trigger:active {
    transform: scale(0.92) !important;
  }

  html body:not(.chat-ny-in-conversation) .input-card[data-mobile-native-card="1"] .chat-plus-btn:focus-visible,
  html body:not(.chat-ny-in-conversation) .input-card[data-mobile-native-card="1"] .chat-input-action:focus-visible,
  html body:not(.chat-ny-in-conversation) .input-card[data-mobile-native-card="1"] .ss-voice-trigger:focus-visible,
  html body .input-card[data-mobile-native-card="1"] .chat-plus-btn:focus-visible,
  html body .input-card[data-mobile-native-card="1"] .chat-input-action:focus-visible,
  html body .input-card[data-mobile-native-card="1"] .ss-voice-trigger:focus-visible {
    outline: 2px solid #5C4D43 !important;
    outline-offset: 2px !important;
  }

  html body:not(.chat-ny-in-conversation) .input-card[data-mobile-native-card="1"] .ss-voice-trigger[hidden],
  html body:not(.chat-ny-in-conversation) .input-card[data-mobile-native-card="1"] .ss-voice-trigger[style*="display: none"],
  html body .input-card[data-mobile-native-card="1"] .ss-voice-trigger[hidden],
  html body .input-card[data-mobile-native-card="1"] .ss-voice-trigger[style*="display: none"] {
    display: none !important;
  }

  /* Mobile send button */
  html body:not(.chat-ny-in-conversation) .input-card[data-mobile-native-card="1"] #chat-direct-send,
  html body .input-card[data-mobile-native-card="1"] #chat-direct-send {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    flex: 0 0 40px !important;
    border: none !important;
    border-radius: 50% !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    background: #A6594B !important;
    color: #FFFEFB !important;
    box-shadow: none !important;
    transition: background .15s ease, transform .1s ease !important;
  }

  html body:not(.chat-ny-in-conversation) .input-card[data-mobile-native-card="1"] #chat-direct-send:hover,
  html body .input-card[data-mobile-native-card="1"] #chat-direct-send:hover {
    background: #8F4B3E !important;
  }

  html body:not(.chat-ny-in-conversation) .input-card[data-mobile-native-card="1"] #chat-direct-send:active,
  html body .input-card[data-mobile-native-card="1"] #chat-direct-send:active {
    transform: scale(.94) !important;
  }

  html body:not(.chat-ny-in-conversation) .input-card[data-mobile-native-card="1"] #chat-direct-send.is-empty:not(.is-stop),
  html body:not(.chat-ny-in-conversation) .input-card[data-mobile-native-card="1"] #chat-direct-send[hidden],
  html body .input-card[data-mobile-native-card="1"] #chat-direct-send.is-empty:not(.is-stop),
  html body .input-card[data-mobile-native-card="1"] #chat-direct-send[hidden] {
    display: none !important;
  }

  html body:not(.chat-ny-in-conversation) .input-card[data-mobile-native-card="1"] #chat-direct-send::before,
  html body .input-card[data-mobile-native-card="1"] #chat-direct-send::before {
    content: "" !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    transform: translate(-50%, -50%) !important;
    border-radius: 50% !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  html body:not(.chat-ny-in-conversation) .input-card[data-mobile-native-card="1"] #chat-direct-send svg,
  html body .input-card[data-mobile-native-card="1"] #chat-direct-send svg {
    width: 18px !important;
    height: 18px !important;
    color: #FFFEFB !important;
    stroke: #FFFEFB !important;
    stroke-width: 2.25px !important;
    position: relative !important;
    z-index: 1 !important;
    display: block !important;
  }

  html body:not(.chat-ny-in-conversation) .input-card[data-mobile-native-card="1"] #chat-direct-send svg path,
  html body .input-card[data-mobile-native-card="1"] #chat-direct-send svg path {
    stroke: #FFFEFB !important;
  }

  html body:not(.chat-ny-in-conversation) .input-card[data-mobile-native-card="1"] #chat-direct-mic-btn svg,
  html body .input-card[data-mobile-native-card="1"] #chat-direct-mic-btn svg {
    width: 22px !important;
    height: 22px !important;
    stroke-width: 2px !important;
  }
}

@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
  html body:not(.chat-ny-in-conversation) .input-card[data-mobile-native-card="1"] .chat-plus-btn,
  html body:not(.chat-ny-in-conversation) .input-card[data-mobile-native-card="1"] .chat-input-action,
  html body:not(.chat-ny-in-conversation) .input-card[data-mobile-native-card="1"] .ss-voice-trigger,
  html body:not(.chat-ny-in-conversation) .input-card[data-mobile-native-card="1"] #chat-direct-send,
  html body .input-card[data-mobile-native-card="1"] .chat-plus-btn,
  html body .input-card[data-mobile-native-card="1"] .chat-input-action,
  html body .input-card[data-mobile-native-card="1"] .ss-voice-trigger,
  html body .input-card[data-mobile-native-card="1"] #chat-direct-send {
    transition: none !important;
  }

  html body:not(.chat-ny-in-conversation) .input-card[data-mobile-native-card="1"] .chat-plus-btn:active,
  html body:not(.chat-ny-in-conversation) .input-card[data-mobile-native-card="1"] .chat-input-action:active,
  html body:not(.chat-ny-in-conversation) .input-card[data-mobile-native-card="1"] .ss-voice-trigger:active,
  html body:not(.chat-ny-in-conversation) .input-card[data-mobile-native-card="1"] #chat-direct-send:active,
  html body .input-card[data-mobile-native-card="1"] .chat-plus-btn:active,
  html body .input-card[data-mobile-native-card="1"] .chat-input-action:active,
  html body .input-card[data-mobile-native-card="1"] .ss-voice-trigger:active,
  html body .input-card[data-mobile-native-card="1"] #chat-direct-send:active {
    transform: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .chat-prompt-chip.chat-prompt-add {
    transition: none !important;
  }
}

.chat-prompt-chip.chat-prompt-add:focus-visible {
  outline: 2px solid #5C4D43 !important;
  outline-offset: 2px !important;
}

.chat-prompt-chip.chat-prompt-add:active {
  transform: scale(0.97);
}

#chat-main .chat-prompt-chip.chat-prompt-add,
body:has(#chat-app) .chat-prompt-chip.chat-prompt-add {
  font-weight: var(--font-weight-semibold) !important;
}

[data-theme="dark"] .chat-prompt-chip.chat-prompt-add,
[data-theme="dark"] body:not(.chat-ny-in-conversation) .chat-prompt-chip.chat-prompt-add {
  background: transparent !important;
  border: 1.5px dashed rgba(138, 170, 156, 0.5) !important;
  color: #8FB3A4 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

[data-theme="dark"] .chat-prompt-chip.chat-prompt-add svg {
  color: currentColor !important;
  opacity: 0.9;
}

[data-theme="dark"] .chat-prompt-chip.chat-prompt-add:hover,
[data-theme="dark"] body:not(.chat-ny-in-conversation) .chat-prompt-chip.chat-prompt-add:hover {
  background: rgba(138, 170, 156, 0.14) !important;
  border-color: rgba(138, 170, 156, 0.8) !important;
  color: #AED0C1 !important;
}

[data-theme="dark"] .chat-prompt-chip.chat-prompt-add:focus-visible {
  outline-color: #E8B8A8 !important;
}

/* Read-aloud voice chooser (#chat-oplaeser-voice-chooser).
   A quiet chevron after each assistant .ss-play opens one body-portaled
   Mads/Sofie popover that mirrors the Skrivebord overflow voice toggle. */
.ss-voice-caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 28px;
  margin-left: -3px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--color-text-secondary, #646e78);
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.ss-voice-caret svg {
  width: 10px;
  height: 10px;
  transition: transform 0.15s ease;
}

body.chat-ny-in-conversation .chat-message.received .ss-voice-caret,
body.chat-ny-in-conversation .chat-message.assistant .ss-voice-caret,
body.chat-ny-in-conversation .chat-message--assistant .ss-voice-caret {
  color: var(--warm-text, #5C4D43);
}

.ss-voice-caret:hover {
  background: rgba(110, 138, 126, 0.14);
  color: rgb(74, 97, 87);
}

#chat-main .ss-voice-caret:hover {
  background: rgba(110, 138, 126, 0.14);
  color: rgb(74, 97, 87);
}

.ss-voice-caret:active {
  background: rgba(110, 138, 126, 0.22);
}

#chat-main .ss-voice-caret:active {
  background: rgba(110, 138, 126, 0.22);
}

.ss-voice-caret:focus-visible {
  outline: none;
  background: rgba(110, 138, 126, 0.14);
  color: rgb(74, 97, 87);
  box-shadow: 0 0 0 2px rgba(110, 138, 126, 0.45);
}

#chat-main .ss-voice-caret:focus-visible {
  outline: none;
  background: rgba(110, 138, 126, 0.14);
  color: rgb(74, 97, 87);
  box-shadow: 0 0 0 2px rgba(110, 138, 126, 0.45);
}

.ss-voice-caret[aria-expanded="true"] {
  background: rgba(110, 138, 126, 0.18);
  color: rgb(74, 97, 87);
}

#chat-main .ss-voice-caret[aria-expanded="true"] {
  background: rgba(110, 138, 126, 0.18);
  color: rgb(74, 97, 87);
}

.ss-voice-caret[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

#chat-main .ss-voice-caret[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

[data-theme="dark"] .ss-voice-caret:hover,
[data-theme="dark"] .ss-voice-caret[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.08);
  color: #E8DDD4;
}

[data-theme="dark"] #chat-main .ss-voice-caret:hover,
[data-theme="dark"] #chat-main .ss-voice-caret[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.08);
  color: #E8DDD4;
}

[data-theme="dark"] .ss-voice-caret:focus-visible {
  outline: none;
  background: rgba(255, 255, 255, 0.08);
  color: #E8DDD4;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25);
}

[data-theme="dark"] #chat-main .ss-voice-caret:focus-visible {
  outline: none;
  background: rgba(255, 255, 255, 0.08);
  color: #E8DDD4;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25);
}

#ss-voice-popover {
  --ss-voice-label-fs: 11px;
  --ss-voice-chip-fs: 13px;
  --ss-voice-adv-title-fs: 13px;
  --ss-voice-fw-medium: 500;
  --ss-voice-fw-semibold: 600;
  display: none;
  position: fixed;
  z-index: 60;
  width: 288px;
  box-sizing: border-box;
  flex-direction: column;
  gap: 0;
  padding: 10px;
  overflow: visible;
  background: #FFFEFB;
  border: 1px solid #E9DED4;
  border-radius: 12px;
  box-shadow:
    0 10px 28px rgba(58, 47, 38, 0.14),
    0 0 0 1px rgba(255, 255, 255, 0.70);
}

#ss-voice-popover:not([hidden]) {
  display: flex;
}

#ss-voice-popover .vp-label {
  color: #8A7E72;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0;
  line-height: 1.2;
  padding: 0 2px;
}

#ss-voice-popover .ss-voice-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 12px 0 0;
}

#ss-voice-popover .ssg {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#ss-voice-popover .ssg-label {
  font-size: var(--ss-voice-label-fs);
  font-weight: var(--ss-voice-fw-semibold);
  color: rgb(169, 158, 145);
  letter-spacing: .02em;
  display: flex;
  align-items: center;
  gap: 5px;
  padding-left: 1px;
}

#ss-voice-popover .ssg-label svg {
  opacity: .65;
}

#ss-voice-popover .ssg-track {
  display: flex;
  gap: 0;
  padding: 3px;
  background: #F1ECE4;
  border-radius: 10px;
}

#ss-voice-popover .ssg-chip {
  position: relative;
  flex: 1;
  border: 0;
  background: transparent;
  color: #8A7E72;
  font-size: var(--ss-voice-chip-fs);
  font-weight: var(--ss-voice-fw-medium);
  border-radius: 7px;
  padding: 7px 4px;
  cursor: pointer;
  transition: color .14s ease;
}

#ss-voice-popover .ssg-chip:not(:first-child)::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 13px;
  width: 1px;
  background: rgba(138, 126, 114, .20);
}

#ss-voice-popover .ssg-chip[aria-checked="true"]::before,
#ss-voice-popover .ssg-chip[aria-checked="true"] + .ssg-chip::before {
  display: none;
}

#ss-voice-popover .ssg-chip:hover {
  color: #5B5046;
}

#ss-voice-popover .ssg-chip[aria-checked="true"] {
  background: #FFFEFB;
  color: #4A7A68;
  font-weight: var(--ss-voice-fw-semibold);
  box-shadow: 0 1px 2px rgba(58, 47, 38, 0.10);
}

#ss-voice-popover .ssg-chip:focus-visible {
  outline: 2px solid #4A7A68;
  outline-offset: 2px;
}

[data-theme="dark"] #ss-voice-popover {
  background: rgba(42, 38, 34, 1);
  border-color: rgba(255, 255, 255, 0.10);
  box-shadow:
    0 6px 24px rgba(0, 0, 0, 0.40),
    0 0 0 1px rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] #ss-voice-popover .vp-label {
  color: rgba(232, 221, 212, 0.55);
}

[data-theme="dark"] #ss-voice-popover .ssg-label {
  color: rgba(232, 221, 212, 0.48);
}

[data-theme="dark"] #ss-voice-popover .ssg-track {
  background: rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] #ss-voice-popover .ssg-chip {
  color: rgba(232, 221, 212, 0.55);
}

[data-theme="dark"] #ss-voice-popover .ssg-chip:not(:first-child)::before {
  background: rgba(232, 221, 212, 0.16);
}

[data-theme="dark"] #ss-voice-popover .ssg-chip:hover {
  color: rgba(232, 221, 212, 0.82);
}

[data-theme="dark"] #ss-voice-popover .ssg-chip[aria-checked="true"] {
  background: rgba(255, 255, 255, 0.08);
  color: #7FBAA8;
  box-shadow: 0 0 0 1px rgba(110, 138, 126, 0.30);
}

/* ── Advanced reader toggle (#3503) ── */

#ss-adv-section {
  display: flex;
  border-top: none;
  margin-top: 14px;
  padding: 0;
  background: transparent;
  overflow: visible;
}

#ss-adv-section .ss-adv-card {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  min-height: 40px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  background: transparent;
  box-shadow: none;
  transition: color .15s ease;
}

#ss-adv-section .ss-adv-card:hover {
  background: transparent;
  box-shadow: none;
}

#ss-adv-section .ss-adv-card[disabled],
#ss-adv-section .ss-adv-card[aria-disabled="true"] {
  opacity: .55;
  cursor: not-allowed;
}

#ss-adv-section .ss-adv-card:focus-visible {
  outline: 2px solid #4A7A68;
  outline-offset: 2px;
}

#ss-adv-section .ss-adv-ic {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #4A7A68;
  color: #fff;
}

#ss-adv-section .ss-adv-txt {
  flex: 1;
  min-width: 0;
  text-align: left;
}

#ss-adv-section .ss-adv-title {
  font-size: var(--ss-voice-adv-title-fs);
  font-weight: var(--ss-voice-fw-semibold);
  color: #3C5C4F;
  line-height: 1.2;
}

#ss-adv-section .ss-adv-toggle {
  flex: none;
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: #CBBFB2;
  position: relative;
  transition: background .15s ease;
}

#ss-adv-section .ss-adv-toggle::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: transform .15s ease;
}

#ss-adv-section .ss-adv-card[aria-checked="true"] .ss-adv-toggle {
  background: #4A7A68;
}

#ss-adv-section .ss-adv-card[aria-checked="true"] .ss-adv-toggle::after {
  transform: translateX(14px);
}

[data-theme="dark"] #ss-adv-section .ss-adv-card {
  background: transparent;
  box-shadow: none;
}

[data-theme="dark"] #ss-adv-section .ss-adv-card:hover {
  background: transparent;
  box-shadow: none;
}

[data-theme="dark"] #ss-adv-section .ss-adv-title {
  color: #A9D0C1;
}

[data-theme="dark"] #ss-adv-section .ss-adv-toggle {
  background: rgba(232, 221, 212, 0.28);
}

[data-theme="dark"] #ss-adv-section .ss-adv-card[aria-checked="true"] .ss-adv-toggle {
  background: #4A7A68;
}

@media (prefers-reduced-motion: reduce) {
  #ss-voice-popover .ssg-chip,
  #ss-adv-section .ss-adv-card,
  #ss-adv-section .ss-adv-toggle,
  #ss-adv-section .ss-adv-toggle::after {
    transition-duration: 0s !important;
  }
}

/* ── Sticky reader bar (#3503) ── */

#ss-adv-reader {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%);
  z-index: 99999;
  display: flex;
  align-items: center;
  height: 64px;
  max-width: calc(100vw - 28px);
  box-sizing: border-box;
  gap: 10px;
  padding: 8px 14px;
  background: #FFFEFB;
  border: none;
  border-radius: 16px;
  box-shadow: rgba(58, 47, 38, 0.18) 0px 8px 28px 0px;
  font-family: var(--font-family);
  color: #3A2F26;
  user-select: none;
  overflow: visible;
}

#ss-adv-reader.hidden {
  display: none;
}

.ar-grip {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 38px;
  cursor: grab;
  color: #6f6457;
  touch-action: none;
  flex-shrink: 0;
}

.ar-grip:active {
  cursor: grabbing;
}

.ar-btn {
  width: 38px;
  height: 38px;
  box-sizing: border-box;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 9px;
  background: #F4F0EB;
  color: #3A2F26;
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: 1;
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease;
  flex-shrink: 0;
}

.ar-btn:hover {
  background: #EFE8E1;
}

.ar-btn:focus-visible {
  outline: 2px solid #4A7A68;
  outline-offset: 2px;
}

.ar-icon {
  width: 22px;
  height: 22px;
  display: block;
  flex-shrink: 0;
  pointer-events: none;
}

.ar-icon-grip {
  width: 16px;
  height: 22px;
}

#ss-ar-play.ar-play {
  width: 46px;
  height: 46px;
  background: #4A7A68;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: var(--font-size-base);
}

#ss-ar-play.ar-play .ar-icon {
  width: 24px;
  height: 24px;
}

#ss-ar-play.ar-play:hover {
  background: #3f6b5b;
  border-color: #3f6b5b;
}

.ar-sep {
  width: 1px;
  height: 28px;
  background: rgba(228, 220, 212, 0.7);
  flex-shrink: 0;
}

.ar-settings {
  display: flex;
  align-items: center;
  height: 42px;
  min-width: 166px;
  gap: 12px;
  background: #F8F4EF;
  border: 1px solid #E3D8CE;
  border-radius: 9px;
  padding: 0 12px;
  box-sizing: border-box;
}

.ar-settings > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 52px;
  gap: 2px;
}

.ar-cap {
  font-size: var(--font-size-2xs, 10px);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #8A7E72;
  line-height: 1;
}

#ss-adv-reader select {
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #3A2F26;
  font-family: var(--font-family);
  font-size: var(--font-size-sm);
  padding: 0 2px;
  cursor: pointer;
}

.ar-settings select {
  border-style: none !important;
  background: transparent !important;
  text-align: center;
}

.ar-settings select:focus-visible {
  outline: 2px solid #4A7A68;
  outline-offset: 1px;
}

.ar-settings-div {
  width: 1px;
  height: 28px;
  background: rgba(228, 220, 212, 0.5);
  flex-shrink: 0;
}

/* ── Custom dropdowns (#3523) ── */

.ss-native-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ss-dd {
  position: relative;
}

.ss-dd-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  border: none;
  background: transparent;
  color: #3A2F26;
  font-family: var(--font-family);
  font-size: var(--font-size-sm);
  padding: 2px 4px;
  cursor: pointer;
  border-radius: 4px;
  line-height: 1;
  white-space: nowrap;
}

.ss-dd-btn:hover {
  background: rgba(58, 47, 38, 0.06);
}

.ss-dd-btn:focus-visible {
  outline: 2px solid #4A7A68;
  outline-offset: 1px;
}

.ss-dd-caret {
  width: 0;
  height: 0;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  border-top: 4px solid currentColor;
  opacity: 0.5;
  flex-shrink: 0;
}

.ss-dd-list {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 6px;
  min-width: 72px;
  padding: 4px 0;
  background: #FFFEFB;
  border: 1px solid #E3D8CE;
  border-radius: 8px;
  box-shadow: rgba(58, 47, 38, 0.14) 0px 6px 20px 0px;
  list-style: none;
  z-index: 100001;
}

.ss-dd-list[data-open] {
  display: block;
}

.ss-dd-opt {
  display: block;
  padding: 6px 14px;
  font-family: var(--font-family);
  font-size: var(--font-size-sm);
  color: #3A2F26;
  cursor: pointer;
  white-space: nowrap;
  text-align: center;
  line-height: 1.3;
}

.ss-dd-opt:hover {
  background: rgba(58, 47, 38, 0.06);
}

.ss-dd-opt:focus-visible {
  outline: 2px solid #4A7A68;
  outline-offset: -2px;
}

.ss-dd-opt[aria-selected="true"] {
  color: #4A7A68;
  background: rgba(74, 122, 104, 0.16);
}

/* ── Play button loading spinner (#3523) ── */

#ss-ar-play.is-loading {
  position: relative;
  pointer-events: none;
}

#ss-ar-play.is-loading .ar-icon {
  opacity: 0;
}

#ss-ar-play.is-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #ffffff;
  border-radius: 50%;
  box-sizing: border-box;
  animation: ss-ar-spin 0.6s linear infinite;
}

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

@keyframes ss-ar-pulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.9; }
}

/* ── Sentence highlighting (#3503, clone fix #3523) ── */

.ss-sentence {
  border-radius: 5px;
  scroll-margin-top: 140px;
  transition: background .15s ease;
}

body.ss-ar-active .ss-sentence {
  cursor: pointer;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  padding: 1px 3px;
  margin: 0 -1px;
  border-radius: 5px;
  box-shadow: none;
}

body.ss-ar-active .ss-sentence:focus-visible {
  outline: 2px solid #4A7A68;
  outline-offset: 2px;
}

body.ss-ar-active .ss-sentence:hover {
  background: rgba(74, 122, 104, 0.09);
}

.ss-sentence.ss-ar-now,
.ss-sentence.ss-ar-highlight {
  background: rgba(74, 122, 104, 0.18);
}

/* ── Dark mode reader (#3503) ── */

[data-theme="dark"] #ss-adv-reader {
  background: rgba(42, 38, 34, 1);
  border-color: rgba(255, 255, 255, 0.10);
  box-shadow: rgba(0, 0, 0, 0.40) 0px 8px 28px 0px;
  color: #E8DDD4;
}

[data-theme="dark"] .ar-btn {
  background: rgba(42, 38, 34, 1);
  color: #E8DDD4;
  border-color: rgba(255, 255, 255, 0.10);
}

[data-theme="dark"] .ar-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] #ss-ar-play.ar-play {
  background: #4A7A68;
  color: #fff;
  border-color: #4A7A68;
}

[data-theme="dark"] .ar-sep,
[data-theme="dark"] .ar-settings-div {
  background: rgba(255, 255, 255, 0.10);
}

[data-theme="dark"] .ar-settings {
  background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .ar-cap {
  color: rgba(232, 221, 212, 0.45);
}

[data-theme="dark"] #ss-adv-reader select {
  background: transparent;
  color: #E8DDD4;
  border-color: rgba(255, 255, 255, 0.10);
}

[data-theme="dark"] .ss-dd-btn {
  color: #E8DDD4;
}

[data-theme="dark"] .ss-dd-btn:hover {
  background: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .ss-dd-list {
  background: rgba(42, 38, 34, 1);
  border-color: rgba(255, 255, 255, 0.10);
  box-shadow: rgba(0, 0, 0, 0.40) 0px 6px 20px 0px;
}

[data-theme="dark"] .ss-dd-opt {
  color: #E8DDD4;
}

[data-theme="dark"] .ss-dd-opt:hover {
  background: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .ss-dd-opt[aria-selected="true"] {
  color: #7FBAA8;
  background: rgba(127, 186, 168, 0.16);
}

[data-theme="dark"] .ss-sentence.ss-ar-now,
[data-theme="dark"] .ss-sentence.ss-ar-highlight {
  background: rgba(74, 122, 104, 0.18);
  box-shadow: none;
}

[data-theme="dark"] body.ss-ar-active .ss-sentence:hover {
  background: rgba(74, 122, 104, 0.09);
  box-shadow: none;
}

@media (max-width: 600px) {
  #ss-adv-reader #ss-ar-settings,
  #ss-adv-reader .ar-sep {
    display: none !important;
  }
}

/* Final public /chatgpt-dansk/ app conversation parity (#3710).
   Keep this after public overrides so app/staging shell fixes win without
   changing anonymous/public API gates. */
@media (max-width: 767px) {
  html.ss-mobile-conv-html {
    overflow: hidden !important;
    overscroll-behavior: none !important;
    height: var(--ss-vv-height, 100dvh) !important;
    min-height: 0 !important;
    max-height: var(--ss-vv-height, 100dvh) !important;
  }

  html.ss-mobile-input-active,
  html.ss-mobile-kb-open {
    position: fixed !important;
    top: var(--ss-vv-offset, 0px) !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: var(--ss-vv-height, 100dvh) !important;
    min-height: 0 !important;
    max-height: var(--ss-vv-height, 100dvh) !important;
    overflow: hidden !important;
  }

  html.ss-mobile-input-active > body,
  html.ss-mobile-kb-open > body {
    position: fixed !important;
    top: var(--ss-vv-offset, 0px) !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: var(--ss-vv-height, 100dvh) !important;
    min-height: 0 !important;
    max-height: var(--ss-vv-height, 100dvh) !important;
    overflow: hidden !important;
    overscroll-behavior: none !important;
  }
}

body.chat-ny-in-conversation .main {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  height: var(--ss-vv-height, 100dvh) !important;
  min-height: 0 !important;
  max-height: var(--ss-vv-height, 100dvh) !important;
  overflow: hidden !important;
  padding: 0 !important;
}

body.chat-ny-in-conversation #chat-main {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  height: var(--ss-vv-height, 100dvh) !important;
  min-height: 0 !important;
  max-height: var(--ss-vv-height, 100dvh) !important;
  overflow: hidden !important;
}

body.chat-ny-in-conversation .chat-ny-conversation .chat-input-box {
  border: 1px solid rgba(228, 220, 212, 0.6) !important;
  border-radius: var(--radius-card, 18px) !important;
  background: var(--white, #FFFEFB) !important;
  box-shadow: 0 2px 8px rgba(92, 77, 67, 0.06), 0 8px 32px rgba(92, 77, 67, 0.04) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.chat-ny-in-conversation .chat-messages {
  padding-bottom: 88px !important;
}

body.chat-ny-in-conversation .chat-message {
  min-height: fit-content !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

body.chat-ny-in-conversation .chat-message.sent .chat-bubble,
body.chat-ny-in-conversation .chat-message.user .chat-bubble,
body.chat-ny-in-conversation .chat-message--user .chat-bubble {
  width: fit-content !important;
  max-width: 100% !important;
  box-sizing: content-box !important;
  min-width: 26px !important;
}

body.chat-ny-in-conversation .chat-message.sent .chat-msg-footer,
body.chat-ny-in-conversation .chat-message.user .chat-msg-footer,
body.chat-ny-in-conversation .chat-message--user .chat-msg-footer {
  top: calc(100% + 2px) !important;
  margin-top: 4px !important;
}

body.chat-ny-in-conversation .chat-input {
  padding: 4px 0 0 !important;
}

html[data-theme="dark"] body.chat-ny-in-conversation .chat-input {
  background: linear-gradient(to top, var(--color-bg, #1E1C1A) 0%, var(--color-bg, #1E1C1A) 72%, rgba(30, 28, 26, 0) 100%) !important;
}

@media (max-width: 767px) {
  body.chat-ny-in-conversation,
  body.chat-ny-in-conversation .app {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    height: var(--ss-vv-height, 100dvh) !important;
    min-height: 0 !important;
    max-height: var(--ss-vv-height, 100dvh) !important;
    overflow: hidden !important;
  }

  body.chat-ny-in-conversation #chat-conversation-panel {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    height: var(--ss-vv-height, 100dvh) !important;
    min-height: 0 !important;
    max-height: var(--ss-vv-height, 100dvh) !important;
    overflow: hidden !important;
    overflow-y: hidden !important;
    overflow-x: hidden !important;
    overflow-x: clip !important;
    overflow-anchor: none !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  body.chat-ny-in-conversation .chat-ny-conversation {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    min-height: 0 !important;
    height: var(--ss-vv-height, 100dvh) !important;
    max-height: var(--ss-vv-height, 100dvh) !important;
    align-items: stretch !important;
    overflow: hidden !important;
    overflow-x: hidden !important;
    overflow-x: clip !important;
    overflow-y: hidden !important;
    overflow-anchor: none !important;
    scrollbar-gutter: auto !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  body.chat-ny-in-conversation,
  body.chat-ny-in-conversation :is(.app, .main, #chat-main, #chat-conversation-panel, .chat-ny-conversation) {
    overflow-x: hidden !important;
    overflow-x: clip !important;
    overscroll-behavior-x: none !important;
    touch-action: pan-y !important;
  }

  body.chat-ny-in-conversation:has(#chat-app) :is(.decorative-arcs, .decorative-arcs-2, .decorative-arcs-bl),
  body.chat-ny-in-conversation :is(.decorative-arcs, .decorative-arcs-2, .decorative-arcs-bl),
  body.chat-ny-in-conversation #onb-backdrop:not(.is-open) {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
  }

  body.chat-ny-in-conversation .chat-ny-conversation > .chat-header,
  body.chat-ny-in-conversation .chat-ny-conversation > .chat-messages,
  body.chat-ny-in-conversation .chat-ny-conversation > .chat-input {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    align-self: stretch !important;
  }

  body.chat-ny-in-conversation .chat-messages {
    padding-top: 16px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    gap: 14px !important;
    margin-bottom: calc(28px + env(safe-area-inset-bottom, 0px)) !important;
  }

  body.chat-ny-in-conversation .chat-ny-conversation > .chat-messages {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    max-height: 100% !important;
    margin-bottom: 0 !important;
    padding: 16px 0 12px !important;
    overflow: hidden auto !important;
    overflow-anchor: none !important;
    scrollbar-gutter: auto !important;
  }

  body.chat-ny-in-conversation .chat-message.sent .chat-bubble,
  body.chat-ny-in-conversation .chat-message.user .chat-bubble,
  body.chat-ny-in-conversation .chat-message--user .chat-bubble {
    max-width: 88% !important;
    min-width: 26px !important;
  }

  body.chat-ny-in-conversation .chat-input,
  body.chat-ny-in-conversation .chat-ny-conversation > .chat-input,
  html.ss-mobile-kb-open body.chat-ny-in-conversation .chat-input,
  html.ss-mobile-kb-open body.chat-ny-in-conversation .chat-ny-conversation > .chat-input {
    position: relative !important;
    flex: 0 0 auto !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    align-self: stretch !important;
    box-sizing: border-box !important;
    margin: 0 0 calc(12px + env(safe-area-inset-bottom, 0px)) !important;
    z-index: 30 !important;
    padding: 8px 0 0 !important;
    transform: none !important;
    will-change: auto !important;
    overflow: visible !important;
    background: transparent !important;
    border-radius: var(--radius-card, 18px) !important;
  }

  body.chat-ny-in-conversation .chat-input .chat-input-box,
  html.ss-mobile-kb-open body.chat-ny-in-conversation .chat-input .chat-input-box {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  html[data-theme="dark"] body.chat-ny-in-conversation .chat-input,
  html[data-theme="dark"].ss-mobile-kb-open body.chat-ny-in-conversation .chat-input {
    background: transparent !important;
  }
}
