:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #1f1d1a;
  --muted: #5f5a52;
  --line: #e6e1d8;
  --accent: #9a5b13;
  --accent-soft: #f6ecdf;
  --radius: 12px;
  --max: 960px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161513;
    --surface: #1f1d1a;
    --text: #f1eee8;
    --muted: #b3ada3;
    --line: #36332e;
    --accent: #e2a55a;
    --accent-soft: #2c2419;
  }
}

* { 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 Sans", "Noto Sans JP", "Yu Gothic UI", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.75;
}

a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
}
.brand span { color: var(--accent); }
.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 18px;
  font-size: 0.95rem;
}
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.lang {
  display: flex;
  gap: 4px;
  font-size: 0.85rem;
}
.lang a, .lang strong {
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  color: var(--muted);
  font-weight: 400;
}
.lang strong {
  background: var(--accent-soft);
  color: var(--text);
  border-color: transparent;
}

/* Content */
main { padding: 40px 0 64px; }
h1 { font-size: 1.9rem; line-height: 1.35; margin: 0 0 12px; }
h2 { font-size: 1.35rem; line-height: 1.4; margin: 48px 0 12px; }
h3 { font-size: 1.08rem; margin: 24px 0 6px; }
p, ul, ol, dl { margin: 0 0 14px; }
ul, ol { padding-left: 1.4em; }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 46em; }
.updated { color: var(--muted); font-size: 0.9rem; }

.hero { padding: 24px 0 8px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
  gap: 16px;
  margin-top: 16px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }

.app {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-start;
}
.app-icon {
  width: 84px;
  height: 84px;
  border-radius: 20px;
  background: linear-gradient(145deg, #c98a3c, #7a3f0c);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1.6rem;
  flex: none;
}
.app-body { flex: 1 1 300px; }
.badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.btn {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-size: 0.95rem;
}
@media (prefers-color-scheme: dark) { .btn { color: #1b140b; } }
.btn.secondary {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  cursor: default;
}
.note { font-size: 0.88rem; color: var(--muted); }

dl.info {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 20px;
}
dl.info dt { color: var(--muted); }
dl.info dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 560px) {
  dl.info { grid-template-columns: 1fr; gap: 2px; }
  dl.info dd { margin-bottom: 10px; }
}

.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 10px;
}
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin: 10px 0 0; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 24px 0 40px;
  color: var(--muted);
  font-size: 0.88rem;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
}
.site-footer a { color: var(--muted); }
