*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: #f5f5f5;
  color: #1a1a1a;
  padding: 2rem 1rem;
  min-height: 100vh;
}

main {
  max-width: 680px;
  margin: 0 auto;
}

h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

#q {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  border: 1.5px solid #ddd;
  border-radius: 10px;
  background: white;
  outline: none;
  transition: border-color 0.15s;
}

#q:focus { border-color: #555; }

#results {
  list-style: none;
  margin-top: 0.5rem;
  border: 1.5px solid #ddd;
  border-radius: 10px;
  background: white;
  max-height: 320px;
  overflow-y: auto;
}

#results:empty { display: none; }

#results li {
  padding: 0.875rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.1s;
}

#results li:last-child { border-bottom: none; }
#results li:hover { background: #f7f7f7; }
#results li.active { background: #f0f0f0; font-weight: 500; }

#detail {
  margin-top: 1.5rem;
  background: white;
  border: 1.5px solid #ddd;
  border-radius: 10px;
  padding: 1.75rem;
}

#detail h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

#detail h3 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #888;
  margin: 1.25rem 0 0.625rem;
}

#detail ul, #detail ol { padding-left: 1.25rem; }

#detail li {
  margin-bottom: 0.375rem;
  line-height: 1.6;
  color: #333;
}

.empty {
  padding: 0.875rem 1rem;
  color: #888;
  font-size: 0.9rem;
}
