body {
  font-family: sans-serif;
  background-color: #ffffff;
  padding: 30px;
  box-sizing: border-box;
}

.search-container {
  background: white;
  text-align: left;
  padding: 20px;
  border-radius: 8px;
  width: 90%;
  max-width: 800px;
  margin: 0 auto; /* 中央寄せ */
  border: 5px solid #666;
}

h3 {
  text-align: center;
  color: #333;
}

.hint {
  text-align: center;
  color: #777;
  font-size: 0.75rem;
  margin-bottom: 16px;
  text-wrap: balance; /* 行の長さを揃えて綺麗に改行する */
}

.note {
  text-align: center;
  color: #999;
  font-size: 0.65rem;
  margin-top: -10px;
  margin-bottom: 16px;
  text-wrap: balance;
}

.index-link {
  text-align: center;
  margin-bottom: 16px;
}

.index-link a {
  color: #0066cc;
  text-decoration: none;
  font-size: 0.95rem;
}

.index-link a:hover {
  text-decoration: underline;
}

#searchInput {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  font-size: 1rem;
  border: 2px solid #ccc;
  border-radius: 6px;
  margin-bottom: 20px;
}

#searchInput:focus {
  outline: none;
  border-color: #0066cc;
}

#results {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.result-card {
  border: 2px solid #666;
  border-radius: 8px;
  padding: 14px 16px;
  background-color: #ffffff;
}

.result-card h3 {
  margin: 0 0 8px;
  text-align: left;
  color: #0066cc;
}

.result-card dl {
  display: grid;
  grid-template-columns: 100px 1fr;
  row-gap: 4px;
  margin: 0;
}

.result-card dt {
  color: #888;
  font-size: 0.9rem;
}

.result-card dd {
  margin: 0;
  font-size: 0.95rem;
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0; /* grid内で折り返しが効くように縮小を許可 */
}

.no-result {
  text-align: center;
  color: #999;
}

.index-link {
  text-align: center;
  margin-top: 20px;
}

.index-link a {
  color: #0066cc;
  text-decoration: none;
  font-size: 0.95rem;
}

.index-link a:hover {
  text-decoration: underline;
}

.credit {
  text-align: center;
  margin-top: 16px;
  font-size: 0.75rem;
  color: #999;
  line-height: 1.6;
}

.credit a {
  color: #0066cc;
  text-decoration: none;
}

.credit a:hover {
  text-decoration: underline;
}

.search-row {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.search-row #searchInput {
  flex: 1;
  margin-bottom: 0;
}

.search-row button {
  padding: 10px 20px;
  font-size: 1rem;
  background-color: #0066cc;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}

.search-row button:hover:not(:disabled) {
  background-color: #0052a3;
}

.search-row button:disabled {
  background-color: #aaa;
  cursor: not-allowed;
}

#sortButtons {
  display: none;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 0.85rem;
  color: #666;
}

#sortSelect {
  padding: 6px 10px;
  font-size: 0.85rem;
  border: 1px solid #666;
  border-radius: 6px;
  cursor: pointer;
  background-color: white;
}
