
      html[data-theme-mode="light"] .ntp-search-box { background: var(--bg-surface); border-color: var(--border-focus); }

      html[data-theme-mode="light"] #ntp-search-input { color: var(--text-primary); }

      html[data-theme-mode="light"] .favorite-tile:hover { background: var(--bg-hover); }

      .favorites-section { width: min(560px, 100%); margin-top: 30px; }

      .favorites-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; color: var(--text-secondary); font-size: 11px; font-weight: 500; letter-spacing: .03em; }

      #favorite-add { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 11px; border: 1px solid var(--border-hairline); border-radius: 999px; background: var(--bg-surface); color: var(--text-secondary); cursor: pointer; font: 10px var(--font-ui); transition: background .14s ease, border-color .14s ease, color .14s ease; }

      #favorite-add:hover { background: var(--bg-surface-2); border-color: var(--border-focus); color: var(--text-primary); }

      .favorites-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 84px)); gap: 6px; }

      .favorite-item { position: relative; min-width: 0; border-radius: 10px; animation: favorite-enter 170ms ease-out both; }

      @keyframes favorite-enter {
        from { opacity: 0; transform: translateY(5px); }
        to { opacity: 1; transform: translateY(0); }
      }

      .favorite-item.dragging { opacity: .42; }

      .favorite-item.drag-over { outline: 1px solid var(--border-focus); background: var(--bg-hover); }

      .favorite-open { width: 100%; min-height: 76px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; padding: 6px 4px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--text-secondary); cursor: pointer; transition: background .14s ease, color .14s ease, transform .14s ease; }

      .favorite-open:hover, .favorite-open:focus-visible { background: var(--bg-hover); color: var(--text-primary); outline: none; transform: translateY(-2px); }
      .favorite-open:active { transform: translateY(0) scale(.98); }

      .favorite-icon { position: relative; width: 42px; height: 42px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--border-hairline); border-radius: 13px; background: var(--bg-surface-2); color: var(--text-primary); font-size: 16px; font-weight: 500; }
      html[data-corners="square"] .favorite-icon { border-radius: var(--radius-control); }

      .favorite-icon img { position: absolute; width: 22px; height: 22px; object-fit: contain; }

      .favorite-name { display: block; width: 100%; overflow: hidden; color: inherit; font-size: 11px; text-align: center; text-overflow: ellipsis; white-space: nowrap; }

      .favorites-empty { grid-column: 1 / -1; margin: 0; padding: 13px 10px; border: 1px dashed var(--border-hairline); border-radius: 9px; color: var(--text-muted); font-size: 10px; text-align: center; }

      .favorite-editor-status { min-height: 1.3em; margin-top: 8px; color: var(--danger); font-size: 10px; }


      #home {
        position: fixed;
        inset: 0;
        top: var(--header-h);
        width: 100%;
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding: clamp(48px, 12vh, 130px) 16px 40px;
        background-color: var(--bg-canvas);
        background-image:
          radial-gradient(ellipse 75% 42% at 50% 38%, color-mix(in srgb, var(--text-primary) 2%, transparent), transparent 72%),
          linear-gradient(to right, color-mix(in srgb, var(--text-primary) 1.3%, transparent) 1px, transparent 1px),
          linear-gradient(to bottom, color-mix(in srgb, var(--text-primary) 1.3%, transparent) 1px, transparent 1px);
        background-size: 100% 100%, 81px 81px, 81px 81px;
        background-position: 0 0, center top, center top;
        z-index: 10;
        transition: opacity 0.16s ease;
        overflow-y: auto;
        overflow-x: hidden;
      }

      #home.hidden { opacity: 0; pointer-events: none; }

      #home:not(.hidden) .ntp-stage {
        animation: homepage-enter 210ms cubic-bezier(.2,.7,.2,1) both;
      }

      @keyframes homepage-enter {
        from { opacity: 0; transform: translateY(7px); }
        to { opacity: 1; transform: translateY(0); }
      }


      .ntp-stage {
        width: 100%;
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: clamp(44px, 7.8vh, 66px);
      }


      .mistral-mark-wrap {
        display: flex;
        align-items: center;
        justify-content: center;
      }

      .mistral-mark {
        width: clamp(80px, 9.8vw, 102px);
        height: auto;
        display: block;
        color: var(--text-primary);
      }


      .ntp-search-box {
        width: min(530px, 100%);
        max-width: 100%;
        height: 54px;
        border-radius: 12px;
        background: var(--bg-search);
        display: flex;
        align-items: center;
        padding: 0 18px;
        gap: 13px;
        border: 1px solid var(--border-hairline);
        cursor: text;
        transition: background 0.15s ease, border-color 0.15s ease;
      }

      .ntp-search-box:hover {
        border-color: var(--border-focus);
      }

      .ntp-search-box:focus-within {
        background: var(--bg-surface);
        border-color: var(--border-focus);
      }

      .ntp-search-icon {
        color: var(--text-muted);
        flex-shrink: 0;
        display: block;
      }

      #ntp-search-input {
        flex: 1;
        min-width: 0;
        width: 100%;
        height: 100%;
        border: none;
        outline: none;
        background: transparent;
        color: var(--text-primary);
        font-family: inherit;
        font-size: 14px;
        font-weight: 400;
        letter-spacing: -0.005em;
      }

      #ntp-search-input::placeholder {
        color: var(--text-muted);
      }


      /* Keep status hidden until an error occurs. */
      #status {
        position: fixed;
        bottom: 14px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 11px;
        font-weight: 400;
        color: color-mix(in srgb, var(--text-primary) 25%, transparent);
        min-height: 1.2em;
        text-align: center;
        letter-spacing: 0.01em;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
        white-space: nowrap;
      }

      #status.error {
        opacity: 1;
        pointer-events: auto;
      }
