/* 見た目。和紙のような生成り地＋墨色＋朱色のアクセント。 */
:root {
  --paper: #faf7f0;
  --ink: #1f1d1a;
  --muted: #6b655c;
  --accent: #b7282e; /* 朱色 */
  --line: #e4ddcf;
  --serif: "Noto Serif", "Noto Serif JP", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", "Noto Sans", "Noto Sans Arabic", "Noto Nastaliq Urdu", "Noto Sans Bengali", "Noto Sans Devanagari", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); line-height: 1.8; }
a { color: inherit; }
main { max-width: 44rem; margin: 0 auto; padding: 1.5rem 1.25rem 4rem; }

.site-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); }
.brand { font-family: var(--serif); font-weight: 700; font-size: 1.15rem; text-decoration: none; }
.brand::before { content: ""; display: inline-block; width: .6em; height: .6em; border-radius: 50%; background: var(--accent); margin-inline-end: .5em; }
.brand { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 .6em; }
.brand-ja { font-size: .75rem; font-weight: 400; color: var(--muted); letter-spacing: .1em; }
.hero .ja-title { font-family: "Noto Serif JP", "Yu Mincho", serif; letter-spacing: .08em; }
.hero .en-title { font-family: var(--serif); font-size: 1.2rem; color: var(--ink); margin: 0 0 .5rem; }
.lang-link { text-decoration: none; font-size: 1.2rem; }
.site-footer { text-align: center; color: var(--muted); font-size: .85rem; padding: 2rem 0; border-top: 1px solid var(--line); }

.hero { padding: 2rem 0 1rem; text-align: center; }
.hero h1 { font-family: var(--serif); font-size: 2.2rem; margin: 0 0 .25rem; }
.hero p { color: var(--muted); margin: 0; }
h2 { font-family: var(--serif); font-size: 1.2rem; border-bottom: 2px solid var(--accent); display: inline-block; }

.lang-grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: .75rem; }
.lang-grid a { display: block; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: 6px; background: #fff; text-decoration: none; }
.lang-grid a:hover { border-color: var(--accent); }

.article-list { list-style: none; padding: 0; }
.article-list li { border-bottom: 1px solid var(--line); }
.article-list a { display: block; padding: 1rem 0; text-decoration: none; }
.article-list .title { display: block; font-family: var(--serif); font-weight: 700; font-size: 1.15rem; }
.article-list .desc { display: block; color: var(--muted); font-size: .95rem; }
.article-list time, .article time { color: var(--muted); font-size: .85rem; }

.article h1 { font-family: var(--serif); font-size: 1.9rem; line-height: 1.4; margin: .5rem 0; }
.article .back a { color: var(--muted); font-size: .9rem; text-decoration: none; }
.article .body h2 { margin-top: 2.2rem; }
.article .body img { max-width: 100%; height: auto; border-radius: 4px; }
.article .body blockquote { margin: 1.5rem 0; padding: .5rem 1rem; border-inline-start: 4px solid var(--accent); background: #fff; }
.article .body table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .95rem; background: #fff; }
.article .body th, .article .body td { border: 1px solid var(--line); padding: .5rem .75rem; text-align: start; vertical-align: top; }
.article .body th { background: #f1ece1; }
/* 有料の箱・フォロー欄 */
.paywall, .follow { margin: 2.5rem 0; padding: 1.5rem; background: #fff; border: 1px solid var(--line); border-radius: 10px; text-align: center; }
.paywall { border-top: 4px solid var(--accent); position: relative; }
.paywall::before { content: ""; position: absolute; left: 0; right: 0; top: -5rem; height: 5rem; background: linear-gradient(transparent, var(--paper)); pointer-events: none; }
.paywall h2, .follow h2 { display: block; border: none; margin-top: 0; }
.pw-btn { display: block; width: 100%; max-width: 26rem; margin: .5rem auto; padding: .85rem 1rem; font: inherit; font-weight: 700; border: 1px solid var(--ink); border-radius: 999px; background: #fff; color: var(--ink); cursor: pointer; }
.pw-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.pw-btn.small { display: inline-block; width: auto; padding: .55rem 1.2rem; margin: .25rem; }
.pw-btn:disabled { opacity: .5; }
.pw-note, .pw-or { color: var(--muted); font-size: .9rem; margin: .25rem 0; }
.pw-login { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px dashed var(--line); font-size: .95rem; }
.paywall input, .follow input { font: inherit; padding: .55rem .8rem; border: 1px solid var(--line); border-radius: 6px; min-width: 14rem; max-width: 100%; }
.pw-msg { padding: .75rem 1rem; background: #fff6e5; border-radius: 6px; text-align: center; }
.pw-account { font-size: .85rem; color: var(--muted); text-align: center; }
.linklike { background: none; border: none; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
/* 翻訳の改善提案の欄 */
.suggest { margin: 1rem 0 2rem; font-size: .9rem; color: var(--muted); }
.suggest summary { cursor: pointer; text-decoration: underline; }
.suggest form { display: grid; gap: .75rem; margin-top: .75rem; }
.suggest label { display: grid; gap: .25rem; }
.suggest textarea, .suggest input { font: inherit; padding: .5rem .7rem; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); }
.suggest .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.suggest .pw-btn { justify-self: start; margin: 0; }

/* 法的表記のページとフッターのリンク */
.legal-links { margin-bottom: .5rem; }
.legal-links a { color: var(--muted); }
.legal table th { width: 9rem; white-space: nowrap; }
.legal .legal-en { display: block; color: var(--muted); font-size: .85rem; margin-top: .25rem; }
.legal-updated { color: var(--muted); font-size: .85rem; margin-top: 2rem; }
@media (max-width: 560px) { .legal table th { white-space: normal; width: auto; } }
.ai-note { margin-top: 3rem; font-size: .85rem; color: var(--muted); }
.other-langs ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.other-langs a { display: inline-block; padding: .3rem .8rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; text-decoration: none; font-size: .9rem; }

/* 右から左の言語（アラビア語・ウルドゥー語）は行間を少し広げる */
[dir="rtl"] body, html[dir="rtl"] { line-height: 2; }
html[lang="ur"] body { font-family: "Noto Nastaliq Urdu", var(--sans); line-height: 2.3; }

/* 共有ボタン（言語ごとに並び順が違う。押しやすい大きさを保つ） */
.share { margin: 2.5rem 0 1rem; }
.share ul { list-style: none; padding: 0; margin: .75rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.share a, .share button { display: inline-block; min-height: 44px; box-sizing: border-box; padding: .55rem 1rem; font: inherit; font-size: .95rem; line-height: 1.6; border: 1px solid var(--ink); border-radius: 999px; background: #fff; color: var(--ink); text-decoration: none; cursor: pointer; }
.share a:hover, .share button:hover { border-color: var(--accent); color: var(--accent); }
