.topbar, #topbar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
  }
  .arcane-engine-badge-wrap {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    z-index: 30;
  }
  .arcane-engine-top-select {
    background: rgba(20, 25, 35, 0.9);
    color: #00e5ff;
    border: 1px solid rgba(0, 229, 255, 0.35);
    border-radius: 8px;
    padding: 5px 24px 5px 9px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.02em;
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #00e5ff 50%), linear-gradient(135deg, #00e5ff 50%, transparent 50%);
    background-position: calc(100% - 12px) calc(50% + 1px), calc(100% - 8px) calc(50% + 1px);
    background-size: 4px 4px, 4px 4px;
    background-repeat: no-repeat;
    max-width: 155px;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.08);
  }
  @media (max-width: 420px) {
    .arcane-engine-top-select {
      font-size: 11px;
      padding: 4px 20px 4px 8px;
      max-width: 135px;
    }
  }

html, body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    background: radial-gradient(circle at 50% 100%, #0f1b3d 0%, #07090f 55%, #050608 100%) !important;
    background-attachment: fixed !important;
    color: #f1f5f9 !important;
  }

  .arcane-floating-bar {
    background: transparent !important;
    border: none !important;
    border-top: none !important;
    box-shadow: none !important;
    padding: 8px 10px max(12px, env(safe-area-inset-bottom)) 10px !important;
  }
  .arcane-floating-pill {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: #171a23 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 28px !important;
    padding: 6px 8px 6px 10px !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6) !important;
    width: 100% !important;
    max-width: 780px !important;
    margin: 0 auto 4px auto !important;
    box-sizing: border-box !important;
  }
  .arcane-floating-pill input,
  .arcane-floating-pill textarea {
    flex: 1 !important;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    color: #f1f5f9 !important;
    font-family: inherit !important;
    font-size: 15.5px !important;
    padding: 8px 4px !important;
    min-width: 0 !important;
  }
  .arcane-floating-pill input::placeholder,
  .arcane-floating-pill textarea::placeholder {
    color: #94a3b8 !important;
  }
  .arcane-plus-btn {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    border-radius: 50% !important;
    background: transparent !important;
    border: none !important;
    color: #cbd5e1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    padding: 0 !important;
  }
  .arcane-plus-btn:active { background: rgba(255, 255, 255, 0.1) !important; }
  .arcane-send-circle {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
    border: none !important;
    color: #ffffff !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    padding: 0 !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.45) !important;
  }
  .arcane-send-circle:active { transform: scale(0.94); }

#arcaneThinking { display: none !important; }

  /* Hard-lock .topbar: ONLY allow the left title div, #topInstallBtn, and our single menu */
  .topbar {
    flex-wrap: nowrap !important;
    gap: 8px !important;
  }
  .topbar > :first-child {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
  }
  .topbar > :not(:first-child):not(#topInstallBtn):not(#arcaneSingleMenuWrap) {
    display: none !important;
  }

  #arcaneSingleMenuWrap {
    position: relative;
    display: inline-flex !important;
    align-items: center;
    margin-left: auto;
    flex-shrink: 0;
  }

  /* Compact teal pill matching the original dropdown style */
  #arcaneSingleMenuWrap .arcane-pill-btn {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    background: rgba(15, 29, 54, 0.85);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.42);
    border-radius: 999px;
    min-height: 34px;
    padding: 5px 11px;
    max-width: 132px;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    outline: none;
    white-space: nowrap;
  }
  #arcaneSingleMenuWrap .arcane-caret {
    font-size: 10px;
    opacity: 0.9;
    transition: transform 0.2s;
  }
  #arcaneSingleMenuWrap .arcane-pill-btn.open .arcane-caret {
    transform: rotate(180deg);
  }

  /* Dark rounded Gemini-style popup with Thinking level */
  #arcaneSinglePopover {
    position: fixed;
    top: 56px;
    right: 12px;
    width: min(310px, calc(100vw - 24px));
    max-height: calc(100dvh - 72px);
    overflow-y: auto;
    background: #171a23;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 10px 8px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.75);
    z-index: 99999;
    display: none;
    color: #f1f5f9;
    font-family: inherit;
  }
  #arcaneSinglePopover.open { display: block; }
  .arcane-opt {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 10px 12px; border-radius: 12px;
    cursor: pointer; transition: background 0.15s;
  }
  .arcane-opt:hover, .arcane-opt:active { background: rgba(255, 255, 255, 0.08); }
  .arcane-check {
    width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    color: #f8fafc; font-size: 15px;
  }
  .arcane-opt-text { display: flex; flex-direction: column; gap: 2px; }
  .arcane-opt-title { font-size: 15px; font-weight: 500; color: #f8fafc; display: flex; align-items: center; gap: 8px; }
  .arcane-opt-sub { font-size: 12.5px; color: #94a3b8; }
  .arcane-badge {
    font-size: 11px; padding: 1px 7px; border-radius: 999px;
    background: rgba(255, 255, 255, 0.12); color: #e2e8f0; font-weight: 500;
  }
  .arcane-divider { height: 1px; background: rgba(255, 255, 255, 0.1); margin: 8px 10px; }
  .arcane-think-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 12px 6px 42px;
    font-size: 14px; font-weight: 500; color: #e2e8f0;
    cursor: pointer; user-select: none;
  }
  .arcane-think-header svg { width: 16px; height: 16px; transition: transform 0.2s; }
  .arcane-think-header.collapsed svg { transform: rotate(180deg); }
  .arcane-think-list.collapsed { display: none; }
