.lamp-search {
    --lamp-beam-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201000%20600%22%20preserveAspectRatio%3D%22none%22%3E%3Cdefs%3E%3ClinearGradient%20id%3D%22fall%22%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%220%22%20y2%3D%221%22%3E%3Cstop%20stop-color%3D%22%23fff%22%2F%3E%3Cstop%20offset%3D%22.16%22%20stop-color%3D%22%23fafaff%22%20stop-opacity%3D%22.98%22%2F%3E%3Cstop%20offset%3D%22.64%22%20stop-color%3D%22%23f4f4ff%22%20stop-opacity%3D%22.94%22%2F%3E%3Cstop%20offset%3D%22.77%22%20stop-color%3D%22%23eeeefe%22%20stop-opacity%3D%22.86%22%2F%3E%3Cstop%20offset%3D%22.9%22%20stop-color%3D%22%23e5e5fa%22%20stop-opacity%3D%22.4%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23e0e0f7%22%20stop-opacity%3D%220%22%2F%3E%3C%2FlinearGradient%3E%3Cfilter%20id%3D%22soft%22%20x%3D%22-10%25%22%20y%3D%22-5%25%22%20width%3D%22120%25%22%20height%3D%22115%25%22%3E%3CfeGaussianBlur%20stdDeviation%3D%225%22%2F%3E%3C%2Ffilter%3E%3Cfilter%20id%3D%22haze%22%20x%3D%22-15%25%22%20y%3D%22-5%25%22%20width%3D%22130%25%22%20height%3D%22115%25%22%3E%3CfeGaussianBlur%20stdDeviation%3D%2215%22%2F%3E%3C%2Ffilter%3E%3C%2Fdefs%3E%3Cpath%20d%3D%22M300%207H700L1000%20600H0Z%22%20fill%3D%22url%28%23fall%29%22%20opacity%3D%22.18%22%20filter%3D%22url%28%23haze%29%22%2F%3E%3Cpath%20d%3D%22M300%207H700L1000%20600H0Z%22%20fill%3D%22url%28%23fall%29%22%20filter%3D%22url%28%23soft%29%22%2F%3E%3C%2Fsvg%3E");
    --lamp-beam-mobile: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201000%20600%22%20preserveAspectRatio%3D%22none%22%3E%3Cdefs%3E%3ClinearGradient%20id%3D%22fall%22%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%220%22%20y2%3D%221%22%3E%3Cstop%20stop-color%3D%22%23fff%22%2F%3E%3Cstop%20offset%3D%22.16%22%20stop-color%3D%22%23fafaff%22%20stop-opacity%3D%22.98%22%2F%3E%3Cstop%20offset%3D%22.64%22%20stop-color%3D%22%23f4f4ff%22%20stop-opacity%3D%22.94%22%2F%3E%3Cstop%20offset%3D%22.77%22%20stop-color%3D%22%23eeeefe%22%20stop-opacity%3D%22.86%22%2F%3E%3Cstop%20offset%3D%22.9%22%20stop-color%3D%22%23e5e5fa%22%20stop-opacity%3D%22.4%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23e0e0f7%22%20stop-opacity%3D%220%22%2F%3E%3C%2FlinearGradient%3E%3Cfilter%20id%3D%22soft%22%20x%3D%22-10%25%22%20y%3D%22-5%25%22%20width%3D%22120%25%22%20height%3D%22115%25%22%3E%3CfeGaussianBlur%20stdDeviation%3D%225%22%2F%3E%3C%2Ffilter%3E%3Cfilter%20id%3D%22haze%22%20x%3D%22-15%25%22%20y%3D%22-5%25%22%20width%3D%22130%25%22%20height%3D%22115%25%22%3E%3CfeGaussianBlur%20stdDeviation%3D%2215%22%2F%3E%3C%2Ffilter%3E%3C%2Fdefs%3E%3Cpath%20d%3D%22M90%207H910L1000%20600H0Z%22%20fill%3D%22url%28%23fall%29%22%20opacity%3D%22.18%22%20filter%3D%22url%28%23haze%29%22%2F%3E%3Cpath%20d%3D%22M90%207H910L1000%20600H0Z%22%20fill%3D%22url%28%23fall%29%22%20filter%3D%22url%28%23soft%29%22%2F%3E%3C%2Fsvg%3E");
}

