.selection-lookup {
  position: fixed;
  z-index: 11000;
  box-sizing: border-box;
  width: min(360px, calc(100vw - 16px));
  max-height: min(440px, 70dvh);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #3a6875;
  border-radius: 12px;
  background: #0d2028;
  color: #edf6f8;
  box-shadow: 0 20px 55px #0008, 0 0 0 1px #72d4e31c;
  font: 14px/1.5 "Microsoft YaHei UI", "Yu Gothic", sans-serif;
  animation: selection-lookup-in .16s ease-out both;
}
.selection-lookup__heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 42px; padding: 5px 13px; border-bottom: 1px solid #2b4b55; color: #83d9e9; font-size: .78rem; font-weight: 750; letter-spacing: .05em; }
.selection-lookup__close { flex: none; width: 34px; height: 34px; border: 0; border-radius: 7px; background: transparent; color: #b9d9df; cursor: pointer; font-size: 1.5rem; line-height: 1; }
.selection-lookup__close:hover { background: #1a3a44; color: #fff; }
.selection-lookup__word { padding: 10px 15px 9px; border-bottom: 1px solid #243f48; color: #f4fbfc; font-size: 1.04rem; font-weight: 750; overflow-wrap: anywhere; }
.selection-lookup__body { min-height: 62px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #416a76 #0d2028; }
.selection-lookup__message { margin: 0; padding: 15px; color: #a9bec5; font-size: .83rem; }
.selection-lookup__results { display: grid; }
.selection-lookup__row { display: flex; align-items: stretch; border-bottom: 1px solid #28454e; }
.selection-lookup__result { display: grid; gap: 2px; width: 100%; min-height: 62px; padding: 9px 15px; border: 0; border-bottom: 1px solid #28454e; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.selection-lookup__row .selection-lookup__result { min-width: 0; flex: 1; border-bottom: 0; }
.selection-lookup__add { align-self: center; flex: none; margin-right: 10px; padding: 7px 8px; border: 1px solid #4c8a9b; border-radius: 7px; background: #173b47; color: #a7ebf3; font: inherit; font-size: .72rem; cursor: pointer; }
.selection-lookup__add:hover { background: #245665; color: #fff; }
.selection-lookup__result:hover, .selection-lookup__result:focus-visible { background: #153440; }
.selection-lookup__result strong { color: #f0fafb; font-size: .91rem; font-weight: 720; overflow-wrap: anywhere; }
.selection-lookup__preview { color: #b1c7cd; font-size: .78rem; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow-wrap: anywhere; }
.selection-lookup__result small { color: #72c8d8; font-size: .7rem; }
.selection-lookup__all { position: sticky; bottom: 0; width: 100%; min-height: 42px; padding: 8px 14px; border: 0; border-top: 1px solid #345b65; background: #102b35; color: #8cdeec; text-align: left; cursor: pointer; font-size: .78rem; font-weight: 700; }
.selection-lookup__all:hover { background: #1a4350; color: #fff; }
.selection-lookup button:focus-visible { outline: 2px solid #62d9ef; outline-offset: -2px; }
html[data-theme="day"] .selection-lookup { background: #fff; color: #173b4b; border-color: #9dc6d2; box-shadow: 0 16px 45px #255e7638; }
html[data-theme="day"] .selection-lookup__heading { color: #16718d; border-color: #d8e8ed; }
html[data-theme="day"] .selection-lookup__close { color: #4c7180; }
html[data-theme="day"] .selection-lookup__close:hover { color: #173b4b; background: #e8f3f7; }
html[data-theme="day"] .selection-lookup__word { color: #173b4b; border-color: #e0edf1; }
html[data-theme="day"] .selection-lookup__body { scrollbar-color: #a8cdd8 #fff; }
html[data-theme="day"] .selection-lookup__message, html[data-theme="day"] .selection-lookup__preview { color: #51727f; }
html[data-theme="day"] .selection-lookup__result { border-color: #e5f0f3; }
html[data-theme="day"] .selection-lookup__row { border-color: #e5f0f3; }
html[data-theme="day"] .selection-lookup__add { background: #edf8fb; color: #176982; border-color: #b5d8e1; }
html[data-theme="day"] .selection-lookup__result:hover, html[data-theme="day"] .selection-lookup__result:focus-visible { background: #edf8fb; }
html[data-theme="day"] .selection-lookup__result strong { color: #173b4b; }
html[data-theme="day"] .selection-lookup__result small { color: #17728d; }
html[data-theme="day"] .selection-lookup__all { background: #e8f5f9; color: #116783; border-color: #c9e2e9; }
html[data-theme="day"] .selection-lookup__all:hover { background: #d8edf4; }
@keyframes selection-lookup-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 600px) { .selection-lookup { max-height: min(390px, 60dvh); } .selection-lookup__result { min-height: 64px; } }
@media (prefers-reduced-motion: reduce) { .selection-lookup { animation: none; } }
