/* Warp Drive: a calm plum dialog that sits over any page. Plain, high-contrast, keyboard first. */
.warp[hidden] { display: none; }
.warp { position: fixed; inset: 0; z-index: 90; display: grid; justify-items: center; align-items: start; padding: 11vh 16px 16px; }
.warp-backdrop { position: absolute; inset: 0; background: rgba(14, 10, 28, .66); backdrop-filter: blur(5px); }
.warp-panel { position: relative; width: min(640px, 100%); max-height: 78vh; display: flex; flex-direction: column; background: #1c1733; color: #ece8f7; border: 1px solid rgba(190, 172, 255, .22); border-radius: 16px; box-shadow: 0 30px 100px rgba(0, 0, 0, .5); padding: 18px 18px 12px; }
.warp-title { margin: 0 0 10px; font: 500 11px/1 "DM Mono", monospace; letter-spacing: .14em; text-transform: uppercase; color: #a79bd6; }
.warp-field { display: flex; align-items: center; gap: 10px; background: #261f45; border: 1px solid rgba(190, 172, 255, .25); border-radius: 11px; padding: 0 12px; }
.warp-field .icon { color: #a79bd6; flex: none; }
.warp-field:focus-within { outline: 2px solid #c9baff; outline-offset: 2px; }
.warp-input { flex: 1; min-width: 0; background: transparent; border: 0; color: inherit; font: 400 17px/1.2 "DM Sans", system-ui, sans-serif; padding: 14px 0; outline: none; }
.warp-input::placeholder { color: #8f86b8; }
.warp-esc, .warp-hint kbd { font: 11px "DM Mono", monospace; color: #b9aee2; border: 1px solid rgba(190, 172, 255, .3); border-radius: 5px; padding: 2px 6px; background: transparent; }
.warp-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 8px; }
.warp-filter { background: transparent; color: #cfc6ee; border: 1px solid rgba(190, 172, 255, .28); border-radius: 999px; padding: 5px 12px; font: 12px "DM Sans", sans-serif; cursor: pointer; }
.warp-filter[aria-pressed="true"] { background: #c9baff; color: #1c1733; border-color: #c9baff; }
.warp-filter:focus-visible { outline: 2px solid #c9baff; outline-offset: 2px; }
.warp-results { list-style: none; margin: 0; padding: 0; overflow-y: auto; min-height: 0; }
.warp-result { display: grid; gap: 3px; padding: 10px 12px; border-radius: 10px; cursor: pointer; border: 1px solid transparent; }
.warp-result.active { background: #2b2352; border-color: rgba(201, 186, 255, .5); }
.warp-result strong { font: 500 15px/1.35 "DM Sans", sans-serif; color: #fff; }
.warp-type { font: 10px "DM Mono", monospace; letter-spacing: .12em; text-transform: uppercase; color: #a79bd6; }
.warp-type-concept { color: #f1c27d; }
.warp-snippet { color: #cfc6ee; font-size: 13px; line-height: 1.5; }
.warp-snippet mark { background: rgba(255, 213, 128, .28); color: #fff3d1; border-radius: 3px; padding: 0 2px; }
.warp-result small { color: #8f86b8; font-size: 11px; }
.warp-actions { display: none; gap: 8px; margin-top: 4px; }
.warp-result.active .warp-actions { display: flex; }
.warp-action { font-size: 12px; color: #1c1733; background: #c9baff; border-radius: 6px; padding: 3px 9px; text-decoration: none; }
.warp-status { min-height: 18px; margin: 8px 4px 0; font-size: 12px; color: #b9aee2; }
.warp-hint { margin: 6px 4px 0; font-size: 11px; color: #8f86b8; }
.warp-open-body { overflow: hidden; }
@media (max-width: 640px) { .warp { padding-top: 4vh; } .warp-hint { display: none; } }
@media (prefers-reduced-motion: no-preference) { .warp-panel { animation: warp-in .18s ease-out; } @keyframes warp-in { from { opacity: 0; transform: translateY(-6px); } } }
.motion-off .warp-panel { animation: none; }

/* Evening pocket: stars for thoughts that were kept. Still, quiet, and not clickable. */
.saved-star { position: absolute; left: var(--x); top: var(--y); width: 4px; height: 4px; margin: -2px 0 0 -2px; border-radius: 50%; background: #fff3d1; box-shadow: 0 0 8px 2px rgba(255, 233, 170, .55); pointer-events: none; }
.rising-words { position: fixed; z-index: 70; max-width: 70vw; padding: 2px 8px; color: #fff3d1; font: 400 15px "Newsreader", serif; white-space: nowrap; pointer-events: none; text-shadow: 0 0 12px rgba(255, 233, 170, .6); }

/* A single four-point glint follows the saved star's first shine. */
.saved-star-sparkle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 104px;
  height: 104px;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(circle, #fff9e7aa 0, #ffe9b426 12%, transparent 38%);
}
.saved-star-sparkle::before, .saved-star-sparkle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(90deg, transparent, #ffe9b4 35%, #fffdf3 50%, #ffe9b4 65%, transparent);
  clip-path: polygon(0 50%, 43% 34%, 50% 0, 57% 34%, 100% 50%, 57% 66%, 50% 100%, 43% 66%);
  width: 88px;
  height: 8px;
}
.saved-star-sparkle::after { width: 104px; transform: translate(-50%, -50%) rotate(90deg); }
.motion-off .saved-star-sparkle { display: none; }
@media (prefers-reduced-motion: reduce) { .saved-star-sparkle { display: none; } }
