#top-bar .study-search-open { color: #f2d898; border-color: #8e713d; }
#top-bar .study-search-open span[aria-hidden] { font-size: 19px; line-height: 0; margin-right: 4px; }
.study-search-dialog { width: min(1050px, calc(100vw - 24px)); max-height: min(84vh, 800px); padding: 0; border: 1px solid #82683f; border-radius: 16px; background: #191b18; color: #f6efe0; box-shadow: 0 24px 70px #000a; }
.study-search-dialog::backdrop { background: #080b0bc9; backdrop-filter: blur(4px); }
.study-search-frame { padding: 22px; }
.study-search-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.study-search-kicker { margin: 0 0 3px; color: #c5a66f; text-transform: uppercase; letter-spacing: .13em; font-size: 11px; }
.study-search-heading h2 { margin: 0 0 18px; font: 600 25px/1.2 Georgia, serif; color: #fff7e5; }
.study-search-close { border: 1px solid #756548; border-radius: 8px; background: #292720; color: #f2e5cd; font-size: 23px; line-height: 1; width: 34px; height: 34px; cursor: pointer; }
.study-search-label { display: block; margin-bottom: 7px; color: #e5d9c3; font-size: 13px; }
.study-search-input { width: 100%; box-sizing: border-box; padding: 13px 15px; border: 1px solid #a58750; border-radius: 9px; outline: none; background: #272923; color: #fff; font: 16px/1.4 system-ui, sans-serif; }
.study-search-input:focus-visible { outline: 2px solid #99d9df; outline-offset: 2px; }
.study-search-hint { margin: 8px 0 12px; color: #bdb8a9; font-size: 12px; }
.study-search-filters { display: flex; gap: 5px; overflow-x: auto; padding: 0 0 10px; scrollbar-width: thin; }
.study-search-filter { flex: 0 0 auto; min-width: 46px; padding: 7px 10px; border: 1px solid #50534d; border-radius: 7px; background: #242822; color: #e7e3d9; font: 700 12px/1.2 system-ui, sans-serif; cursor: pointer; }
.study-search-filter:hover, .study-search-filter[aria-pressed="true"] { background: #343a32; border-color: currentColor; }
.study-search-filter:disabled { opacity: .45; cursor: not-allowed; }
.study-search-filter:focus-visible, .study-search-result:focus-visible, .study-search-preview-open:focus-visible { outline: 2px solid #99d9df; outline-offset: 2px; }
.study-search-filter[data-kind="a1"], .study-search-badge[data-kind="a1"] { color: #d8afff; }
.study-search-filter[data-kind="b1"], .study-search-badge[data-kind="b1"] { color: #f4cb81; }
.study-search-filter[data-kind="c1"], .study-search-badge[data-kind="c1"] { color: #9ee3bd; }
.study-search-filter[data-kind="d1"], .study-search-badge[data-kind="d1"] { color: #a8bfe9; }
.study-search-filter[data-kind="e1"], .study-search-badge[data-kind="e1"] { color: #9edbe7; }
.study-search-filter[data-kind="f1"], .study-search-badge[data-kind="f1"] { color: #ffb6a1; }
.study-search-filter[data-kind="q1"], .study-search-badge[data-kind="q1"] { color: #f2a9c7; }
.study-search-status { min-height: 22px; margin: 0 0 6px; color: #d6c5a6; font-size: 13px; }
.study-search-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; min-height: 220px; }
.study-search-results { overflow: auto; max-height: min(48vh, 450px); display: grid; align-content: start; gap: 6px; }
.study-search-result { display: grid; grid-template-columns: 38px minmax(0, 1fr); column-gap: 10px; width: 100%; text-align: left; border: 1px solid #4d524a; border-radius: 9px; padding: 11px; background: #242822; color: #f8f1e3; cursor: pointer; }
.study-search-result:hover, .study-search-result[aria-selected="true"] { border-color: #d6b874; background: #33372e; }
.study-search-result-copy { min-width: 0; }
.study-search-badge { display: inline-flex; justify-content: center; align-items: center; align-self: start; min-height: 31px; border: 1px solid currentColor; border-radius: 7px; background: #1a1d19; color: #ded7c7; font: 800 12px system-ui, sans-serif; }
.study-search-result-title { display: block; font-weight: 700; font-size: 14px; }
.study-search-result-place { display: block; margin-top: 3px; color: #dcc18d; font-size: 12px; }
.study-search-result-snippet { display: block; margin-top: 6px; color: #c7c8be; font-size: 12px; line-height: 1.4; }
.study-search-preview { min-width: 0; overflow: auto; max-height: min(48vh, 450px); border: 1px solid #51574f; border-radius: 10px; padding: 18px; background: #232821; box-sizing: border-box; }
.study-search-preview-empty { margin: 0; color: #bbbbae; font-size: 14px; }
.study-search-preview-label { margin: 0 0 7px; color: #c5a66f; font: 700 11px system-ui, sans-serif; text-transform: uppercase; letter-spacing: .1em; }
.study-search-preview h3 { margin: 0 0 8px; color: #fff5df; font: 700 21px/1.25 Georgia, serif; }
.study-search-preview-source { margin: 0 0 14px; color: #d7bd8d; font-size: 12px; }
.study-search-preview-body { margin: 0 0 15px; color: #e4e2da; white-space: pre-wrap; overflow-wrap: anywhere; font: 14px/1.55 system-ui, sans-serif; }
.study-search-preview-body mark { color: #171b16; background: #f0d185; border-radius: 2px; }
.study-search-preview-open { border: 1px solid #c1a06a; border-radius: 8px; padding: 9px 13px; background: #59472d; color: #fff5dc; cursor: pointer; font: 700 13px system-ui, sans-serif; }
.study-search-retry { border: 1px solid #a58750; background: #302b20; color: #fff3d9; padding: 7px 12px; border-radius: 7px; cursor: pointer; }
.study-search-target { animation: study-search-pulse 2.4s ease-out; }
@keyframes study-search-pulse { 0%,35% { outline: 3px solid #e8c474; outline-offset: 4px; } 100% { outline: 3px solid transparent; outline-offset: 4px; } }
@media (max-width: 700px) { #top-bar .study-search-open { flex: 0 0 auto; } .study-search-frame { padding: 16px; } .study-search-heading h2 { font-size: 21px; } .study-search-filters { flex-wrap: wrap; overflow: visible; } .study-search-columns { grid-template-columns: 1fr; } .study-search-results { max-height: min(29vh, 240px); } .study-search-preview { max-height: min(24vh, 220px); } }
@media (max-width: 390px) { #top-bar .study-search-open .btn-label { display: none; } #top-bar .study-search-open span[aria-hidden] { margin-right: 0; } }
@media (min-width: 901px) and (max-width: 1439px) { #top-bar .study-search-open .btn-label { display: none; } #top-bar .study-search-open span[aria-hidden] { margin-right: 0; } }