@font-face {
    font-family: "Old Dreams";
    src: url("../fonts/old-dreams/Old Dreams.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0020-007E, U+00A0-00FF;
}

.nav-search.lamp-search {
    position: relative;
    overflow: visible;
    isolation: isolate;
    transition: background-color .3s, border-color .3s, box-shadow .3s;
}

.lamp-search-controls {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
}

.lamp-search .lamp-light,
.lamp-search .lamp-panel[hidden],
.lamp-search button[hidden],
.lamp-search a[hidden] {
    display: none;
}

.lamp-search.is-near,
.lamp-search.is-open,
.lamp-search.is-near:focus-within,
.lamp-search.is-open:focus-within {
    z-index: 35;
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

.lamp-search.is-near .lamp-light,
.lamp-search.is-open .lamp-light {
    display: block;
}

.lamp-search.is-near .lamp-search-controls,
.lamp-search.is-open .lamp-search-controls {
    left: var(--lamp-center, 50%);
    width: var(--lamp-input-width, 372px);
    transform: translateX(-50%);
}

.lamp-search .lamp-light {
    --lamp-strength: .13;
    position: absolute;
    z-index: -1;
    pointer-events: none;
    top: -18px;
    left: var(--lamp-center, 50%);
    width: var(--lamp-beam-width, min(960px, 100vw));
    height: var(--lamp-height, 550px);
    transform: translateX(-50%);
    opacity: 1;
    transition: height .22s ease, opacity .25s ease;
}

.lamp-light::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    z-index: 1;
    width: var(--lamp-source-width, 40%);
    height: 7px;
    border-radius: 2px;
    transform: translateX(-50%);
    background: linear-gradient(#28283b 0%, #28283b 45%, #d9d9e2 56%, #fff 80%);
    opacity: .62;
    box-shadow: 0 4px 12px 1px rgba(229, 236, 249, .3);
}

.lamp-light::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--lamp-beam-image);
    background-size: 100% 100%;
    background-repeat: no-repeat;
    opacity: var(--lamp-strength);
    transition: opacity .35s ease;
}

.lamp-search.is-open .lamp-light {
    --lamp-strength: .24;
}

.lamp-search.is-flickering:not(.is-open) .lamp-light {
    animation: lamp-wake 1.8s ease-in-out 1;
}

@keyframes lamp-wake {
    0%, 32%, 70%, 100% { opacity: 1; }
    20%, 57% { opacity: .58; }
}

.lamp-search.is-near input,
.lamp-search.is-open input {
    color: #eff1f7;
    caret-color: #f0f2fa;
    font-family: "Old Dreams", "Iowan Old Style", Baskerville, Georgia, serif;
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: .015em;
    text-shadow: 0 0 2px rgba(237, 242, 255, .32), 0 -3px 13px rgba(225, 236, 255, .3);
}

.lamp-search.is-near input::placeholder,
.lamp-search.is-open input::placeholder {
    color: #d6dce8;
}

.lamp-search.is-near .lamp-submit,
.lamp-search.is-open .lamp-submit {
    color: #e0e5ef;
    background: none;
    border-color: transparent;
}

