.doc-search {
  --doc-search-ink: #10231d;
  --doc-search-muted: rgba(28, 57, 48, .68);
  --doc-search-brand: #0c6957;
  --doc-search-brand-deep: #073e34;
  --doc-search-border: rgba(255, 255, 255, .58);
  --doc-search-surface: linear-gradient(135deg, rgba(255, 255, 255, .48) 0%, rgba(236, 250, 245, .24) 48%, rgba(255, 255, 255, .36) 100%);
  position: fixed;
  top: max(10px, env(safe-area-inset-top));
  left: 50%;
  z-index: 2147482000;
  width: min(680px, calc(100vw - 28px));
  color: var(--doc-search-ink);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
  transform: translateX(-50%);
  transition: opacity .2s ease;
  will-change: opacity;
}
.doc-search.is-scrolling {
  opacity: 0;
  pointer-events: none;
}
.doc-search *,
.doc-search *::before,
.doc-search *::after {
  box-sizing: border-box;
}
.doc-search__shell {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 56px;
  padding: 7px 8px 7px 9px;
  overflow: hidden;
  border: 1px solid var(--doc-search-border);
  border-radius: 999px;
  background: var(--doc-search-surface);
  box-shadow: 0 22px 58px rgba(8, 31, 25, .22), 0 5px 18px rgba(8, 31, 25, .12), inset 0 1px 0 rgba(255, 255, 255, .86), inset 0 -1px 0 rgba(255, 255, 255, .22);
  backdrop-filter: blur(28px) saturate(1.75) contrast(1.06);
  -webkit-backdrop-filter: blur(28px) saturate(1.75) contrast(1.06);
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.doc-search__shell::before,
.doc-search__shell::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: inherit;
}
.doc-search__shell::before {
  inset: 1px;
  z-index: 0;
  background: radial-gradient(circle at 18% 0%, rgba(255, 255, 255, .72), transparent 34%), linear-gradient(180deg, rgba(255, 255, 255, .28), transparent 46%);
}
.doc-search__shell::after {
  inset: 0;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, .2);
  box-shadow: inset 0 8px 18px rgba(255, 255, 255, .08), inset 0 -10px 22px rgba(13, 74, 64, .05);
}
.doc-search__shell > * {
  position: relative;
  z-index: 1;
}
.doc-search__icon {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, .46);
  border-radius: 50%;
  background: rgba(255, 255, 255, .2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 4px 12px rgba(8, 31, 25, .08);
  color: var(--doc-search-brand);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.doc-search__input {
  flex: 1 1 auto;
  min-width: 0;
  height: 38px;
  margin: 0;
  padding: 0 4px;
  border: 0;
  border-radius: 999px;
  outline: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  color: var(--doc-search-ink);
  caret-color: var(--doc-search-brand-deep);
  font: inherit;
  font-size: 14px;
  font-weight: 550;
}
.doc-search__input::placeholder {
  color: rgba(25, 55, 46, .56);
  opacity: 1;
}
.doc-search__input::-webkit-search-cancel-button {
  appearance: none;
}
.doc-search__count {
  flex: 0 0 auto;
  min-width: 50px;
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, .32);
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  color: var(--doc-search-muted);
  font-size: 11px;
  font-weight: 750;
  text-align: right;
  white-space: nowrap;
}
.doc-search__actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 2px;
}
.doc-search__button {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .38);
  color: var(--doc-search-brand-deep);
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, color .16s ease;
}
.doc-search__button:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, .62);
  background: rgba(255, 255, 255, .3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .68), 0 5px 14px rgba(8, 31, 25, .1);
}
.doc-search__button:focus-visible {
  outline: 3px solid rgba(20, 109, 94, .22);
  outline-offset: 1px;
}
.doc-search__input:focus,
.doc-search__input:focus-visible {
  outline: none;
  box-shadow: none;
}
.doc-search__button:disabled {
  color: #9da9a5;
  cursor: default;
  opacity: .55;
}
.doc-search__button svg {
  width: 17px;
  height: 17px;
  pointer-events: none;
}
.doc-search__clear[hidden] {
  display: none;
}
.doc-search__panel {
  max-height: min(58vh, 420px);
  margin-top: 8px;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(255, 255, 255, .62);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .74), rgba(231, 246, 240, .58));
  box-shadow: 0 22px 54px rgba(8, 31, 25, .22), inset 0 1px 0 rgba(255, 255, 255, .82);
  backdrop-filter: blur(30px) saturate(1.6);
  -webkit-backdrop-filter: blur(30px) saturate(1.6);
}
.doc-search__panel[hidden] {
  display: none;
}
.doc-search__panel-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 13px;
  border-bottom: 1px solid rgba(220, 231, 227, .8);
  background: rgba(247, 252, 250, .68);
  color: var(--doc-search-muted);
  font-size: 11px;
  font-weight: 750;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.doc-search__results {
  display: grid;
  gap: 2px;
  padding: 6px;
}
.doc-search__empty {
  padding: 22px 14px;
  color: var(--doc-search-muted);
  font-size: 12px;
  text-align: center;
}
.doc-search__result {
  width: 100%;
  display: block;
  padding: 10px 11px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.doc-search__result:hover,
.doc-search__result[aria-current="true"] {
  border-color: rgba(185, 221, 206, .9);
  background: rgba(238, 249, 245, .9);
}
.doc-search__result:focus-visible {
  outline: 3px solid rgba(20, 109, 94, .22);
  outline-offset: 0;
}
.doc-search__result-title {
  display: block;
  overflow: hidden;
  color: var(--doc-search-brand-deep);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.doc-search__result-snippet {
  display: -webkit-box;
  margin-top: 2px;
  overflow: hidden;
  color: var(--doc-search-muted);
  font-size: 11px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.doc-search__snippet-hit {
  border-radius: 3px;
  background: #ffe4a8;
  color: #60420b;
}
mark[data-doc-search-hit] {
  padding: .04em .14em;
  border-radius: 3px;
  background: #ffe6a9;
  box-shadow: 0 0 0 1px rgba(225, 175, 50, .24);
  color: inherit;
}
[data-doc-search-current="true"] mark[data-doc-search-hit] {
  background: #ffc95f;
  box-shadow: 0 0 0 2px rgba(240, 109, 79, .28);
}
[data-doc-search-current="true"] {
  border-radius: 8px;
  outline: 3px solid rgba(240, 109, 79, .18);
  outline-offset: 4px;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .doc-search__shell,
  .doc-search__panel {
    background: rgba(255, 255, 255, .94);
  }
}
@media (max-width: 600px) {
  .doc-search {
    top: max(7px, env(safe-area-inset-top));
    width: calc(100vw - 18px);
  }
  .doc-search__shell {
    min-height: 52px;
    padding: 6px 7px 6px 8px;
    border-radius: 999px;
  }
  .doc-search__icon {
    width: 36px;
    height: 36px;
    padding: 8px;
  }
  .doc-search__input {
    font-size: 16px;
  }
  .doc-search__count {
    display: none;
  }
  .doc-search__button {
    width: 34px;
    height: 34px;
  }
  .doc-search__panel {
    max-height: min(62vh, 430px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .doc-search,
  .doc-search__button {
    transition: none;
  }
}
@media print {
  .doc-search {
    display: none !important;
  }
}
