body { background: #f6f7f9; }
.movie-card { overflow: hidden; transition: box-shadow .15s ease; }
.movie-card:hover { box-shadow: 0 .25rem .75rem rgba(0,0,0,.12); }
.poster { aspect-ratio: 2 / 3; object-fit: cover; background: #dee2e6; }
.poster-missing { display: flex; align-items: center; justify-content: center; color: #6c757d; font-size: .8rem; }
.overview { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
mark, .ais-Highlight-highlighted, .ais-Snippet-highlighted { background: #ffe58f; padding: 0; }
.ais-RefinementList-item--selected .ais-RefinementList-labelText { font-weight: 600; }
.ais-RefinementList-labelText { min-width: 0; }
.ais-Panel--noRefinement { opacity: .55; }
.ais-RangeInput-input { width: 6rem; }
.ais-CurrentRefinements-categoryLabel { font-weight: 600; }
.ais-CurrentRefinements-category { display: inline-flex; align-items: center; }
.ais-SearchBox-input::-webkit-search-cancel-button { cursor: pointer; }

/* Movie detail */
.movie-hero { position: relative; background: #1b1f27; overflow: hidden; }
.movie-hero::before {
  content: ""; position: absolute; inset: -40px; background: var(--backdrop, none) center / cover no-repeat;
  filter: blur(28px) saturate(1.2); opacity: .55; transform: scale(1.1);
}
.movie-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(15,18,24,.92) 0%, rgba(15,18,24,.75) 55%, rgba(15,18,24,.6) 100%); }
.movie-hero > .container-xl { z-index: 1; }
.movie-hero-poster { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.score-ring {
  --pct: 0; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: conic-gradient(#21d07a calc(var(--pct) * 1%), rgba(255,255,255,.15) 0); position: relative;
}
.score-ring::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: #081c22; }
.score-ring span { position: relative; font-weight: 700; font-size: 1.1rem; }
.score-ring small { font-size: .55em; vertical-align: top; }
.crew dt { font-size: .95rem; }
.cast-chip { display: inline-flex; align-items: center; gap: .5rem; background: #fff; border: 1px solid #dee2e6; border-radius: 999px; padding: .2rem .75rem .2rem .2rem; font-size: .875rem; }
.cast-initial { width: 1.75rem; height: 1.75rem; border-radius: 50%; background: #e9ecef; display: grid; place-items: center; font-weight: 600; color: #495057; }
.poster-strip { display: grid; grid-auto-flow: column; grid-auto-columns: 130px; gap: .75rem; overflow-x: auto; padding-bottom: .5rem; }
.poster-strip-item .poster { width: 130px; }
.facts dt { font-weight: 600; margin-top: .75rem; }
.facts dd { margin-bottom: 0; color: #495057; }

/* Ask */
.activity li { padding: .1rem 0; word-break: break-word; }

.catalog-search { display:grid; gap:1rem 1.5rem; grid-template-columns:minmax(15rem,24%) minmax(0,1fr); grid-template-areas:"filters query" "filters results"; align-items:start; }
.catalog-search.toolbar { grid-template-columns:minmax(0,1fr); grid-template-areas:"query" "filters" "results"; }
.catalog-filters { grid-area:filters; }
.catalog-query { grid-area:query; }
.catalog-results { grid-area:results; min-width:0; }
.toolbar #facets { display:flex; flex-wrap:wrap; gap:.5rem; }
.filter-dropdown { position:relative; }
.filter-dropdown summary { border:1px solid var(--bs-border-color); padding:.35rem .7rem; border-radius:.375rem; background:var(--bs-body-bg); }
.filter-dropdown[open] .facet { position:absolute; z-index:4; min-width:16rem; max-width:min(22rem,90vw); padding:.8rem; margin:.25rem 0; border:1px solid var(--bs-border-color); background:var(--bs-body-bg); border-radius:.375rem; box-shadow:0 .3rem .8rem #0002; }
@media(max-width:767px){.catalog-search{grid-template-columns:minmax(0,1fr);grid-template-areas:"query" "filters" "results"}.filter-dropdown[open]{width:100%}.filter-dropdown[open] .facet{position:static;max-width:100%}}

.instrument-illustration { height: 10rem; object-fit: contain; padding: .5rem; background: white; }

#record-json-dialog { width: min(52rem, 94vw); max-height: 85vh; }
#record-json-dialog::backdrop { background: rgb(0 0 0 / 45%); }

.result-card > .card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; }
.result-card .card-title { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.result-card .card-actions { display: inline-flex; align-items: center; gap: .25rem; flex: none; }
.result-card .card-actions button, .result-card .source-action {
  display: inline-grid; place-items: center; min-width: 1.75rem; min-height: 1.75rem;
  padding: 0 .2rem; color: var(--bs-secondary-color); background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color); border-radius: .3rem; text-decoration: none;
}
.result-card .card-actions button:hover, .result-card .source-action:hover { color: var(--bs-link-color); border-color: currentColor; }
.result-card .card-footer { font-size: .875rem; color: var(--bs-secondary-color); }
.result-card .card-footer:empty, .result-card .card-body:empty { display: none; }
