.prediction-search {
  position: relative;
  z-index: 12;
  width: min(420px, 100%);
  margin: 0 0 13px;
}

.prediction-search input {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  outline: 0;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  appearance: none;
  -webkit-appearance: none;
}

.prediction-search input::placeholder { color: var(--muted); }

.prediction-search input:focus {
  border-color: var(--line-strong);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.prediction-search input::-webkit-search-cancel-button { cursor: pointer; }

.prediction-search-results {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  overflow-y: auto;
  max-height: min(380px, 58vh);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.34);
  overscroll-behavior: contain;
}

.prediction-search-results[hidden] { display: none; }

.prediction-search-status {
  margin: 0;
  padding: 9px 11px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.4;
}

.prediction-search-result {
  display: grid;
  width: 100%;
  min-width: 0;
  gap: 4px;
  padding: 10px 11px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.prediction-search-result:last-child { border-bottom: 0; }
.prediction-search-result:hover { background: var(--surface-2); }

.prediction-search-result strong {
  overflow: hidden;
  font-size: 0.77rem;
  font-weight: 660;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prediction-search-result span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 680px) {
  .prediction-search {
    width: 100%;
    margin-bottom: 10px;
  }

  .prediction-search input {
    min-height: 38px;
    font-size: 0.72rem;
  }

  .prediction-search-results {
    max-height: min(330px, 55vh);
  }

  .prediction-search-result strong { font-size: 0.72rem; }
  .prediction-search-result span { font-size: 0.62rem; }
}
