:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --fg: #1a1a1a;
  --accent: #3b6fe0;
  --card-bg: #f5f7fb;
  --border: #e2e6ee;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111318;
    --fg: #e8eaed;
    --accent: #7aa2ff;
    --card-bg: #1a1d24;
    --border: #2a2e38;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.7;
}
header {
  padding: 4rem 1.5rem 3rem;
  text-align: center;
}
header h1 {
  margin: 0 0 0.5rem;
  font-size: 2.2rem;
}
header p {
  margin: 0;
  opacity: 0.7;
}
main {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}
section {
  margin-bottom: 2.5rem;
}
section h2 {
  font-size: 1.3rem;
  border-left: 4px solid var(--accent);
  padding-left: 0.6rem;
  margin-bottom: 1rem;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}
.card {
  display: block;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.2rem;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease;
}
.card:hover {
  border-color: var(--accent);
}
.card h3 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
}
.card p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.75;
}
.search-form {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}
.search-form input[type="search"],
.search-form input[type="text"] {
  width: 100%;
  max-width: 320px;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card-bg);
  color: var(--fg);
  font-size: 0.95rem;
}
.search-form input[type="search"]:focus,
.search-form input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
}
.search-form button {
  padding: 0.55rem 1.1rem;
  border: none;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 0.95rem;
  cursor: pointer;
}
.search-form button:hover {
  opacity: 0.9;
}
.search-meta {
  opacity: 0.7;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
section > button {
  padding: 0.55rem 1.1rem;
  border: none;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 0.95rem;
  cursor: pointer;
  margin-bottom: 1rem;
}
section > button:hover {
  opacity: 0.9;
}
pre.card {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem;
  min-height: 1.6rem;
}
.contact-form {
  max-width: 480px;
}
.contact-form .form-group {
  margin-bottom: 1.2rem;
}
.contact-form label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card-bg);
  color: var(--fg);
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.contact-form button {
  padding: 0.6rem 1.3rem;
  border: none;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 0.95rem;
  cursor: pointer;
}
.contact-form button:hover {
  opacity: 0.9;
}
.contact-form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.form-message {
  margin-top: 1rem;
  font-size: 0.9rem;
}
.form-message--success {
  color: #2e9e4f;
}
.form-message--error {
  color: #d64545;
}
.back-link {
  display: inline-block;
  margin-bottom: 1.5rem;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
}
.back-link:hover {
  text-decoration: underline;
}
footer {
  text-align: center;
  padding: 2rem 1.5rem;
  font-size: 0.85rem;
  opacity: 0.6;
  border-top: 1px solid var(--border);
}
