/*
 * ☰の案内ページ5件の新UI版（WordPress テンプレート kyouma-ui/page-guide-kyouma-ui.php。2026-10-30 No.011-②）。
 * 外側は共通UI（kyouma-ui.css）の黒い地。本文は白い紙面（.kg-paper）。
 * 本文の HTML は旧版（今日うま下層・kyouma-sub.css）のクラスのまま：section・ku-wrap・wrap-mid・prose・em・doc・dot-list・doc-date・
 * section-title・profile-*・お問い合わせフォーム（mock-form・contact-form・form-*・notice-panel）。ここでは .kg-body の中だけに効かせる。
 */
.kg-wrap { width: min(840px, 100%); }
.kg-trial { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 12px; margin: 0; padding: 8px 16px; background: #3a2c08; color: #ffe2a1; font-size: 13px; line-height: 1.6; text-align: center; }
.kg-trial a { color: #fff; font-weight: 700; text-decoration: underline; }

/* 白い紙面：文字色・リンク色は個別記事（.ks-paper）と同じ。書体は共通UI */
.kg-paper { padding: 20px 16px 26px; border-radius: var(--kui-radius); background: #fff; color: #333; color-scheme: light; line-height: 1.8; }
.kg-head { margin: 0 0 6px; }
.kg-title { margin: 0; padding-left: 12px; border-left: 5px solid #2f9e66; color: #1d232b; font-size: 23px; font-weight: 800; line-height: 1.45; overflow-wrap: anywhere; }
.kg-lead { margin: 10px 0 0; color: #4f5965; font-size: 16px; font-weight: 700; line-height: 1.7; }

/* 本文 */
.kg-body { font-size: 16px; overflow-wrap: anywhere; }
.kg-body, .kg-body * { box-sizing: border-box; }
.kg-body [hidden] { display: none !important; }
.kg-body :where(h2, p, figure, ul, ol) { margin: 0; padding: 0; }
.kg-body :where(ul, ol) { list-style: none; }
.kg-body img { max-width: 100%; height: auto; }
.kg-body :where(a) { color: #1967d2; text-decoration: underline; text-underline-offset: 3px; }
.kg-body :where(a:hover) { color: #e53900; }
.kg-body [id] { scroll-margin-top: calc(var(--kui-header-h) + 12px); }
.kg-body > p:empty { display: none; }

.kg-body .section { padding: 22px 0; }
.kg-body .section + .section { border-top: 1px solid #e6e9ed; }
.kg-body .section:last-of-type { padding-bottom: 0; }
.kg-body .ku-wrap, .kg-body .wrap-mid { max-width: none; margin: 0; padding: 0; }

.kg-body .prose { font-size: 16px; line-height: 1.95; }
.kg-body .prose p + p { margin-top: 1em; }
.kg-body .em { font-weight: 700; background: linear-gradient(transparent 66%, rgba(var(--kui-accent-rgb, 63, 207, 134), .3) 66%); }

/* 見出し：.section-title（プロフィール）と長文ページの項目（.doc h2） */
.kg-body .section-title, .kg-body .doc h2 { margin: 0 0 14px; padding: 0 0 6px 10px; border-left: 4px solid #2f9e66; border-bottom: 1px solid #e3e7eb; color: #1d232b; font-size: 19px; font-weight: 800; line-height: 1.5; }
.kg-body .doc h2 { margin-top: 2.2em; }
.kg-body .doc h2:first-child { margin-top: 0; }
.kg-body .doc .prose { margin-top: .4em; }
.kg-body .doc-date { margin-top: 2.4em; color: #5d6772; font-size: 13px; text-align: right; }

/* 箇条書き（先頭に小さな四角） */
.kg-body .dot-list { margin-top: .9em; font-size: 15px; line-height: 1.85; }
.kg-body .doc .dot-list + .prose { margin-top: .9em; }
.kg-body .dot-list li { position: relative; padding-left: 1.2em; }
.kg-body .dot-list li + li { margin-top: .35em; }
.kg-body .dot-list li::before { content: ""; position: absolute; left: 2px; top: .78em; width: 6px; height: 6px; background: #2f9e66; }

/* 管理人プロフィール（画像＋名前・紹介） */
.kg-body .profile-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; justify-items: center; }
.kg-body .profile-figure { width: min(52vw, 190px); }
.kg-body .profile-figure img { display: block; width: 100%; height: auto; }
.kg-body .profile-text { width: 100%; }
.kg-body .profile-title small { display: block; color: #5d6772; font-size: 12px; font-weight: 700; letter-spacing: .2em; }

/* お問い合わせフォーム（kyouma-contact.php が差し込むフォーム。name・必須・送信の仕組みは変えない。見た目だけ） */
.kg-body .mock-form { margin-top: 24px; }
.kg-body .form-row + .form-row { margin-top: 20px; }
.kg-body .form-row label { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; color: #1d232b; font-size: 15px; font-weight: 700; }
.kg-body .form-req { padding: 0 8px; border: 1px solid #c62828; border-radius: 4px; color: #c62828; font-size: 11px; font-weight: 700; line-height: 1.7; letter-spacing: .1em; }
.kg-body .form-row input, .kg-body .form-row textarea {
  display: block; width: 100%; margin-top: 8px; padding: 10px 12px;
  border: 1px solid #c3cbd4; border-radius: 8px; background: #fbfcfd; color: #1d232b;
  font: inherit; font-size: 16px; line-height: 1.7;   /* 16px：iPhone で入力時に拡大されないように */
  -webkit-appearance: none; appearance: none;
}
.kg-body .form-row textarea { min-height: 12em; resize: vertical; }
.kg-body .form-row input:focus, .kg-body .form-row textarea:focus { outline: 2px solid #2f9e66; outline-offset: 0; border-color: #2f9e66; }
.kg-body .form-submit { margin-top: 26px; }
.kg-body .form-submit button {
  display: block; width: 100%; min-height: 52px; padding: 12px 32px; cursor: pointer;
  border: 2px solid #1d232b; border-radius: 999px; background: #1d232b; color: #fff;
  font: inherit; font-size: 16px; font-weight: 700; letter-spacing: .16em;
}
.kg-body .form-submit button:hover { border-color: #17643c; background: #17643c; }
.kg-body .form-submit button:focus-visible { outline: 3px solid #e6b957; outline-offset: 3px; }
.kg-body .form-submit button:disabled, .kg-body .form-submit button:disabled:hover { border-color: #d5dae0; background: #d5dae0; color: #5d6772; cursor: default; }
.kg-body .form-note { margin-top: 26px; padding-top: 16px; border-top: 1px solid #e3e7eb; color: #5d6772; font-size: 13px; line-height: 1.9; }
.kg-body .form-note p + p { margin-top: .8em; }
.kg-body .contact-form .form-alert { margin-bottom: 20px; padding: 12px 14px; border: 1px solid #c62828; border-left-width: 4px; border-radius: 6px; background: #fdf1f1; color: #b3211a; font-size: 14px; font-weight: 700; line-height: 1.7; }
.kg-body .contact-form .form-alert:focus { outline: none; }
.kg-body .contact-form .form-error { margin-top: 6px; color: #b3211a; font-size: 13px; font-weight: 700; line-height: 1.6; }
.kg-body .contact-form .has-error input, .kg-body .contact-form .has-error textarea { border: 2px solid #c62828; }
/* 見えない入力欄（迷惑送信の検出。旧版と同じく画面の外へ。人には見えず、Tab でも止まらない） */
.kg-body .contact-form .form-hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
/* 送信完了 */
.kg-body .notice-panel { margin-top: 24px; padding: 20px 18px; border: 1px solid #b6e3cb; border-radius: 10px; background: #f2faf6; }
.kg-body .notice-panel .status { display: inline-block; margin-bottom: 10px; padding: 2px 12px; border: 1px solid #17643c; border-radius: 999px; color: #17643c; font-size: 13px; font-weight: 700; letter-spacing: .12em; }
.kg-body .contact-thanks .prose p { font-size: 15px; line-height: 1.9; }

/* WordPress にログインしているとき：783px 以上は管理バー（32px）が画面上に固定されるので、共通ヘッダーをその下に置く（訪問者には関係しない） */
@media (min-width: 783px) {
  body.admin-bar.kui-guide-page .kui-header { top: 32px; }
  html.kui-js:has(body.admin-bar.kui-guide-page) { scroll-padding-top: calc(var(--kui-header-h) + 40px); }
  body.admin-bar.kui-guide-page .kg-body [id] { scroll-margin-top: calc(var(--kui-header-h) + 44px); }
}

@media (min-width: 760px) {
  .kg-paper { padding: 32px 40px 38px; }
  .kg-title { font-size: 27px; }
  .kg-lead { font-size: 17px; }
  .kg-body, .kg-body .prose { font-size: 17px; }
  .kg-body .dot-list { font-size: 16px; }
  .kg-body .section-title, .kg-body .doc h2 { font-size: 20px; }
  .kg-body .profile-body { grid-template-columns: 200px minmax(0, 1fr); align-items: center; gap: 32px; justify-items: stretch; }
  .kg-body .profile-figure { width: 200px; }
  .kg-body .form-submit button { display: inline-block; width: auto; min-width: 240px; }
}
