:root {
  --bg: #f6f8fb;
  --card: #ffffff;
  --text: #1f2733;
  --muted: #5b6675;
  --accent: #2b7de9;
  --accent-dark: #1c5fc0;
  --border: #e3e8ef;
  --ok: #1a9e5c;
  --warn: #c0392b;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(20, 30, 50, 0.08);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10151d;
    --card: #1a2230;
    --text: #e8edf4;
    --muted: #9aa7b8;
    --accent: #5a9cf0;
    --accent-dark: #7ab0f5;
    --border: #2c3646;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", Meiryo, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
}
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.4; }

.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header .inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-logo {
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  color: var(--text);
}
.site-logo span { color: var(--accent); }
.header-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  margin-left: 14px;
}

main {
  max-width: 860px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}
.page-title { font-size: 1.5rem; margin: 8px 0 4px; }
.page-lead { color: var(--muted); margin-top: 0; font-size: 0.95rem; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin: 16px 0;
}

/* ツール一覧 */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin: 20px 0;
}
.tool-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.12s ease, border-color 0.12s ease;
}
.tool-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.tool-card .emoji { font-size: 1.6rem; display: block; margin-bottom: 6px; }
.tool-card h3 { margin: 0 0 4px; font-size: 1.02rem; }
.tool-card p { margin: 0; color: var(--muted); font-size: 0.83rem; }

/* フォーム */
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
}
.field .hint { font-weight: 400; color: var(--muted); font-size: 0.8rem; }
input[type="number"], input[type="text"], input[type="date"], select, textarea {
  width: 100%;
  padding: 10px 12px;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--accent);
  border-color: transparent;
}
.radio-row { display: flex; gap: 16px; flex-wrap: wrap; }
.radio-row label { font-weight: 400; font-size: 0.95rem; }

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 28px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.12s ease;
}
.btn:hover { background: var(--accent-dark); }
.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

/* 結果表示 */
.result {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-top: 18px;
}
.result-main {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--accent-dark);
}
.result table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.result th, .result td {
  text-align: left;
  padding: 7px 4px;
  border-bottom: 1px solid var(--border);
}
.result td.num { text-align: right; font-variant-numeric: tabular-nums; }

.note {
  font-size: 0.8rem;
  color: var(--muted);
  border-left: 3px solid var(--border);
  padding-left: 10px;
  margin: 14px 0;
}

/* 記事部分 */
.article h2 {
  font-size: 1.15rem;
  border-left: 4px solid var(--accent);
  padding-left: 10px;
  margin-top: 32px;
}
.article h3 { font-size: 1rem; }
.article p, .article li { font-size: 0.93rem; }

/* 広告・アフィリエイト枠（審査通過後に差し替え） */
.ad-slot {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.75rem;
  margin: 20px 0;
}

.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8rem;
}
.site-footer .inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 20px 16px;
}
.site-footer a { color: var(--muted); margin-right: 14px; }

@media (max-width: 480px) {
  .header-nav a { margin-left: 10px; font-size: 0.78rem; }
  .page-title { font-size: 1.25rem; }
}
