/* 搜索模式：纯净页 + 导航变换 */

.nav-back,
.nav-search-go,
.nav-search-clear {
  -webkit-appearance: none;
  appearance: none;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.nav-back {
  flex: 0 0 0;
  width: 0;
  height: 34px;
  padding: 0;
  margin: 0;
  border: 0;
  overflow: hidden;
  opacity: 0;
  color: var(--ios-label);
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition:
    width var(--ios-spring-dur) var(--apple-spring),
    flex-basis var(--ios-spring-dur) var(--apple-spring),
    opacity 220ms var(--apple-spring);
}
.nav-back svg { display: block; }

.nav-search-go {
  flex: 0 0 auto;
  max-width: 0;
  height: 34px;
  padding: 0;
  overflow: hidden;
  opacity: 0;
  border: 0;
  border-radius: 999px;
  background: var(--ios-blue);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
  pointer-events: none;
  transition:
    max-width var(--ios-spring-dur) var(--apple-spring),
    padding var(--ios-spring-dur) var(--apple-spring),
    opacity 220ms var(--apple-spring);
}
.nav-search-go:active { transform: scale(.94); }

.nav-search-clear {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(60, 60, 67, .28);
  color: #fff;
}
.nav-search-clear.is-on { display: inline-flex; }

.nav-logo {
  transition:
    opacity 220ms var(--apple-spring),
    width var(--ios-spring-dur) var(--apple-spring),
    flex-basis var(--ios-spring-dur) var(--apple-spring);
}

body.is-search .nav-logo {
  width: 0;
  flex-basis: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}
body.is-search .nav-back {
  flex-basis: 28px;
  width: 28px;
  opacity: 1;
  pointer-events: auto;
}
.nav-lang {
  transition:
    width var(--ios-spring-dur) var(--apple-spring),
    min-width var(--ios-spring-dur) var(--apple-spring),
    opacity 220ms var(--apple-spring);
}
body.is-search .nav-lang {
  width: 0;
  min-width: 0;
  flex: 0 0 0;
  opacity: 0;
  overflow: hidden;
  padding: 0;
  border: 0;
  pointer-events: none;
}
body.is-search .nav-search-go {
  max-width: 72px;
  padding: 0 14px;
  opacity: 1;
  pointer-events: auto;
}
body.is-search .navbar {
  background: #FFFFFF;
  box-shadow: none;
}
body.is-search .navbar::before {
  opacity: 0;
}
body.is-search .tabbar {
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  pointer-events: none;
  transition:
    opacity var(--ios-spring-dur) var(--apple-spring),
    transform var(--ios-spring-dur) var(--apple-spring);
}
body.is-search .page {
  visibility: hidden;
  pointer-events: none;
}

.search-page {
  position: fixed;
  left: 0;
  right: 0;
  top: calc(60px + var(--safe-top));
  bottom: 0;
  z-index: 80;
  background: #FFFFFF;
  opacity: 0;
  transform: translate3d(0, 12px, 0) scale(0.985);
  pointer-events: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transition:
    opacity 380ms var(--apple-spring),
    transform 420ms var(--apple-spring);
}
body.is-search-on .search-page {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  pointer-events: auto;
}

.search-page-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 8px 16px calc(28px + var(--safe-bottom));
}

.search-hero {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 20px 4px 16px;
}
.search-hero-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.024em;
  color: var(--ios-label);
}
.search-hero-sub {
  margin-top: 4px;
  font-size: 13px;
  color: var(--ios-label-3);
  letter-spacing: -0.02em;
}

.search-recent {
  margin-top: 8px;
}
.search-recent-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ios-label-3);
}
.search-recent-clear {
  border: 0;
  background: transparent;
  color: var(--ios-blue);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  padding: 0;
  cursor: pointer;
}
.search-recent-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.search-chip {
  max-width: 100%;
  padding: 8px 12px;
  border: 0;
  border-radius: 999px;
  background: var(--ios-fill-3);
  color: var(--ios-label);
  font-size: 14px;
  font-family: inherit;
  letter-spacing: -0.02em;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-chip:active { transform: scale(.96); }

.search-empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 20px 4px 0;
  color: var(--ios-label-3);
}
.search-empty-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--ios-label);
  letter-spacing: -0.024em;
}
.search-empty-sub {
  margin-top: 4px;
  font-size: 13px;
  color: var(--ios-label-3);
}
.search-block + .search-block { margin-top: 22px; }
.search-label {
  padding: 0 4px 8px;
  font-size: 13px;
  font-weight: 650;
  color: var(--ios-label-3);
}
.search-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 10px 4px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.search-row + .search-row { box-shadow: inset 0 0.5px 0 var(--ios-separator); }
.search-row:active { opacity: .45; }
.search-face {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 10px;
  background: #f2f2f7 center / cover no-repeat;
  color: rgba(60, 60, 67, .55);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 650;
}
.search-face.is-round { border-radius: 50%; }
.search-copy { min-width: 0; flex: 1; }
.search-title {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-sub {
  margin-top: 2px;
  font-size: 13px;
  color: var(--ios-label-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-tools {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  margin: 0 -4px 4px;
  padding: 4px 0 8px;
  background: #fff;
}
.search-filter {
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #1c1c1e;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.search-filter.is-on { color: #007AFF; }
.search-filter:active { opacity: .45; }
.search-filter-pop {
  position: absolute;
  top: 42px;
  right: 0;
  min-width: 148px;
  padding: 6px;
  border-radius: 14px;
  background: #fff;
  border: 0.5px solid rgba(60, 60, 67, .12);
}
.search-filter-pop[hidden] { display: none; }
.search-filter-item {
  display: block;
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #1c1c1e;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}
.search-filter-item.is-on {
  color: #007AFF;
  font-weight: 650;
}
.search-filter-item:active { background: #f2f2f7; }
.search-loading {
  display: flex;
  justify-content: center;
  padding: 56px 0 20px;
}
.search-name {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}
.search-name .search-title {
  flex: 1 1 auto;
  min-width: 0;
}
.search-row .role {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  max-width: 46%;
  padding: 0 8px 0 3px;
  border-radius: 6px;
  background: #fff;
  color: #1c1c1e;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
}
.search-row .role b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 650;
}
.search-row .role img,
.search-row .role svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  display: block;
  border-radius: 4px;
  object-fit: cover;
}
.search-row .role svg.role-badge,
.search-row .role svg.role-usdt { border-radius: 50%; }
.search-row .role:not(:has(img)):not(:has(svg)) { padding: 0 8px; }

@media (prefers-reduced-motion: reduce) {
  .search-page,
  .nav-back,
  .nav-search-go,
  .nav-logo {
    transition: none;
  }
}
