/* テキスト読み上げサイト 共通スタイル */
:root {
  --ink: #1b1d22;
  --ink-soft: #5a5f6a;
  --line: #e2e1db;
  --paper: #faf9f5;
  --panel: #ffffff;
  --accent: #2f6f6a;
  --mark: #fbe9b0;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 860px; margin: 0 auto; padding: 32px 20px 80px; }
header {
  display: flex; align-items: baseline; justify-content: space-between;
  flex-wrap: wrap; gap: 8px;
  border-bottom: 1px solid var(--line); padding-bottom: 16px; margin-bottom: 24px;
}
h1 { font-size: 19px; font-weight: 600; letter-spacing: 0.02em; }
.brand { font-size: 19px; font-weight: 600; letter-spacing: 0.02em; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--accent); }
.sub { font-size: 12px; color: var(--ink-soft); letter-spacing: 0.04em; }

/* エディタ */
.editor { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.layer { font-size: 17px; line-height: 1.9; padding: 20px; white-space: pre-wrap; word-break: break-word; }
#highlight { position: absolute; inset: 0; color: transparent; pointer-events: none; overflow-y: auto; }
#highlight mark { background: var(--mark); color: transparent; border-radius: 3px; }
#input {
  position: relative; width: 100%; min-height: 240px;
  border: none; outline: none; resize: vertical; background: transparent;
  color: var(--ink); font-family: inherit;
}
#input::placeholder { color: #b3b1a8; }

.meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-soft); margin: 8px 2px 24px; }

.controls { display: grid; gap: 20px; }
.row { display: grid; grid-template-columns: 96px 1fr; align-items: center; gap: 14px; }
label.k { font-size: 13px; color: var(--ink-soft); letter-spacing: 0.04em; }
select {
  width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel); color: var(--ink); font-family: inherit; font-size: 14px;
}
.slider-row { display: flex; align-items: center; gap: 12px; }
input[type=range] { flex: 1; accent-color: var(--accent); }
.val { width: 46px; text-align: right; font-variant-numeric: tabular-nums; font-size: 13px; color: var(--ink-soft); }

.actions { display: flex; gap: 10px; margin-top: 28px; flex-wrap: wrap; }
button {
  font-family: inherit; font-size: 14px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--panel); color: var(--ink); padding: 11px 20px; cursor: pointer;
  transition: background .15s, border-color .15s, opacity .15s;
}
button:hover { background: #f1f0ea; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.primary:hover { background: #275b57; }
button:disabled { opacity: .4; cursor: not-allowed; }
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.note { margin-top: 28px; font-size: 12px; color: var(--ink-soft); border-top: 1px solid var(--line); padding-top: 16px; line-height: 1.8; }
.warn {
  display: none; margin-top: 16px; padding: 12px 14px; background: #fdeeea;
  border: 1px solid #f3c4b8; border-radius: 8px; font-size: 13px; color: #8a3320;
}

/* フッター（全ページ共通） */
.site-footer { margin-top: 44px; border-top: 1px solid var(--line); padding-top: 20px; font-size: 13px; color: var(--ink-soft); }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 10px; }
.site-footer a { color: var(--ink-soft); text-decoration: none; }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }
.site-footer .copyright { font-size: 12px; color: #9a9890; }

/* 文章ページ（about / privacy） */
.page { font-size: 15px; line-height: 1.9; }
.page h1 { font-size: 22px; margin-bottom: 8px; }
.page .lead { color: var(--ink-soft); margin-bottom: 28px; }
.page h2 { font-size: 17px; margin: 34px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.page h3 { font-size: 15px; margin: 22px 0 6px; }
.page p { margin: 10px 0; }
.page ul, .page ol { margin: 10px 0 10px 22px; }
.page li { margin: 5px 0; }
.page a { color: var(--accent); }
.page .faq dt { font-weight: 600; margin-top: 20px; }
.page .faq dd { margin: 6px 0 0; }

/* トップページ：特徴セクション */
.feature-section { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--line); }
.feature-section h2 { font-size: 15px; font-weight: 600; color: var(--ink-soft); margin-bottom: 14px; letter-spacing: 0.04em; }
.feature-list { list-style: none; display: grid; gap: 10px; }
.feature-list li { font-size: 14px; line-height: 1.7; display: flex; gap: 10px; }
.feat-label { font-weight: 600; color: var(--accent); white-space: nowrap; }

/* ガイド記事：パンくず */
.page-breadcrumb { font-size: 12px; color: var(--ink-soft); margin-bottom: 20px; }
.page-breadcrumb a { color: var(--ink-soft); text-decoration: none; }
.page-breadcrumb a:hover { color: var(--accent); text-decoration: underline; }

/* ガイド記事：CTAブロック */
.cta-block { margin: 40px 0 16px; text-align: center; }
.cta-btn {
  display: inline-block; padding: 14px 36px;
  background: var(--accent); color: #fff; border-radius: 8px;
  font-size: 16px; font-weight: 600; text-decoration: none;
  transition: background .15s;
}
.cta-btn:hover { background: #275b57; }

@media (max-width: 560px) { .row { grid-template-columns: 72px 1fr; } }
