.site-search {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    align-items: start;
    justify-items: center;
    padding: 7vh 16px 24px;
}

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

.site-search-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 24, 19, 0.78);
    opacity: 0;
    transition: opacity 0.22s ease;
}

.site-search.is-open .site-search-backdrop {
    opacity: 1;
}

.site-search-panel {
    position: relative;
    width: min(760px, 100%);
    max-height: min(80vh, 860px);
    overflow: auto;
    background: #fffdf8;
    color: #1c1915;
    border-radius: 24px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.site-search.is-open .site-search-panel {
    opacity: 1;
    transform: none;
}

html.site-search-open,
html.site-search-open body {
    overflow: hidden;
}

.site-search-form {
    display: flex;
    gap: 8px;
    align-items: center;
    margin: 16px;
    padding: 8px;
    background: #fff;
    border: 1px solid #eadfcd;
    border-radius: 999px;
}

.site-search-form input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    color: #1c1915;
    font: inherit;
    font-size: 1.05rem;
    padding: 10px 16px;
    outline: none;
}

.site-search-go,
.s-bar button {
    border: 0;
    border-radius: 999px;
    background: #16382c;
    color: #fffdf8;
    font: inherit;
    font-weight: 700;
    padding: 10px 18px;
    cursor: pointer;
}

.site-search-x {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #16382c;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}

.site-search-hint,
.site-search-status {
    margin: 0 22px 12px;
    color: #6d6458;
    font-size: 0.92rem;
}

.site-search-recent,
.site-search-groups {
    padding: 0 12px 8px;
}

.site-search-rowhead,
.s-group header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 4px 10px 8px;
}

.site-search-rowhead span,
.site-search-group h3 {
    margin: 0;
    color: #16382c;
    font-size: 0.82rem;
    font-weight: 800;
}

.site-search-rowhead button,
.s-clear {
    border: 0;
    background: transparent;
    color: #8a6a2f;
    font: inherit;
    cursor: pointer;
}

.site-search-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 10px 12px;
}

.s-chip {
    display: inline-flex;
    align-items: center;
    background: #f3ead8;
    border-radius: 999px;
}

.s-chip button {
    border: 0;
    background: transparent;
    color: #16382c;
    font: inherit;
    cursor: pointer;
}

.search-page .sr-only,
.site-search .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.s-chip-term {
    padding-block: 7px;
    padding-inline: 12px 4px;
}

.s-chip-x {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.site-search-hit,
.s-card {
    display: flex;
    gap: 12px;
    align-items: center;
    margin: 0 8px 8px;
    padding: 8px;
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
}

.site-search-hit:hover,
.s-card:hover {
    background: #f7f1e6;
}

.site-search-hit img,
.s-media img,
.s-media span {
    width: 52px;
    height: 68px;
    object-fit: cover;
    border-radius: 8px;
    background: #efe6d6;
    flex: none;
}

.s-media span,
.site-search-mark {
    display: grid;
    place-items: center;
    color: #16382c;
    font-size: 1.15rem;
    font-weight: 800;
}

.site-search-hit strong,
.s-card h3 {
    display: block;
    margin: 0;
    color: #16382c;
    font-size: 1rem;
    font-weight: 700;
}

.site-search-hit em,
.s-meta {
    display: block;
    margin-top: 2px;
    color: #8a6a2f;
    font-style: normal;
    font-size: 0.85rem;
    text-decoration: none;
}

.site-search-all {
    display: block;
    margin: 4px 18px 18px;
    color: #16382c;
    font-weight: 800;
}

.site-search-group + .site-search-group {
    border-top: 1px solid #f0e6d4;
    padding-top: 8px;
}

.search-page {
    background: #f7f3ea;
}

.s-hero {
    background:
        radial-gradient(circle at 80% 0%, rgba(184, 146, 58, 0.35), transparent 42%),
        #16382c;
    color: #fffdf8;
    padding: 72px 0 32px;
}

.s-wrap {
    width: min(1040px, calc(100% - 32px));
    margin: 0 auto;
}

.s-eyebrow {
    margin: 0 0 6px;
    color: #e6d3a4;
    font-weight: 700;
}

.s-hero h1 {
    margin: 0 0 18px;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 800;
}

.s-bar {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 8px;
    background: #fffdf8;
    border-radius: 999px;
}

.s-bar input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    color: #1c1915;
    font: inherit;
    font-size: 1.05rem;
    padding: 10px 16px;
    outline: none;
}

.s-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.s-pills label {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(255, 253, 248, 0.12);
    color: #fffdf8;
    cursor: pointer;
}

.s-pills input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.s-pills label.is-on {
    background: #fffdf8;
    color: #16382c;
    font-weight: 800;
}

.s-count {
    margin: 14px 0 0;
    color: #e6d3a4;
}

.s-body {
    padding: 28px 0 64px;
}

.s-group {
    margin-bottom: 28px;
}

.s-group header h2 {
    margin: 0;
    color: #16382c;
    font-size: 1.25rem;
}

.s-group header span {
    color: #8a6a2f;
    font-weight: 700;
}

.s-list {
    display: grid;
    gap: 8px;
}

.s-card {
    margin: 0;
    background: #fffdf8;
    border: 1px solid #efe4d2;
}

.s-card h3 a {
    color: #16382c;
    text-decoration: none;
}

.s-card audio {
    width: min(360px, 100%);
    margin-top: 8px;
}

.s-empty {
    padding: 36px 22px;
    background: #fffdf8;
    border: 1px dashed #e2d3b6;
    border-radius: 20px;
    text-align: center;
    color: #16382c;
}

.search-page .pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.search-page .page-link {
    display: block;
    min-width: 36px;
    padding: 6px 10px;
    border: 1px solid #e6dcc8;
    border-radius: 10px;
    background: #fff;
    color: #16382c;
    text-align: center;
    text-decoration: none;
}

.search-page .page-item.active .page-link {
    background: #16382c;
    border-color: #16382c;
    color: #fffdf8;
}

@media (max-width: 640px) {
    .site-search {
        padding: 0;
        align-items: stretch;
    }

    .site-search-panel {
        width: 100%;
        max-height: 100%;
        border-radius: 0;
    }

    .site-search-form,
    .s-bar {
        border-radius: 18px;
        flex-wrap: wrap;
    }

    .s-hero {
        padding-top: 28px;
    }
}
