:root {
  --brand: #6e582f;
  --link: #0645ad;
  --link-hover: #6f9500;
  --border: #d7d2c4;
  --bg: #f8f6f1;
  --text: #222;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Yu Gothic", "YuGothic", "Meiryo", sans-serif;
  line-height: 1.6;
  background: #fff;
}

a { color: var(--link); text-decoration: none; }
a:hover, a:focus { color: var(--link-hover); text-decoration: underline; }

.site-header {
  background: var(--brand);
  padding: 0.5rem max(1rem, calc((100vw - 780px) / 2));
}

.site-header img { max-width: 100%; height: auto; display: block; }

.container {
  max-width: 780px;
  margin: 2rem auto;
  padding: 0 1rem;
}

h1 {
  margin: 0 0 0.25rem;
  padding-bottom: 0.4rem;
  border-bottom: 3px solid var(--brand);
  font-size: clamp(1.25rem, 2vw, 1.6rem);
}

.lead { font-weight: 700; }

.search-card {
  border: 1px solid var(--border);
  background: var(--bg);
  padding: 1rem;
  border-radius: 8px;
}

.form-row {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 0.75rem 1rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.form-row label,
.label-text {
  font-weight: 700;
}

input[type="text"],
select {
  max-width: 100%;
  padding: 0.45rem 0.55rem;
  border: 1px solid #aaa;
  border-radius: 4px;
  font: inherit;
  background: #fff;
}

.inline-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin: 1.25rem 0;
}

button {
  min-width: 6rem;
  padding: 0.55rem 1rem;
  border: 1px solid var(--brand);
  border-radius: 4px;
  color: #fff;
  background: var(--brand);
  font: inherit;
  cursor: pointer;
}

button.secondary {
  color: var(--brand);
  background: #fff;
}

button:hover, button:focus { filter: brightness(1.08); }

.site-footer {
  max-width: 780px;
  margin: 2rem auto;
  padding: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 640px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}
