:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --text: #1f2933;
  --muted: #5b6776;
  --border: #dde3ea;
  --accent: #0b74c4;
  --accent-hover: #095e9f;
  --accent-soft: #e7f2fb;
  --danger: #c0392b;
  --radius: 12px;
  --maxw: 1000px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11161c;
    --surface: #1a2129;
    --text: #e6ebf0;
    --muted: #9aa7b4;
    --border: #2c3640;
    --accent: #4ea8ec;
    --accent-hover: #7cc0f2;
    --accent-soft: #1d3346;
    --danger: #ff7b6b;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", Meiryo, sans-serif;
  line-height: 1.75;
  font-size: 16px;
}
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.site-header .inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 16px;
}
.site-title {
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  text-decoration: none;
}

main {
  max-width: var(--maxw);
  margin: 24px auto;
  padding: 0 16px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
@media (min-width: 768px) { .card { padding: 32px 40px; } }

h1 { font-size: 24px; margin: 0 0 16px; }
h2 { font-size: 18px; margin: 28px 0 8px; padding-left: 10px; border-left: 4px solid var(--accent); }
@media (min-width: 768px) { h1 { font-size: 30px; } }
ol, ul { padding-left: 1.5em; }
.lead { color: var(--muted); }
.updated { margin-top: 28px; color: var(--muted); font-size: 14px; }

/* Info table (about / law) */
.info-table { width: 100%; border-collapse: collapse; }
.info-table th, .info-table td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
.info-table th { background: var(--accent-soft); width: 30%; font-weight: 600; }
@media (max-width: 600px) {
  .info-table th, .info-table td { display: block; width: 100%; }
  .info-table td { border-top: 0; }
}

/* App list */
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.app-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  text-decoration: none;
  color: var(--text);
}
.app-card:hover { border-color: var(--accent); }
.app-card .tag {
  display: inline-block;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}
.app-card h3 { margin: 8px 0 4px; font-size: 17px; }
.app-card p { margin: 0; color: var(--muted); font-size: 14px; }
.empty { color: var(--muted); padding: 24px 0; }

/* Form */
.form-row { margin-bottom: 18px; }
.form-row label { display: block; font-weight: 600; margin-bottom: 4px; }
.req { color: var(--danger); margin-left: 4px; }
.form-row input, .form-row select, .form-row textarea {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.form-row textarea { resize: vertical; min-height: 160px; }
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.field-error { color: var(--danger); font-size: 14px; margin-top: 4px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.btn {
  display: inline-block;
  padding: 10px 32px;
  font: inherit;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}
.btn:hover { background: var(--accent-hover); }
.btn:disabled { opacity: .6; cursor: default; }
.notice { padding: 12px 16px; border-radius: 8px; margin-bottom: 18px; }
.notice.ok { background: var(--accent-soft); }
.notice.ng { border: 1px solid var(--danger); color: var(--danger); }
.recaptcha-note { font-size: 12px; color: var(--muted); margin-top: 12px; }
.grecaptcha-badge { visibility: hidden; }

.site-footer {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  padding: 24px 16px 32px;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  margin-bottom: 10px;
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }
