
      html[data-theme-mode="light"] .tab:hover:not(.active) { background: var(--bg-hover); color: var(--text-primary); }

      html[data-theme-mode="light"] .tab:not(.active):not(.before-active)::after { background: rgba(0, 0, 0, 0.16); }

      html[data-theme-mode="light"] .tab.active .tab-favicon { color: var(--text-primary); }


      #tabs-bar {
        width: 100%;
        height: 34px;
        display: flex;
        align-items: flex-end;
        gap: 0;
        padding: 4px 10px 0 8px;
        background: var(--bg-strip);
        overflow-x: auto;
        scrollbar-width: none;
      }

      #tabs-bar::-webkit-scrollbar { display: none; }


      .tab {
        position: relative;
        display: flex;
        align-items: center;
        gap: 8px;
        flex: 0 1 182px;
        min-width: 112px;
        max-width: 210px;
        height: 30px;
        padding: 0 10px 0 12px;
        border-radius: 8px 8px 0 0;
        background: transparent;
        color: var(--text-secondary);
        cursor: pointer;
        font-size: 12px;
        font-weight: 400;
        letter-spacing: -0.005em;
        transition: background 0.14s ease, color 0.14s ease;
        border: none;
        outline: none;
      }

      .tab.tab-closing {
        pointer-events: none;
      }

      html[data-density="compact"] #tabs-bar { height: 31px; padding-top: 2px; }
      html[data-density="compact"] .tab { height: 27px; padding-inline: 8px; gap: 6px; }
      html[data-corners="square"] .tab { border-radius: 2px 2px 0 0; }

      .tab:hover:not(.active) {
        background: var(--bg-hover);
        color: var(--text-primary);
      }

      .tab.active {
        background: var(--bg-toolbar);
        color: var(--text-primary);
        font-weight: 400;
        z-index: 2;
      }

      /* Curved edges connect the active tab to the toolbar. */
      .tab.active::before,
      .tab.active::after {
        content: '';
        position: absolute;
        bottom: 0;
        width: 8px;
        height: 8px;
        pointer-events: none;
      }

      .tab.active::before {
        left: -8px;
        background: radial-gradient(circle at 0 0, transparent 8px, var(--bg-toolbar) 8.2px);
      }

      .tab.active::after {
        right: -8px;
        background: radial-gradient(circle at 100% 0, transparent 8px, var(--bg-toolbar) 8.2px);
      }


      /* Separate inactive tabs. */
      .tab:not(.active):not(.before-active)::after {
        content: '';
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        height: 14px;
        width: 1px;
        background: color-mix(in srgb, var(--text-secondary) 18%, transparent);
        pointer-events: none;
      }

      .tab:not(.active):hover::after {
        opacity: 0;
      }


      .tab-favicon {
        flex-shrink: 0;
        color: var(--text-secondary);
        display: flex;
        align-items: center;
        justify-content: center;
      }

      .tab.active .tab-favicon {
        color: var(--text-primary);
      }

      .tab.loading .tab-favicon svg { display: none; }

      .tab.loading .tab-favicon img { display: none; }

      .tab-favicon img { width: 13px; height: 13px; object-fit: contain; border-radius: 2px; }

      .tab.loading .tab-favicon::after {
        content: '';
        width: 12px;
        height: 12px;
        border: 1.5px solid currentColor;
        border-top-color: transparent;
        border-radius: 50%;
        animation: tab-load-spin 0.8s linear infinite;
      }

      @keyframes tab-load-spin { to { transform: rotate(360deg); } }


      .tab-label {
        flex: 1;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 12px;
        line-height: 1.25;
      }


      .tab-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 18px;
        height: 18px;
        border-radius: 50%;
        border: none;
        background: transparent;
        color: var(--text-muted);
        cursor: pointer;
        transition: background 0.14s ease, color 0.14s ease;
        padding: 0;
        flex-shrink: 0;
      }

      .tab-close:hover {
        background: var(--bg-hover);
        color: var(--text-primary);
      }


      #new-tab {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 26px;
        height: 26px;
        border-radius: 50%;
        border: none;
        background: transparent;
        color: var(--text-secondary);
        cursor: pointer;
        margin: 0 0 2px 6px;
        transition: background 0.14s ease, color 0.14s ease;
        flex-shrink: 0;
      }

      #new-tab:hover {
        background: var(--bg-hover);
        color: var(--text-primary);
      }

      body.session-booting #home,
      body.session-booting #tabs-bar,
      body.session-booting #omnibox-bar { visibility: hidden; }

      .browser-frame.tabs-open {
        top: var(--header-h);
        height: calc(100% - var(--header-h));
      }
