/* 期待値つむつむ — 飾りを置かず、並べ方と余白で見せる。色は黒・白・紙の色と、赤1色だけ */
:root {
  --bg: #f7f6f2; --card: #fff; --ink: #16181d; --sub: #6a6e78; --line: #e3e1d9;
  --acc: #b3261e; --acc-ink: #fff; --acc-soft: #f0eee6; --head: #16181d; --blue: #1f4fbf; --red: #c0262d; --zebra: #f4f3ee;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15161a; --card: #1c1d22; --ink: #ececea; --sub: #9a9da6; --line: #2e3037;
    --acc: #ef7d73; --acc-ink: #15161a; --acc-soft: #25262c; --head: #ececea; --blue: #86a9ff; --red: #ff7a72; --zebra: #202127;
  }
}
:root[data-theme="dark"] {
  --bg: #15161a; --card: #1c1d22; --ink: #ececea; --sub: #9a9da6; --line: #2e3037;
  --acc: #ef7d73; --acc-ink: #15161a; --acc-soft: #25262c; --head: #ececea; --blue: #86a9ff; --red: #ff7a72; --zebra: #202127;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 20px; }
body { margin: 0; background: var(--bg); color: var(--ink); line-height: 1.8; -webkit-text-size-adjust: 100%;
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", system-ui, sans-serif; }
a { color: inherit; text-decoration-color: var(--line); text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { text-decoration-color: var(--acc); color: var(--acc); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.wrap { max-width: 880px; margin: 0 auto; padding: 0 20px; }

/* ヘッダー */
.site-head { border-bottom: 1px solid var(--line); background: var(--bg); }
.site-head .wrap { display: flex; align-items: center; gap: 4px 22px; padding-top: 16px; padding-bottom: 16px; }
.brand { margin-right: auto; font-weight: 700; font-size: 19px; letter-spacing: .02em; text-decoration: none; color: var(--ink); }
.main-nav { display: flex; gap: 22px; }
.main-nav a { text-decoration: none; font-size: 14px; color: var(--sub); padding: 4px 0; border-bottom: 2px solid transparent; }
.main-nav a:hover { color: var(--ink); }
.main-nav a[aria-current] { color: var(--ink); border-bottom-color: var(--acc); }
.theme-btn { border: 0; background: transparent !important; color: var(--sub) !important; font-size: 17px; cursor: pointer; margin: 0; padding: 4px; line-height: 1; }
.theme-btn:hover { color: var(--ink) !important; }
@media (max-width: 560px) {
  .site-head .wrap { flex-wrap: wrap; }
  .main-nav { order: 3; width: 100%; gap: 20px; }
}

/* トップ */
.home { padding-top: 40px; padding-bottom: 56px; }
.search { position: relative; }
.search input { width: 100%; font-size: 18px; padding: 16px 18px; border-radius: 6px; border: 1px solid var(--ink); background: var(--card); color: var(--ink); margin: 0; }
.search input::placeholder { color: var(--sub); }
#results { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 10; margin: 0; padding: 4px; list-style: none; max-height: 360px; overflow-y: auto;
  background: var(--card); border: 1px solid var(--ink); border-radius: 6px; }
#results li a { display: flex; gap: 12px; align-items: baseline; padding: 9px 12px; border-radius: 4px; text-decoration: none; font-size: 15px; line-height: 1.5; }
#results li a:hover { background: var(--acc-soft); color: var(--ink); }
#results .none { padding: 12px; color: var(--sub); }
.k { flex: none; font-size: 12px; color: var(--sub); min-width: 4.6em; }
.doors { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: 28px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }
.doors a { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 22px 4px; text-decoration: none; }
.doors a + a { border-left: 1px solid var(--line); padding-left: 24px; }
.doors b { font-size: clamp(18px, 3.6vw, 24px); line-height: 1.4; }
.doors span { font-size: 15px; color: var(--sub); font-variant-numeric: tabular-nums; }
.doors a:hover b { color: var(--acc); }
.sec { font-size: 14px; font-weight: 700; letter-spacing: .08em; color: var(--sub); margin: 44px 0 6px; }
.newlist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.newlist li { border-bottom: 1px solid var(--line); }
.newlist a { display: flex; align-items: baseline; gap: 12px; padding: 12px 2px; text-decoration: none; }
.newlist a:hover { color: var(--acc); }
.newlist .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.newlist time { flex: none; color: var(--sub); font-size: 13px; font-variant-numeric: tabular-nums; }
.member { margin: 44px 0 0; font-size: 15px; }
.member a { font-weight: 700; }

/* 記事（ツールのページ） */
main { padding: 20px 20px 56px; }
.crumb { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--sub); margin: 0 0 14px; }
.crumb a { color: var(--sub); text-decoration: none; }
.crumb a:hover { color: var(--acc); }
article { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 32px 30px; overflow-wrap: anywhere; }
@media (max-width: 560px) { article { padding: 22px 14px; } main { padding-left: 10px; padding-right: 10px; } }
.entry-title { font-size: clamp(20px, 4.2vw, 26px); line-height: 1.5; margin: 0 0 24px; padding-bottom: 16px; border-bottom: 1px solid var(--ink); }
article h2 { font-size: 18px; margin: 36px 0 12px; padding-bottom: 6px; border-bottom: 1px solid var(--line); line-height: 1.5; }
article h3 { font-size: 16px; margin: 24px 0 8px; }
article img { max-width: 100%; height: auto; }
figure { margin: 16px 0; }
figcaption { color: var(--sub); font-size: 13px; text-align: center; margin-top: 6px; }

/* 機種の一覧 */
.listtools { position: sticky; top: 0; z-index: 5; background: var(--card); padding: 12px 0 10px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.listq { width: 100%; font-size: 16px; padding: 11px 14px; border-radius: 6px; border: 1px solid var(--ink); background: var(--card); color: var(--ink); margin: 0 0 10px; }
.jump { display: flex; flex-wrap: wrap; gap: 6px; }
.jump a { text-decoration: none; font-size: 13px; padding: 2px 11px; border: 1px solid var(--line); border-radius: 4px; color: var(--ink); }
.jump a:hover { border-color: var(--acc); color: var(--acc); }
.listcount { margin: 8px 2px 0; font-size: 13px; color: var(--sub); }
.listcount:empty { display: none; }
.listtools ~ p { margin: 0; }
.listtools ~ p > a[data-id] { display: block; padding: 8px 4px; border-bottom: 1px solid var(--line); text-decoration: none; line-height: 1.5; }
.listtools ~ p > a[data-id]:hover { color: var(--acc); }
.listtools ~ p:has(> strong) { margin: 14px 0; }

/* フッター */
.site-foot { border-top: 1px solid var(--line); font-size: 14px; padding: 22px 0 36px; }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.site-foot a { color: var(--sub); text-decoration: none; }
.site-foot a:hover { color: var(--acc); }
.btn { display: inline-block; background: var(--ink); color: var(--card) !important; text-decoration: none; font-weight: 700; padding: 12px 24px; border-radius: 6px; }

/* 表（記事の表とツールの結果） */
.wp-block-table { overflow-x: auto; margin: 16px 0; }
table { border-collapse: collapse; width: 100%; font-size: 14px; font-variant-numeric: tabular-nums; }
th, td { border: 1px solid var(--line); padding: 6px 8px; }
th { background: var(--zebra); font-weight: 600; }
table.design08 { background-image: none !important; margin-top: 8px; }
table.design08 th { background: var(--head); color: var(--card); }
table.design08 tr:nth-child(even) td { background: var(--zebra); }
td[style*="color: blue"] { color: var(--blue) !important; font-weight: 600; }
td[style*="color: red"] { color: var(--red) !important; }

/* 段組み */
.wp-block-columns { display: flex; flex-wrap: wrap; gap: 16px; }
.wp-block-column { flex: 1 1 240px; min-width: 0; }
.has-text-align-center { text-align: center; }

/* フォーム（ツールの入力欄） */
.phpblk form, .cff, .pwform { display: block; background: var(--zebra); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 12px 0; }
select, input[type="number"], input[type="tel"], input[type="text"], input[type="password"] {
  font-size: 16px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); max-width: 100%; margin: 4px 0; }
input[type="submit"], button { font-size: 16px; padding: 10px 20px; border: 0; border-radius: 6px; background: var(--ink) !important; color: var(--card) !important; cursor: pointer; margin-top: 8px; }
.phpblk form.tidy { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px 16px; align-items: end; }
.tidy label.fld { display: flex; flex-direction: column; gap: 4px; font-size: 14px; font-weight: 600; }
.tidy label.fld input, .tidy label.fld select { width: 100%; box-sizing: border-box; margin: 0; font-weight: 400; }
.tidy input[type="submit"] { grid-column: 1 / -1; justify-self: start; margin-top: 0; }
input[type="submit"]:disabled, button:disabled { opacity: .5; cursor: wait; }
.busy .phpblk::after { content: "計算中…（初めて開いたときは数秒かかります）"; display: block; color: var(--sub); font-size: 13px; margin-top: 6px; }
.err { color: var(--red); }
.pwform label { display: block; margin: 8px 0; }
.cff-field { margin: 10px 0; }
.cff-label { display: block; font-weight: 600; font-size: 14px; }
.cff-radios { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.cff output { display: inline-block; min-width: 6em; font-size: 20px; font-weight: 700; }
.cff-desc, .cff-help { color: var(--sub); font-size: 13px; }
canvas { max-width: 420px; margin: 0 auto; }
