.search-history-anchor{position:relative;z-index:35}
.search-history-anchor input::-webkit-search-cancel-button{display:none}
.search-input-clear[hidden]{display:none!important}
.search-wrap>.search-input-clear,.search-history-mobile-field>.search-input-clear{display:grid;place-items:center;flex:0 0 32px;width:32px;height:40px;min-height:40px;padding:0;border:0;background:transparent;color:#a5b1bf;border-radius:50%;margin-right:-6px}
.search-input-clear svg{width:16px;height:16px;pointer-events:none}
.search-input-clear:hover{background:#ffffff0a;color:#edf1f5}
.search-wrap input{min-width:0;flex:1}
.search-history-mobile-field input{flex:1}
.search-history-mobile-field input::-webkit-search-cancel-button{display:none}
.search-history-mobile-field>.search-input-clear{flex-basis:44px;width:44px;height:44px;min-height:44px}
.search-history-popover{position:absolute;top:calc(100% + 9px);left:0;right:0;border:1px solid #343a41;border-radius:16px;background:#202428;color:#edf1f5;box-shadow:0 16px 36px #0005;overflow:hidden;text-align:left;animation:search-history-in .15s ease-out}
.search-history-popover button{font:inherit;color:inherit;background:none;border:0;cursor:pointer}
.search-history-heading{display:flex;align-items:center;justify-content:space-between;padding:13px 15px 7px;gap:12px;font-size:13px}
.search-history-heading>button{font-size:12px;color:#aab8c7;padding:8px 0}
.search-history-rows{max-height:min(340px,50vh);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
.search-history-row{display:flex;align-items:center;gap:4px;padding:0 7px}
.search-history-row>button:first-child{display:flex;align-items:center;gap:10px;min-width:0;flex:1;text-align:left;padding:12px 8px;min-height:46px;border-radius:8px;font-size:14px}
.search-history-row>button:first-child svg{flex:none;color:#8f9baa}
.search-history-row span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.search-history-row>button:hover,.search-history-row>button:focus-visible{background:#ffffff09}
.search-history-x{display:grid;place-items:center;flex:none;width:34px;height:36px;border:0;background:none;color:#9ba9b9;cursor:pointer;border-radius:8px;padding:0}
.search-history-popover button:focus-visible,.search-history-x:focus-visible{outline:2px solid #9ab8d9;outline-offset:-3px}
.search-history-popover button:disabled{opacity:.4;cursor:default}
.search-history-note{margin:0;padding:11px 15px;border-top:1px solid #ffffff09;color:#8e9cad;font-size:11px}
.search-history-empty{padding:18px 15px;color:#9ba9b9;font-size:13px}
.search-history-confirm{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:10px 15px;background:#ffffff06;font-size:12px}
.search-history-confirm span{flex:1;min-width:130px;color:#b9c5d1}
.search-history-confirm button{padding:7px 3px}
@keyframes search-history-in{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){.search-history-popover{animation:none}}

.search-history-mobile[hidden],.search-history-popover[hidden]{display:none!important}
.search-wrap.search-history-anchor{overflow:visible}
.search-history-mobile{position:fixed;z-index:950;top:var(--search-viewport-top,0px);left:0;right:0;height:calc(var(--search-viewport-height,100dvh) - var(--search-bottom,80px));background:#191c1f;padding:calc(10px + var(--archive-safe-top,env(safe-area-inset-top,0px))) max(16px,var(--archive-safe-right,env(safe-area-inset-right,0px))) 0 max(16px,var(--archive-safe-left,env(safe-area-inset-left,0px)));display:flex;flex-direction:column;min-height:150px;box-sizing:border-box}
.search-history-mobile-head{display:flex;align-items:center;gap:8px;flex:none;min-height:48px}
.search-history-mobile-head>button{width:44px;height:44px;flex:none;padding:10px;color:#b5c4d3}
.search-history-mobile-field{display:flex;align-items:center;gap:8px;background:#252a30;border-radius:12px;min-width:0;flex:1;padding:0 10px}
.search-history-mobile-field>svg{width:18px;flex:none;color:#96a5b5}
.search-history-mobile-field input{width:100%;min-width:0;border:0;outline:none;background:none;color:#edf1f5;font:inherit;font-size:16px;height:46px;padding:0}
.search-history-mobile .search-history-popover{position:static;display:flex;flex-direction:column;flex:1;min-height:0;background:none;box-shadow:none;border:0;border-radius:0;margin-top:16px;animation:none;overflow:hidden}
.search-history-mobile .search-history-heading{padding:8px 0}
.search-history-mobile .search-history-heading strong{font-size:16px}
.search-history-mobile .search-history-rows{flex:1;max-height:none;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch}
.search-history-mobile .search-history-row{padding:0;border-bottom:1px solid #ffffff08;gap:6px}
.search-history-mobile .search-history-row>button:first-child{min-height:62px;padding:13px 0;gap:12px;font-size:15px}
.search-history-mobile .search-history-row span{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere;line-height:1.5}
.search-history-mobile .search-history-x{width:44px;height:48px}
.search-history-mobile .search-history-note{padding:14px 0 16px;flex:none}
.search-history-open{overflow:hidden}
@media(max-width:1023px){.search-history-popover button:focus:not(:focus-visible){outline:0}.search-history-mobile .search-history-confirm{padding:10px 0}.search-history-mobile .search-history-confirm button{min-height:44px}}
