* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  color: #111827;
}

body {
  display: flex;
  flex-direction: column;
  background: #fafafa;
}

header {
  padding: 10px 14px;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 10;
}

.search-wrap {
  position: relative;
  flex: 1 1 260px;
  min-width: 220px;
}

#search {
  width: 100%;
  padding: 8px 10px;
  font-size: 14px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  outline: none;
}

#search:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

#suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  max-height: 240px;
  overflow-y: auto;
  display: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

#suggestions div {
  padding: 7px 10px;
  cursor: pointer;
  font-size: 14px;
}

#suggestions div:hover,
#suggestions div.active {
  background: #eef2ff;
  color: #4338ca;
}

.control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #374151;
}

#depth {
  width: 90px;
}

#depthVal {
  display: inline-block;
  min-width: 1ch;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

#reset {
  padding: 6px 12px;
  font-size: 13px;
  border: 1px solid #d1d5db;
  background: white;
  border-radius: 6px;
  cursor: pointer;
}

#reset:hover {
  background: #f3f4f6;
}

#status {
  font-size: 12px;
  color: #6b7280;
  margin-left: auto;
  min-width: 160px;
}

main {
  flex: 1;
  position: relative;
}

#cy {
  position: absolute;
  inset: 0;
  background: #fafafa;
}

footer {
  padding: 8px 14px;
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
  color: #6b7280;
}
