:root {
  color-scheme: light dark;
  --bg: #f7f5f0;
  --fg: #1d1c1a;
  --muted: #6f6a62;
  --line: #d9d4ca;
  --accent: #1d1c1a;
  --card: #fffdf8;
  --care-bg: #f3ece0;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171614;
    --fg: #ebe6dc;
    --muted: #9b958a;
    --line: #35322d;
    --accent: #ebe6dc;
    --card: #1f1d1a;
    --care-bg: #26221c;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", "Noto Serif", Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.9;
  padding: 0 20px;
}
a { color: inherit; text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

.wrap { max-width: 38rem; margin: 0 auto; padding-block: 3.5rem 4rem; }
header.top { margin-bottom: 2.5rem; }
header.top h1 { font-size: 1.6rem; font-weight: 600; letter-spacing: 0.08em; margin: 0; }
header.top h1 a { text-decoration: none; }
header.top .sub { color: var(--muted); font-size: 0.9rem; margin: 0.2rem 0 0; letter-spacing: 0.05em; }

.lede { font-size: 1.05rem; margin: 0 0 2rem; }

form.line { margin: 0 0 1.5rem; }
textarea {
  width: 100%;
  font: inherit;
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--fg);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.9rem 1rem;
  resize: none;
  outline: none;
}
textarea:focus { border-color: var(--accent); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 0.6rem; flex-wrap: wrap; }
.count { color: var(--muted); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
label.quote { display: flex; align-items: center; gap: 0.5rem; color: var(--muted); font-size: 0.9rem; cursor: pointer; }
label.quote input { width: 1rem; height: 1rem; margin: 0; accent-color: var(--accent); }
button {
  font: inherit;
  font-size: 1rem;
  letter-spacing: 0.15em;
  padding: 0.7rem 1.6rem;
  color: var(--bg);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 6px;
  cursor: pointer;
}
button[disabled] { opacity: 0.5; cursor: default; }
.actions { display: flex; justify-content: flex-end; margin-top: 1rem; }

.state { margin: 0 0 1.5rem; }
.state p { margin: 0 0 0.6rem; }
.care {
  background: var(--care-bg);
  border-left: 3px solid var(--line);
  padding: 1rem 1.2rem;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}
.care p { margin: 0 0 0.5rem; }
.care ul { margin: 0; padding-left: 1.2rem; }
.err { color: var(--muted); font-size: 0.95rem; }

footer.bottom { margin-top: 3.5rem; padding-top: 1.2rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.85rem; }
footer.bottom nav a { margin-right: 1rem; }
footer.bottom p { margin: 0.6rem 0 0; }

/* 一枚（発行ページ） */
article.issue .kicker { color: var(--muted); font-size: 0.85rem; letter-spacing: 0.08em; margin: 0 0 0.3rem; }
article.issue h1 { font-size: 1.5rem; font-weight: 600; margin: 0 0 0.5rem; line-height: 1.5; }
article.issue h2 { font-size: 1.3rem; font-weight: 600; margin: 0 0 0.5rem; line-height: 1.5; }
article.issue h3 { font-size: 1.05rem; font-weight: 600; margin: 2rem 0 0.4rem; }
article.issue .count { color: var(--muted); margin: 0 0 1.8rem; }
article.issue p { margin: 0 0 1.1rem; }
article.issue blockquote {
  margin: 1.2rem 0;
  padding: 0 0 0 1.1rem;
  border-left: 2px solid var(--line);
  color: var(--fg);
  font-style: normal;
}
article.issue blockquote p { margin: 0 0 0.4rem; }
article.issue hr { border: 0; border-top: 1px solid var(--line); margin: 3rem 0; }
article.issue ul { padding-left: 1.3rem; }
.write-cta { margin-top: 2.5rem; font-size: 1rem; }

/* アーカイブ */
ul.archive { list-style: none; padding: 0; margin: 0; }
ul.archive li { padding: 0.6rem 0; border-bottom: 1px solid var(--line); display: flex; gap: 1rem; flex-wrap: wrap; }
ul.archive .d { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 7rem; }

/* 仕組みと約束 */
.about h2 { font-size: 1.15rem; margin: 2.2rem 0 0.6rem; }
.about p, .about li { margin: 0 0 0.8rem; }
.about ul { padding-left: 1.3rem; }
.about .en { color: var(--fg); }

@media (max-width: 480px) {
  body { font-size: 16px; }
  .wrap { padding-block: 2.5rem 3rem; }
  header.top h1 { font-size: 1.4rem; }
}

/* 一行を置く箱（トップページの最新号の下） */
section.write { margin-top: 3.5rem; padding-top: 2rem; border-top: 1px solid var(--line); }
section.write .write-h { font-size: 1.05rem; font-weight: 600; margin: 0 0 0.6rem; letter-spacing: 0.05em; }
section.write .lede { font-size: 1rem; color: var(--fg); margin-bottom: 1.2rem; }
section.write .write-note { color: var(--muted); font-size: 0.85rem; margin: 1rem 0 0; }

/* reCAPTCHA のバッジは出さず、箱の下の文で告知する（Google の規定どおり） */
.grecaptcha-badge { visibility: hidden; }
