    /* ===================== 随处搜搜（全局搜索浮层） ===================== */

    .search-trigger {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      font-weight: 600;
    }

    .search-trigger kbd {
      border: 1px solid var(--line);
      border-bottom-width: 2px;
      border-radius: 4px;
      background: #f2f5f7;
      color: var(--muted);
      font: inherit;
      font-size: 11px;
      padding: 0 4px;
      line-height: 16px;
    }

    .search-mask {
      position: fixed;
      inset: 0;
      background: rgba(15, 25, 35, 0.42);
      display: flex;
      align-items: flex-start;
      justify-content: center;
      padding: 64px 16px 24px;
      overflow-y: auto;
      z-index: 200;                      /* 高于课程编辑弹层(100) */
    }

    .search-card {
      background: var(--panel);
      border-radius: 12px;
      box-shadow: 0 18px 52px rgba(0, 0, 0, 0.3);
      width: min(760px, 100%);
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }

    .search-head {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 12px 14px;
      border-bottom: 1px solid var(--line);
    }

    .search-head .search-icon {
      font-size: 17px;
      line-height: 1;
    }

    .search-head input {
      flex: 1 1 auto;
      border: none;
      outline: none;
      font: inherit;
      font-size: 16px;
      color: var(--text);
      background: transparent;
      min-width: 0;
    }

    .search-head input::-webkit-search-cancel-button {
      cursor: pointer;
    }

    .search-head button {
      flex: 0 0 auto;
      white-space: nowrap;
    }

    .search-results {
      max-height: min(60vh, 520px);
      overflow-y: auto;
      padding: 6px;
    }

    .search-empty {
      padding: 26px 18px;
      color: var(--muted);
      font-size: 13px;
      text-align: center;
      line-height: 1.7;
    }

    .search-empty code {
      background: var(--accent-soft);
      color: var(--focus);
      border-radius: 4px;
      padding: 1px 5px;
    }

    .search-group + .search-group {
      margin-top: 4px;
      border-top: 1px solid var(--line);
      padding-top: 6px;
    }

    .search-group-head {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 6px 8px 4px;
    }

    .search-group-count {
      font-size: 11px;
      color: var(--muted);
    }

    /* 板块来源标签：结果属于哪个板块，一眼能看出来 */
    .hit-badge {
      display: inline-block;
      background: var(--accent-soft);
      color: var(--focus);
      border: 1px solid #bcdde5;
      border-radius: 4px;
      padding: 1px 7px;
      font-size: 11px;
      font-weight: 600;
      white-space: nowrap;
    }

    .search-hit {
      display: flex;
      align-items: center;
      gap: 12px;
      width: 100%;
      text-align: left;
      border: 1px solid transparent;
      border-radius: 7px;
      background: transparent;
      min-height: 0;
      padding: 8px 10px;
      cursor: pointer;
      font: inherit;
    }

    .search-hit:hover {
      background: #f4f7f9;
    }

    .search-hit.active {
      background: var(--accent-soft);
      border-color: var(--focus);
    }

    .search-hit .hit-body {
      flex: 1 1 auto;
      min-width: 0;
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .search-hit .hit-title {
      font-weight: 600;
      font-size: 14px;
      color: var(--text);
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .search-hit .hit-sub {
      font-size: 12px;
      color: var(--muted);
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .search-hit mark {
      background: #fde68a;
      color: inherit;
      border-radius: 2px;
      padding: 0 1px;
    }

    .search-hit .hit-tags {
      display: flex;
      flex-wrap: wrap;
      gap: 4px;
      justify-content: flex-end;
      flex: 0 0 auto;
      max-width: 44%;
    }

    .hit-tag {
      border: 1px solid var(--line);
      border-radius: 4px;
      padding: 0 6px;
      font-size: 11px;
      color: var(--muted);
      white-space: nowrap;
      background: #fafbfc;
    }

    .search-more {
      padding: 4px 12px 8px;
      font-size: 11px;
      color: var(--muted);
    }

    .search-foot {
      display: flex;
      flex-wrap: wrap;
      gap: 6px 16px;
      justify-content: space-between;
      align-items: center;
      border-top: 1px solid var(--line);
      padding: 8px 14px;
      font-size: 11px;
      color: var(--muted);
      background: #fafbfc;
    }

    .search-foot kbd {
      border: 1px solid var(--line);
      border-bottom-width: 2px;
      border-radius: 3px;
      background: #fff;
      padding: 0 4px;
      font: inherit;
      font-size: 11px;
      margin-right: 2px;
    }

    .search-foot .search-scope {
      opacity: 0.85;
    }

    /* 跳转过去之后闪一下，指明"就是这条" */
    .search-flash {
      animation: search-flash 1.8s ease-out;
    }

    @keyframes search-flash {
      0%, 45% { background-color: #fdecc8; box-shadow: 0 0 0 3px #f3c96b; }
      100% { background-color: transparent; box-shadow: 0 0 0 3px transparent; }
    }

    @media (max-width: 720px) {
      .search-mask { padding: 20px 10px; }
      .search-hit .hit-tags { display: none; }
      .search-foot .search-scope { display: none; }
      .search-trigger kbd { display: none; }
    }
