.kim-search { position: relative; text-align: left; }
.kim-search-panel { position: fixed; z-index: 10000; width: min(680px, 90vw); max-height: calc(100dvh - 50px); overflow: hidden; padding: 0; isolation: isolate; box-sizing: border-box; background: #fff; color: #222; border: 1px solid #ddd; box-shadow: 0 8px 24px #0003; }
.kim-search [hidden] { display: none !important; }
.kim-search-status { font-size: 14px; margin: 0 0 12px; }
.kim-search-results h2, .kim-search-static h2 { font-size: 22px; margin: 20px 0 12px; color: inherit; }
.kim-search-grid, .kim-search-pages { list-style: none !important; padding: 0 !important; margin: 0 !important; }
.kim-search-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px; }
.kim-search-card { display: block; color: inherit; text-decoration: none; }
.kim-search-card:focus-visible { outline: 3px solid #bf1765; outline-offset: 3px; }
.kim-search-image { display: block; overflow: hidden; aspect-ratio: 4/3; background: #f0eded; border-radius: 3px; }
.kim-search-image img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 700ms ease; margin: 0; }
.kim-search-card:hover img, .kim-search-card:focus-visible img { transform: scale(1.1); }
.kim-search-title { display: block; font-size: 15px; line-height: 1.4; padding: 8px 0; overflow-wrap: anywhere; }
.kim-search-placeholder { display: grid; place-items: center; height: 100%; font-size: 42px; color: #777; }
.kim-search-pages li { border-bottom: 1px solid #eee; }
.kim-search-static { padding: 20px; background: #fff; color: #222; }
@media (prefers-reduced-motion: reduce) { .kim-search-image img { transition: none; transform: none !important; } }
@media (max-width: 480px) { .kim-search-scroll { padding: 12px; } .kim-search-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
.kim-search .screen-reader-text { display: block; position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.kim-search-panel a.kim-search-card, .kim-search-static a.kim-search-card { color: #333; text-decoration: none; }
.kim-search-panel a.kim-search-card:hover, .kim-search-static a.kim-search-card:hover { color: #9c1650; }

/* Keep the centered background stationary while the results scroll over it. */
.kim-search-panel::before { content: ""; position: absolute; inset: -10px; background-image: var(--kim-search-background, none); background-position: center center; background-size: cover; filter: blur(5px); opacity: .32; pointer-events: none; z-index: -1; }
.kim-search-scroll { max-height: inherit; overflow-y: auto; overscroll-behavior: contain; padding: 20px; box-sizing: border-box; }
.kim-search-panel .kim-search-title { background: rgb(255 255 255 / 85%); padding: 8px; border-radius: 0 0 3px 3px; }
.kim-search-panel .kim-search-status, .kim-search-panel h2 { width: fit-content; background: rgb(255 255 255 / 85%); padding: 4px 8px; border-radius: 3px; }
@media (max-width: 480px) { .kim-search-scroll { padding: 12px; } }
/* Air Balloon applies floats and margins to every nested header div. */
#header-content .kim-search, #header-content .kim-search div { float: none; margin: 0; }
.kim-search-panel a.kim-search-card, .kim-search-static a.kim-search-card { color: #333 !important; }
.kim-search-panel a.kim-search-card:hover, .kim-search-static a.kim-search-card:hover { color: #9c1650 !important; }
