/* Fullscreen search overlay */

body.search-overlay-open {
    overflow: hidden;
}

.search-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 90;
    background: var(--search-overlay-bg, var(--theme-bg));
    color: var(--theme-text);
    font-family: var(--theme-font-body);
    --search-result-title-color: var(--pp-title-color, var(--theme-title));
    --search-result-goal-color: color-mix(in srgb, var(--theme-text) 90%, var(--theme-bg) 10%);
    --search-result-goal-weight: 500;
    --search-overlay-header-bg: var(--theme-surface);
    --search-overlay-input-bg: var(--theme-surface-alt);
    --search-overlay-filters-bg: color-mix(in srgb, var(--theme-surface-alt) 88%, var(--theme-bg));
    --search-overlay-filters-section-bg: var(--theme-surface);
    --search-overlay-results-bg: var(--theme-bg);
    --search-overlay-category-bg: var(--theme-surface-alt);
    --search-overlay-suggestions-bg: var(--theme-surface);
}

html[data-theme="classic"] .search-overlay {
    --search-overlay-bg:
        radial-gradient(130% 120% at 0% 0%, #eef7ff 0%, transparent 58%),
        radial-gradient(110% 120% at 100% 8%, #fff6e8 0%, transparent 52%),
        radial-gradient(130% 120% at 45% 100%, #f2ffef 0%, transparent 60%),
        var(--theme-bg);
    --search-overlay-header-bg: color-mix(in srgb, #eef7ff 56%, #ffffff 44%);
    --search-overlay-input-bg: color-mix(in srgb, #f2ffef 54%, #eef7ff 46%);
    --search-overlay-filters-bg: color-mix(in srgb, #f2ffef 56%, #eef7ff 44%);
    --search-overlay-filters-section-bg: color-mix(in srgb, #ffffff 88%, #fff6e8 12%);
    --search-overlay-results-bg: transparent;
    --search-overlay-category-bg: color-mix(in srgb, #eef7ff 58%, #ffffff 42%);
    --search-overlay-suggestions-bg: color-mix(in srgb, #ffffff 84%, #fff6e8 16%);
}

html[data-theme-tone="dark"] .search-overlay {
    --search-result-goal-color: color-mix(in srgb, var(--theme-text) 96%, white 4%);
}

.search-overlay.is-open {
    display: flex;
    flex-direction: column;
}

.search-overlay__header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 24px;
    border-bottom: 1px solid var(--theme-border);
    background: var(--search-overlay-header-bg, var(--theme-surface));
    position: sticky;
    top: 0;
    z-index: 2;
}

.search-overlay__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--theme-title);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.search-overlay__section-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    opacity: 0.9;
    color: var(--theme-accent);
}

.search-overlay__title .search-overlay__section-icon {
    width: 20px;
    height: 20px;
}

.search-overlay__section-icon--wide {
    width: 26px;
    height: 18px;
}

.search-overlay__section-icon--stroke {
    color: var(--theme-accent);
}

.search-overlay__input-wrap {
    flex: 0 1 clamp(280px, 40vw, 520px);
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 6px 12px;
    background: var(--search-overlay-input-bg, var(--theme-surface-alt));
    border: 1px solid var(--theme-border);
    border-radius: 999px;
    position: relative;
}

.search-overlay__input-wrap:focus-within {
    border-color: var(--theme-accent);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--theme-accent) 35%, transparent);
}

.search-overlay__input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    color: var(--theme-text);
    font-size: 1rem;
}

.search-overlay__clear {
    border: none;
    background: transparent;
    color: var(--theme-text-muted);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 1.4rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.search-overlay__clear:hover {
    background: var(--theme-surface-alt);
    color: var(--theme-text);
}

.search-overlay__close-btn {
    margin-left: auto;
    border: 1px solid var(--theme-border);
    background: transparent;
    color: var(--theme-text);
    border-radius: 999px;
    padding: 6px 14px;
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.1;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.search-overlay__close-btn:hover {
    border-color: var(--theme-accent);
    background: var(--theme-surface-alt);
}

.search-overlay__clear:focus-visible,
.search-overlay__close-btn:focus-visible,
.search-overlay__filters-tab:focus-visible,
.search-overlay__filters-clear:focus-visible,
.search-overlay__location-clear:focus-visible,
.search-overlay__location-btn:focus-visible,
.search-overlay__apply:focus-visible,
.search-overlay__more:focus-visible,
.search-result-card__map-btn:focus-visible,
.search-result-card__bookmark:focus-visible,
.search-overlay__suggestions-item:focus-visible,
.search-overlay__suggestions-item-append:focus-visible,
.search-overlay__suggestions-item-remove:focus-visible {
    outline: 2px solid var(--theme-accent);
    outline-offset: 2px;
}

@media (min-width: 581px) {
    .search-overlay__header {
        display: grid;
        grid-template-columns: minmax(0, 1fr) clamp(280px, 40vw, 520px) minmax(0, 1fr);
        align-items: center;
    }

    .search-overlay__title {
        grid-column: 1;
        justify-self: start;
    }

    .search-overlay__input-wrap {
        grid-column: 2;
        width: 100%;
        min-width: 0;
        justify-self: stretch;
    }

    .search-overlay__close-btn {
        grid-column: 3;
        justify-self: end;
        margin-left: 0;
    }
}

.search-overlay__body {
    flex: 1;
    min-height: 0;
    display: flex;
}

.search-overlay__filters-tab {
    display: none;
    position: fixed;
    left: 0;
    top: 14%;
    transform: none;
    z-index: 95;
    border: 1px solid var(--theme-border);
    border-left: none;
    background: var(--theme-surface-alt);
    color: var(--theme-text);
    border-radius: 0 14px 14px 0;
    padding: 12px 8px;
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    display: none;
    align-items: center;
    gap: 6px;
}

.search-overlay__filters-tab-icon {
    width: 16px;
    height: 16px;
    transform: rotate(90deg);
    color: var(--theme-accent);
}

.search-overlay__filters-tab:hover {
    border-color: var(--theme-accent);
    color: var(--theme-accent);
}

.search-overlay__filters-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 92;
}

.search-overlay__filters {
    width: clamp(240px, 24vw, 320px);
    border-right: 1px solid var(--theme-border);
    background: var(--search-overlay-filters-bg, color-mix(in srgb, var(--theme-surface-alt) 88%, var(--theme-bg)));
    padding: 16px;
    overflow-y: auto;
}

.search-overlay__filters-section {
    background: var(--search-overlay-filters-section-bg, var(--theme-surface));
    border-radius: 16px;
    padding: 12px 12px 14px;
    border: 1px solid var(--theme-border);
}

.search-overlay__filters-section + .search-overlay__filters-section {
    margin-top: 14px;
}

.search-overlay__location {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.search-overlay__location-input {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-overlay__location-input.is-hidden {
    display: none;
}

.search-overlay__location-clear {
    border: none;
    background: transparent;
    color: var(--theme-text-muted);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 1.1rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.search-overlay__location-clear:hover {
    background: var(--theme-surface-alt);
    color: var(--theme-text);
}

.search-overlay__location-field {
    width: 100%;
    border: 1px solid var(--theme-border);
    border-radius: 999px;
    padding: 8px 12px;
    background: var(--theme-surface-alt);
    color: var(--theme-text);
    outline: none;
    font-size: 0.95rem;
}

.search-overlay__location-field:focus {
    border-color: var(--theme-accent);
}

.search-overlay__location-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 11px;
}

.search-overlay__location-actions.is-hidden {
    display: none;
}

.search-overlay__location-btn {
    border: 1px solid var(--theme-border);
    background: var(--theme-surface);
    color: var(--theme-text);
    border-radius: 999px;
    padding: 6px 12px 7px;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1;
}

.search-overlay__location-btn:hover {
    border-color: var(--theme-accent);
}

.search-overlay__location-status {
    font-size: 0.8rem;
    color: var(--theme-text-muted);
    line-height: 1.15;
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 2px 10px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: color-mix(in srgb, var(--theme-surface-alt) 72%, var(--theme-surface));
}

.search-overlay__location-status:empty {
    display: none;
    padding: 0;
    min-height: 0;
    border: 0;
    background: transparent;
}

.search-overlay__location-status[data-state="error"] {
    color: #b42318;
    border-color: color-mix(in srgb, #b42318 40%, var(--theme-border) 60%);
    background: color-mix(in srgb, #b42318 12%, var(--theme-surface) 88%);
}

.search-overlay__location-status[data-state="progress"] {
    color: color-mix(in srgb, var(--theme-text) 85%, var(--theme-accent) 15%);
    border-color: color-mix(in srgb, var(--theme-border) 75%, var(--theme-accent) 25%);
    background: color-mix(in srgb, var(--theme-surface-alt) 84%, var(--theme-accent) 16%);
}

.search-overlay__btn-icon {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
    opacity: 0.9;
}

.search-overlay__radius {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.search-overlay__location-actions + .search-overlay__radius {
    margin-top: 11px;
}

.search-overlay__radius.is-hidden + .search-overlay__location-note,
.search-overlay__radius + .search-overlay__location-note {
    margin-top: 11px;
}

.search-overlay__location-note + .search-overlay__apply {
    margin-top: 11px;
}

.search-overlay__radius + .search-overlay__apply {
    margin-top: 11px;
}

.search-overlay__location-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--theme-surface-alt) 70%, var(--theme-bg));
    color: var(--theme-text-muted);
    font-size: 0.82rem;
    line-height: 1.35;
}

.search-overlay__location-note-icon {
    width: 16px;
    height: 16px;
    color: var(--theme-accent);
    flex: 0 0 auto;
    margin-top: 2px;
}

.search-overlay__radius.is-hidden {
    display: none;
}

.search-overlay__radius-label {
    font-size: 0.85rem;
    color: var(--theme-text-muted);
}

.search-overlay__radius-input {
    width: 100%;
}

.search-overlay__apply {
    border: none;
    background: var(--theme-accent);
    color: #ffffff;
    border-radius: 999px;
    padding: 8px 12px;
    font-weight: 600;
    font-size: 0.9rem;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-overlay__apply.is-hidden {
    display: none;
}

.search-overlay__apply:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.search-overlay__location-fields.is-hidden {
    display: none;
}

/* Divider no longer needed when using section cards */

.search-overlay__filters-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.search-overlay__filters-title {
    font-weight: 700;
    color: var(--theme-title);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.search-overlay__filters-clear {
    border: 1px solid var(--theme-border);
    background: transparent;
    color: var(--theme-text-muted);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.8rem;
}

.search-overlay__filters-clear:hover {
    border-color: var(--theme-accent);
    color: var(--theme-text);
}

.search-overlay__filters-clear:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.search-overlay__categories {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.search-overlay__categories-empty {
    font-size: 0.9rem;
    color: var(--theme-text-muted);
}

.search-overlay__category {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--theme-border);
    background: var(--search-overlay-category-bg, var(--theme-surface-alt));
    border-radius: 10px;
    cursor: pointer;
    color: var(--theme-text);
    text-align: left;
    font-size: 0.9rem;
}

.search-overlay__category:hover {
    border-color: var(--theme-accent);
}

.search-overlay__category.is-active {
    border-color: var(--theme-accent);
    box-shadow: 0 0 0 1px var(--theme-accent);
}

.search-overlay__category-count {
    color: var(--theme-text-muted);
    font-size: 0.8rem;
}

.search-overlay__results {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 18px 22px 28px;
    background: var(--search-overlay-results-bg, var(--theme-bg));
}

.search-overlay__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--theme-text-muted);
    font-size: 0.9rem;
    margin-bottom: 6px;
}

.search-overlay__count {
    color: var(--theme-text-muted);
    font-size: 0.85rem;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.search-overlay__suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 6px;
    padding: 10px 12px;
    background: var(--search-overlay-suggestions-bg, var(--theme-surface));
    border: 1px solid var(--theme-border);
    border-radius: 12px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    z-index: 10;
}

.search-overlay__suggestions-section + .search-overlay__suggestions-section {
    margin-top: 10px;
}

.search-overlay__suggestions-title {
    color: var(--theme-text);
    font-size: clamp(0.88rem, 0.82rem + 0.18vw, 0.96rem);
    font-weight: 700;
    margin-bottom: 6px;
}

.search-overlay__suggestions-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.search-overlay__suggestions-item {
    border: 1px solid var(--theme-border);
    background: var(--theme-surface-alt);
    color: var(--theme-text);
    border-radius: 10px;
    padding: 8px 11px;
    font-size: clamp(0.94rem, 0.9rem + 0.16vw, 1rem);
    font-weight: 500;
    line-height: 1.3;
    cursor: pointer;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.search-overlay__suggestions-item:hover {
    border-color: var(--theme-accent);
    color: var(--theme-title);
}

.search-overlay__suggestions-item.is-active {
    border-color: var(--theme-accent);
    color: var(--theme-title);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--theme-accent) 60%, transparent);
}

.search-overlay__suggestions-item.is-active .search-overlay__suggestions-item-main {
    font-weight: 600;
}

.search-overlay__suggestions-item-main {
    background: transparent;
    border: none;
    color: inherit;
    font: inherit;
    font-weight: 500;
    padding: 0;
    text-align: left;
    flex: 1;
}

html[data-theme-tone="dark"] .search-overlay__suggestions {
    background: color-mix(in srgb, var(--theme-surface) 78%, var(--theme-surface-alt) 22%);
    border-color: color-mix(in srgb, var(--theme-border) 55%, var(--theme-text) 45%);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.45);
}

html[data-theme-tone="dark"] .search-overlay__suggestions-title {
    color: var(--theme-title);
}

html[data-theme-tone="dark"] .search-overlay__suggestions-item {
    background: color-mix(in srgb, var(--theme-surface-alt) 84%, var(--theme-border) 16%);
    border-color: color-mix(in srgb, var(--theme-border) 70%, var(--theme-text) 30%);
    color: var(--theme-title);
}

.search-overlay__suggestions-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.search-overlay__suggestions-item-append {
    border: none;
    background: transparent;
    color: var(--theme-text-muted);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.search-overlay__suggestions-item-append svg {
    width: 14px;
    height: 14px;
}

.search-overlay__suggestions-item-append:hover {
    color: var(--theme-accent);
}

.search-overlay__suggestions-item-remove {
    border: none;
    background: transparent;
    color: var(--theme-text-muted);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    opacity: 0;
}

.search-overlay__suggestions-item--history:hover .search-overlay__suggestions-item-remove,
.search-overlay__suggestions-item--history.is-reveal-delete .search-overlay__suggestions-item-remove {
    opacity: 1;
}

.search-overlay__count-line {
    min-height: 1em;
}

.search-overlay__count-line:empty {
    display: none;
}

.search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

@media (min-width: 1100px) {
    .search-results-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }
}

@media (min-width: 1400px) {
    .search-results-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

.search-result-card {
    background: var(--pp-card-bg);
    border: 1px solid var(--pp-card-border);
    border-radius: 12px;
    overflow: hidden;
    min-height: 220px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.search-result-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--pp-card-shadow);
}

.search-result-card a {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.search-result-card__thumb {
    width: 100%;
    height: 140px;
    background: var(--theme-surface-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--theme-text-muted);
    font-size: 0.85rem;
    position: relative;
}

.search-result-card__map-btn {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    border: none;
    background: color-mix(in srgb, var(--theme-bg) 65%, transparent);
    color: var(--theme-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.search-result-card__map-btn:hover {
    background: color-mix(in srgb, var(--theme-bg) 85%, transparent);
    color: var(--theme-accent);
    transform: translateY(-1px);
}

.search-result-card__map-btn svg {
    width: 14px;
    height: 14px;
}

.search-result-card__bookmark {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    border: 1px solid var(--theme-border, #d5dde7);
    background: color-mix(in srgb, var(--theme-bg) 72%, transparent);
    color: var(--theme-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 0;
    z-index: 3;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.search-result-card__bookmark:hover {
    background: color-mix(in srgb, var(--theme-bg) 88%, transparent);
    border-color: color-mix(in srgb, var(--theme-accent) 38%, var(--theme-border));
    color: var(--theme-accent);
    transform: translateY(-1px);
}

.search-result-card__bookmark:disabled,
.search-result-card__bookmark.is-loading {
    opacity: 0.7;
    pointer-events: none;
}

.search-result-card__bookmark .bookmarkIcon {
    width: 13px;
    height: 13px;
}

.search-result-card__bookmark .bookmarkIcon.filled {
    display: none;
}

.search-result-card__bookmark.is-bookmarked .bookmarkIcon.filled {
    display: inline;
}

.search-result-card__bookmark.is-bookmarked .bookmarkIcon.notFilled {
    display: none;
}

.search-overlay__map-modal {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-overlay__map-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.search-overlay__map-card {
    position: relative;
    z-index: 1;
    width: min(720px, 92vw);
    max-height: 85vh;
    background: var(--theme-surface);
    border: 1px solid var(--theme-border);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.search-overlay__map-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--theme-border);
}

.search-overlay__map-title {
    font-weight: 600;
    color: var(--theme-title);
    font-size: 0.95rem;
}

.search-overlay__map-close {
    border: 1px solid var(--theme-border);
    background: transparent;
    color: var(--theme-text);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.85rem;
}

.search-overlay__map-close:hover {
    border-color: var(--theme-accent);
    background: var(--theme-surface-alt);
}

.search-overlay__map-frame {
    width: 100%;
    height: 360px;
    border: none;
}

.search-overlay__map-footer {
    padding: 10px 16px;
    border-top: 1px solid var(--theme-border);
    display: flex;
    justify-content: flex-end;
}

.search-overlay__map-link {
    color: var(--theme-accent);
    text-decoration: none;
    font-weight: 600;
}

.search-overlay__map-link:hover {
    text-decoration: underline;
}

.search-result-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-result-card__thumb-fallback {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--theme-surface-alt, #f1f1f1);
    border: 1px dashed var(--theme-border, #d9d9d9);
    color: var(--theme-accent, #6b5bd6);
    text-transform: uppercase;
}

.search-result-card__thumb-fallback-letter {
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.03em;
}

.search-result-card__body {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.search-result-card__title {
    font-weight: 700;
    color: var(--search-result-title-color);
    font-size: clamp(1rem, 0.96rem + 0.15vw, 1.08rem);
    line-height: 1.28;
}

.search-result-card__goal {
    color: var(--search-result-goal-color);
    font-size: clamp(1rem, 0.97rem + 0.12vw, 1.05rem);
    font-weight: var(--search-result-goal-weight);
    line-height: 1.5;
    letter-spacing: 0.004em;
}

.search-result-card__meta {
    margin-top: auto;
    color: var(--theme-text-muted);
    font-size: 0.75rem;
}

.search-overlay__empty {
    padding: 18px;
    border: 1px dashed var(--theme-border);
    border-radius: 12px;
    color: var(--theme-text-muted);
    background: var(--theme-surface-alt);
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.search-overlay__empty-text {
    display: inline;
}

.search-overlay__empty-action {
    border: none;
    background: transparent;
    color: var(--theme-accent);
    padding: 0;
    margin: 0;
    font: inherit;
    font-weight: 600;
    line-height: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.search-overlay__empty-action:hover {
    color: color-mix(in srgb, var(--theme-accent) 86%, var(--theme-text) 14%);
}

.search-overlay__pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 18px;
}

.search-overlay__more {
    border: 1px solid var(--theme-border);
    background: var(--theme-surface);
    color: var(--theme-text);
    border-radius: 999px;
    padding: 8px 16px;
    font-weight: 600;
    font-size: 0.9rem;
}

.search-overlay__more:hover {
    border-color: var(--theme-accent);
}

.search-overlay__more:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.search-overlay__page {
    color: var(--theme-text-muted);
    font-size: 0.85rem;
}

@media (max-width: 900px) {
    .search-overlay__body {
        flex-direction: column;
    }

    .search-overlay__filters-tab {
        display: flex;
    }

    .search-overlay__filters-backdrop {
        display: none;
    }

    .search-overlay__filters {
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        width: min(360px, 90vw);
        border-right: 1px solid var(--theme-border);
        border-bottom: none;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        border-radius: 0 16px 16px 0;
        z-index: 93;
    }

    .search-overlay.is-filters-open .search-overlay__filters {
        transform: translateX(0);
    }

    .search-overlay.is-filters-open .search-overlay__filters-backdrop {
        display: block;
    }

    .search-overlay__categories {
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 6px;
    }

    .search-overlay__category {
        flex: 0 0 auto;
        white-space: nowrap;
        width: auto;
        max-width: none;
    }

    .search-overlay__meta,
    .search-overlay__count {
        text-align: center;
        justify-content: center;
        padding-left: 2.9rem;
        padding-right: 0.55rem;
    }

    .search-overlay__status,
    .search-overlay__count-line {
        display: block;
        width: 100%;
    }
}

@media (max-width: 580px) {
    .search-overlay__header {
        flex-wrap: wrap;
        gap: 10px;
        padding: 12px 14px;
    }

    .search-overlay__title {
        width: auto;
        flex: 1 1 auto;
        order: 1;
    }

    .search-overlay__close-btn {
        order: 2;
        padding: 4px 10px;
        font-size: 0.85rem;
    }

    .search-overlay__input-wrap {
        width: 100%;
        order: 3;
    }

    .search-overlay__map-card {
        width: calc(100% - 24px);
        max-height: 90vh;
    }

    .search-overlay__map-frame {
        height: 260px;
    }

    .search-overlay__suggestions {
        left: 28px;
        right: auto;
        width: calc(100vw - 58px);
    }

    .search-overlay__categories {
        flex-direction: column;
        flex-wrap: nowrap;
        overflow-x: visible;
        overflow-y: auto;
        max-height: min(42vh, 320px);
        padding-right: 2px;
        padding-bottom: 0;
        gap: 7px;
    }

    .search-overlay__category {
        width: 100%;
        max-width: 100%;
        white-space: normal;
    }

    .search-overlay__category-name {
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .search-overlay__category-count {
        display: inline-flex;
        font-size: 0.76rem;
    }

    .search-result-card__bookmark {
        top: auto;
        right: auto;
        bottom: 8px;
        left: 8px;
    }
}
