.dccs {
  --dccs-border: #d0d4dc;
  --dccs-focus: #1a5fd0;
  --dccs-muted: #5b6270;
  --dccs-hover: #f3f5f9;
  --dccs-radius: 10px;
  max-width: 40rem;
  font: inherit;
}
.dccs-label {
  position: absolute !important;
  width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.dccs-form { margin: 0; position: relative; }
.dccs-input {
  box-sizing: border-box;
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 2.75rem 0.7rem 1rem;
  border: 1px solid var(--dccs-border);
  border-radius: var(--dccs-radius);
  font: inherit;
  font-size: 1rem;
  background: #fff;
  color: inherit;
}
.dccs-input:focus { outline: 2px solid var(--dccs-focus); outline-offset: 1px; border-color: var(--dccs-focus); }
/* Our own clear button replaces the browser's (shown by some browsers only). */
.dccs-input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; display: none; }
.dccs-clear {
  position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; padding: 0; margin: 0;
  border: 0; border-radius: 4px; background: transparent; color: var(--dccs-muted); cursor: pointer;
}
.dccs-clear:hover { background: var(--dccs-hover); color: #1d2330; }
.dccs-clear:focus-visible { outline: 2px solid var(--dccs-focus); outline-offset: 1px; }
.dccs-clear[hidden] { display: none; }
.dccs-clear svg { display: block; }
.dccs-status { margin: 0.5rem 0 0; font-size: 0.875rem; color: var(--dccs-muted); }
.dccs-status:empty { display: none; }
.dccs-results { list-style: none; margin: 0.25rem 0 0; padding: 0; }
.dccs-results:empty { display: none; }
.dccs-hit {
  display: flex; gap: 0.75rem; align-items: center;
  padding: 0.5rem; border-radius: var(--dccs-radius);
  color: inherit; text-decoration: none;
}
.dccs-hit:hover, .dccs-hit:focus { background: var(--dccs-hover); }
.dccs-hit:focus-visible { outline: 2px solid var(--dccs-focus); }
.dccs-thumb { flex: 0 0 56px; width: 56px; height: 56px; object-fit: cover; border-radius: 6px; }
.dccs-body { display: flex; flex-direction: column; min-width: 0; }
.dccs-title { font-weight: 600; line-height: 1.3; }
.dccs-meta { font-size: 0.8125rem; color: var(--dccs-muted); overflow-wrap: anywhere; }
.dccs-head {
  margin: 0.75rem 0 0.25rem; padding: 0.5rem 0.5rem 0;
  border-top: 1px solid var(--dccs-border);
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--dccs-muted);
}
.dccs-ended .dccs-title { font-weight: 500; color: var(--dccs-muted); }

/* Header mode: icon button + floating panel. */
.dccs-pop { position: relative; display: inline-block; max-width: none; line-height: 0; }
.dccs-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; padding: 0; margin: 0;
  border: 0; border-radius: 4px; background: transparent; color: inherit; cursor: pointer;
}
.dccs-btn:hover, .dccs-active .dccs-btn { background: rgba(127, 127, 127, 0.15); }
.dccs-btn:focus-visible { outline: 2px solid var(--dccs-focus); outline-offset: 2px; }
.dccs-btn svg { display: block; }
.dccs-panel {
  position: fixed; z-index: 100000; box-sizing: border-box;
  padding: 12px; overflow: auto; overscroll-behavior: contain;
  background: #fff; color: #1d2330; border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18), 0 2px 6px rgba(0, 0, 0, 0.08);
  /* Reset header typography the panel would otherwise inherit. */
  font-size: 1rem; font-weight: 400; line-height: 1.4; letter-spacing: normal;
  text-transform: none; text-align: left; white-space: normal;
}
.dccs-panel[hidden] { display: none; }
.dccs-panel .dccs-hit { color: inherit; }
@media (prefers-reduced-motion: no-preference) {
  .dccs-panel:not([hidden]) { animation: dccs-in 120ms ease-out; }
  @keyframes dccs-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
}