.lamp-search .lamp-panel {
    position: absolute;
    top: calc(100% + 46px);
    left: var(--lamp-center, 50%);
    width: var(--lamp-panel-width, 620px);
    max-height: var(--lamp-available-height, 480px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #777d91 transparent;
    transform: translateX(-50%);
    padding: 12px 84px 24px;
    color: #e9edf5;
    font-family: "Iowan Old Style", Baskerville, "Palatino Linotype", Georgia, serif;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.lamp-panel .lamp-status {
    margin: 8px 0 16px;
    color: #cbd2df;
    font-size: .94rem;
    letter-spacing: .035em;
    text-shadow: 0 -2px 10px rgba(223, 234, 255, .22);
    line-height: 1.5;
}

.lamp-status:empty {
    display: none;
}

.lamp-sound-feedback {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 12px;
    color: #e3e6ee;
    font: 13px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.lamp-sound-feedback[hidden] {
    display: none;
}

.lamp-search .lamp-sound-feedback button {
    padding: 5px 9px;
    border: 1px solid rgba(230, 235, 249, .3);
    border-radius: 5px;
    color: #eef1fa;
    background: rgba(234, 240, 255, .08);
    font: inherit;
}

.lamp-results {
    display: grid;
    gap: 5px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.lamp-results .lamp-result {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 70px;
    padding: 7px 9px;
    color: #eff1f7;
    border-radius: 8px;
    text-decoration: none;
    transition: background-color .15s;
}

.lamp-result:hover,
.lamp-result[aria-selected="true"] {
    color: #fff;
    background: rgba(237, 242, 255, .07);
}

.lamp-result-cover {
    display: grid;
    flex: 0 0 37px;
    width: 37px;
    height: 55px;
    place-items: center;
    overflow: hidden;
    border-radius: 2px;
    color: #f8f7ff;
    background: #393554;
    box-shadow: 0 2px 6px rgba(21, 20, 37, .14);
    font-family: Georgia, serif;
}

.lamp-result-cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lamp-result-copy {
    min-width: 0;
    flex: 1;
}

.lamp-result-title,
.lamp-result-author {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lamp-result-title {
    position: relative;
    padding: 5px 0 3px;
    margin: -5px 0 -3px;
    font-family: "Old Dreams", "Iowan Old Style", Baskerville, Georgia, serif;
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: .015em;
    line-height: 1.4;
    text-shadow: 0 0 1px rgba(248, 250, 255, .3), 0 -2px 10px rgba(231, 239, 255, .34);
}

.lamp-text-vapor {
    position: absolute;
    inset: 5px 0 auto;
    pointer-events: none;
    user-select: none;
    opacity: .28;
    filter: blur(2px);
    mask-image: linear-gradient(to bottom, #000 0%, #000 35%, transparent 90%);
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 35%, transparent 90%);
    transform-origin: left center;
    animation: lamp-vapor 5s ease-in-out infinite alternate;
}

@keyframes lamp-vapor {
    from { transform: translate(-1px, -2px) skewX(-4deg); opacity: .28; }
    to { transform: translate(2px, -6px) skewX(5deg); opacity: .12; }
}

.lamp-result-author {
    margin-top: 2px;
    color: #c7cfdc;
    font-size: .92rem;
    font-style: italic;
    letter-spacing: .025em;
    text-shadow: 0 -2px 9px rgba(230, 238, 251, .2);
}

.lamp-panel .lamp-all-results {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin: 15px 9px 0;
    color: #e0e7f2;
    font-size: .93rem;
    font-weight: 400;
    letter-spacing: .025em;
    text-shadow: 0 -2px 10px rgba(230, 238, 251, .25);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.lamp-panel a:focus-visible,
.lamp-search.is-open button:focus-visible {
    outline: 2px solid #d3dcf0;
    outline-offset: 2px;
}

.lamp-backdrop {
    position: fixed;
    inset: 0;
    z-index: 29;
    pointer-events: none;
    background: rgba(2, 3, 12, .86);
    opacity: 0;
    transition: opacity .4s ease;
}

.lamp-backdrop.is-near {
    opacity: .65;
}

.lamp-backdrop.is-open {
    opacity: 1;
}

.lamp-backdrop[hidden] {
    display: none;
}

.rise-ready {
    opacity: 0;
    transform: translate3d(0, 28px, 0);
    transition: opacity .7s ease, transform .8s cubic-bezier(.2, .7, .2, 1);
    transition-delay: var(--rise-delay, 0ms);
}

.rise-ready.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.rise-ready:focus-within {
    opacity: 1;
    transform: none;
}

@media (max-width: 620px) {
    .lamp-search .lamp-panel {
        top: calc(100% + 24px);
        padding: 12px 22px 25px;
    }

    .lamp-result-title {
        font-size: 1.32rem;
    }

    .lamp-results .lamp-result {
        gap: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lamp-search .lamp-light,
    .lamp-text-vapor {
        animation: none !important;
    }

    .lamp-backdrop,
    .lamp-light::after {
        transition: none;
    }

    .rise-ready {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

.lamp-search.is-open input:focus-visible { outline: none; box-shadow: none; }
.lamp-search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
@media(max-width:620px) {
    .lamp-search .lamp-light {
        --lamp-beam-image: var(--lamp-beam-mobile);
    }
}
