.usability-search-button,
.usability-mode-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 999px;
  background: rgba(255, 255, 255, .86);
  color: #315f94;
  font-size: 11px;
  font-weight: 760;
  white-space: nowrap;
  cursor: pointer;
}
.usability-search-button:hover,
.usability-mode-button:hover {
  border-color: rgba(0, 113, 227, .3);
  background: #eaf4ff;
  color: #075eBA;
}
.usability-search-button kbd {
  margin-left: 7px;
  padding: 1px 5px;
  border: 1px solid #d8e0eb;
  border-radius: 5px;
  background: #f6f8fb;
  color: #748196;
  font: 10px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.usability-search-layer {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: min(14vh, 110px) 18px 30px;
  background: rgba(17, 28, 45, .46);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.usability-search-layer.is-open { display: flex; }
.usability-search-dialog {
  width: min(720px, 100%);
  max-height: min(720px, calc(100vh - 100px));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .78);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 32px 100px rgba(12, 28, 52, .3);
}
.usability-search-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px;
  border-bottom: 1px solid #e5eaf1;
}
.usability-search-head input {
  flex: 1;
  min-width: 0;
  height: 46px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #172234;
  font-size: 17px;
}
.usability-search-close {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: #f1f4f8;
  color: #5e6c80;
  font-size: 22px;
  cursor: pointer;
}
.usability-search-body {
  max-height: min(610px, calc(100vh - 190px));
  overflow: auto;
  padding: 14px;
}
.usability-search-section + .usability-search-section { margin-top: 16px; }
.usability-search-section-title {
  margin: 0 5px 8px;
  color: #7a8697;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
}
.usability-quick-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.usability-quick-action,
.usability-search-result {
  border: 1px solid #e1e7ef;
  background: #fff;
  color: #1f2c3e;
  cursor: pointer;
}
.usability-quick-action {
  min-height: 68px;
  padding: 10px;
  border-radius: 13px;
  text-align: left;
}
.usability-quick-action strong,
.usability-quick-action span,
.usability-search-result strong,
.usability-search-result span { display: block; }
.usability-quick-action strong { font-size: 13px; }
.usability-quick-action span { margin-top: 4px; color: #748196; font-size: 11px; }
.usability-search-results { display: grid; gap: 7px; }
.usability-search-result {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 66px;
  padding: 9px 12px;
  border-radius: 13px;
  text-align: left;
}
.usability-search-result:hover,
.usability-search-result.is-active,
.usability-quick-action:hover {
  border-color: #91bdf1;
  background: #f1f7ff;
}
.usability-search-kind {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: #edf4fd;
  color: #1769dc;
  font-size: 11px;
  font-weight: 850;
}
.usability-search-result strong {
  overflow: hidden;
  color: #1b2637;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.usability-search-result span {
  margin-top: 3px;
  overflow: hidden;
  color: #748196;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.usability-search-result em {
  color: #5d6e84;
  font-size: 11px;
  font-style: normal;
}
.usability-search-empty {
  padding: 44px 16px;
  color: #748196;
  text-align: center;
}

.usability-order-switch {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px;
  border: 1px solid #dfe6ef;
  border-radius: 13px;
  background: #f5f8fc;
}
.usability-order-switch > span {
  margin-right: auto;
  padding-left: 5px;
  color: #66758a;
  font-size: 12px;
  font-weight: 700;
}
.usability-order-switch button {
  min-height: 35px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #4e6077;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}
.usability-order-switch button.is-active {
  border-color: #a9c9ee;
  background: #fff;
  color: #0e63c5;
  box-shadow: 0 4px 12px rgba(30, 84, 146, .09);
}

.usability-elapsed {
  display: inline-block;
  margin-left: 6px;
  color: #58708c;
  font-size: 11px;
  font-style: normal;
  font-weight: 650;
}

body[data-usability-mode="basic"] .usability-advanced-control {
  display: none !important;
}
body[data-usability-mode="basic"] .home-share-hint {
  display: none;
}
body[data-usability-mode="basic"] .home-image-mode-status .is-model {
  display: none;
}

.nav button.active {
  background: #1769dc !important;
  color: #fff !important;
  box-shadow: 0 6px 16px rgba(23, 105, 220, .23) !important;
}

@media (max-width: 900px) {
  .usability-search-button kbd { display: none; }
  .usability-search-button,
  .usability-mode-button {
    min-width: 32px;
    padding: 0 9px;
  }
  .usability-quick-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sidebar {
    overflow: hidden;
  }
  .sidebar .nav {
    flex: 1 1 auto;
    min-width: 0;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    touch-action: pan-x;
  }
  .sidebar .nav button { scroll-snap-align: center; }
}

@media (max-width: 620px) {
  .usability-search-layer { padding: 10px; }
  .usability-search-dialog {
    max-height: calc(100dvh - 20px);
    border-radius: 16px;
  }
  .usability-search-body { max-height: calc(100dvh - 92px); }
  .usability-search-button .usability-button-copy,
  .usability-mode-button .usability-button-copy { display: none; }
  .usability-order-switch {
    align-items: stretch;
    flex-wrap: wrap;
  }
  .usability-order-switch > span { width: 100%; }
  .usability-order-switch button { flex: 1 1 120px; }
}
