/* Storyteller — Global Search (Spotlight-style) */

.brand-bar {
    justify-content: flex-start;
}

.brand-bar .title,
.brand-bar .brand-wordmark {
    flex: 1;
    min-width: 0;
}

.brand-search {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--st-touch, 44px);
    height: var(--st-touch, 44px);
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #111;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.2s ease;
}

.brand-search:hover {
    background: #f6f6f6;
}

.brand-search svg {
    display: block;
}

.global-search {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 12vh 20px 40px;
}

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

.global-search-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 17, 17, 0.28);
    animation: st-fade-soft 0.2s ease both;
}

.global-search-panel {
    position: relative;
    width: min(640px, 100%);
    max-height: min(70vh, 720px);
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 18px 60px rgba(17, 17, 17, 0.18);
    overflow: hidden;
    animation: st-fade-in 0.22s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.global-search-input-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid #f0f0f0;
}

.global-search-icon {
    color: #888;
    display: inline-flex;
}

.global-search-input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    font: inherit;
    font-size: 18px;
    letter-spacing: -0.02em;
    color: #111;
}

.global-search-input::placeholder {
    color: #bbb;
}

.global-search-kbd {
    font-family: inherit;
    font-size: 12px;
    color: #aaa;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    padding: 3px 7px;
    background: #fafafa;
}

.global-search-hint,
.global-search-empty {
    margin: 0;
    padding: 18px 20px;
    font-size: 14px;
    color: #999;
}

.global-search-results {
    overflow: auto;
    padding: 8px 10px 16px;
}

.global-search-group {
    margin-bottom: 10px;
}

.global-search-group-label {
    margin: 8px 10px 6px;
    font-size: 12px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #aaa;
}

.global-search-result {
    display: block;
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    border-radius: 12px;
    padding: 12px 12px 11px;
    cursor: pointer;
    font: inherit;
    color: inherit;
    transition: background-color 0.15s ease;
}

.global-search-result:hover,
.global-search-result:focus-visible {
    background: #f6f6f6;
    outline: none;
}

.global-search-result-title {
    margin: 0 0 4px;
    font-size: 16px;
    letter-spacing: -0.015em;
    color: #111;
}

.global-search-result-meta {
    margin: 0 0 6px;
    font-size: 13px;
    color: #888;
}

.global-search-result-preview {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
    color: #666;
}

.global-search-result mark {
    background: #fff3bf;
    color: inherit;
    border-radius: 2px;
    padding: 0 1px;
}

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

@media (max-width: 768px) {
    .global-search {
        padding: 10vh 12px 24px;
    }

    .global-search-input {
        font-size: 16px;
    }
}
