/* ============================================================
   平屋図鑑 記事ページ共通スタイル
   ============================================================ */
:root {
  --bg: #F2EFE9;
  --navy: #1E2A4A;
  --navy-hover: #2E3D66;
  --navy-deep: #141C33;
  --text-sub: #2E3A57;
  --text-gray: #4A5468;
  --line: #C9C3B4;
  --line-dark: #A9A290;
  --muted: #8A8674;
  --green: #3D4A33;
  --olive: #5C6648;
  --card: #FBFAF7;
}
html, body { margin: 0; padding: 0; background: var(--bg); }
html { scroll-behavior: smooth; }
body { font-family: 'Shippori Mincho', serif; -webkit-font-smoothing: antialiased; color: var(--navy); }
* { box-sizing: border-box; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }
::selection { background: #5C6648; color: #F6F4EE; }
.footer ::selection, .menu-sp ::selection { background: rgba(242,239,233,0.95); color: #1E2A4A; }
::-webkit-scrollbar { height: 6px; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
a, button { transition: color .35s ease, background-color .35s ease, border-color .35s ease, opacity .35s ease, box-shadow .35s ease, transform .35s ease; }

/* 読了プログレスバー */
.progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: linear-gradient(90deg, var(--olive), var(--green)); z-index: 200; }

/* ふわっと出現 */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 1s cubic-bezier(.22,1,.36,1), transform .75s cubic-bezier(.22,1,.36,1); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ================= ヘッダー(共通) ================= */
.header-pc {
  display: flex; align-items: center; gap: 28px;
  padding: 18px 40px; position: sticky; top: 0; z-index: 50;
  background: rgba(242,239,233,0.94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.header-pc .logo-link { flex-shrink: 0; display: flex; }
.header-pc .logo-link img { height: 52px; display: block; }
.logo-link:hover { opacity: 0.75; }
.nav-pc { display: flex; gap: 34px; margin: 0 auto; align-items: center; }
.nav-pc a { color: var(--navy); font-size: 15px; font-weight: 600; letter-spacing: 0.1em; white-space: nowrap; padding: 6px 0; position: relative; }
.nav-pc a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--navy); transform: scaleX(0); transform-origin: right center;
  transition: transform .45s cubic-bezier(.22,1,.36,1);
}
.nav-pc a:hover::after { transform: scaleX(1); transform-origin: left center; }
.btn-cta {
  display: flex; align-items: center; background: var(--navy); color: var(--bg);
  font-size: 15px; font-weight: 600; letter-spacing: 0.08em;
  padding: 16px 24px; border-radius: 4px; white-space: nowrap; flex-shrink: 0;
}
.btn-cta:hover { background: var(--navy-hover); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(30,42,74,0.22); }
.header-sp {
  display: none; align-items: center; justify-content: space-between;
  padding: 20px 20px 12px; position: sticky; top: 0; z-index: 50;
  background: rgba(242,239,233,0.94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.header-sp .logo-link img { height: 46px; display: block; }
.btn-menu { width: 48px; height: 48px; border: none; background: transparent; color: var(--navy); font-size: 26px; cursor: pointer; }
@media (max-width: 1180px) {
  .header-pc { display: none; }
  .header-sp { display: flex; }
}
.menu-sp {
  position: fixed; inset: 0; z-index: 100; background: var(--navy); color: var(--bg);
  display: flex; flex-direction: column; padding: 24px;
  visibility: hidden; opacity: 0; transition: opacity .5s ease, visibility 0s linear .5s;
}
.menu-sp.is-open { visibility: visible; opacity: 1; transition: opacity .5s ease; }
.menu-sp .m-head { display: flex; justify-content: space-between; align-items: center; }
.menu-sp .m-label { font-size: 14px; letter-spacing: 0.3em; color: #9AA3BC; }
.btn-close { width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(242,239,233,0.4); background: transparent; color: var(--bg); font-size: 18px; cursor: pointer; }
.menu-sp nav { display: flex; flex-direction: column; gap: 4px; margin-top: 44px; }
.menu-sp nav a {
  color: var(--bg); font-size: 20px; letter-spacing: 0.14em; padding: 16px 4px;
  border-bottom: 1px solid rgba(242,239,233,0.15);
  display: flex; justify-content: space-between; align-items: center;
  opacity: 0; transform: translateY(16px);
  transition: opacity .55s cubic-bezier(.22,1,.36,1), transform .55s cubic-bezier(.22,1,.36,1);
}
.menu-sp.is-open nav a { opacity: 1; transform: none; }
.menu-sp.is-open nav a:nth-child(1) { transition-delay: .06s; }
.menu-sp.is-open nav a:nth-child(2) { transition-delay: .12s; }
.menu-sp.is-open nav a:nth-child(3) { transition-delay: .18s; }
.menu-sp.is-open nav a:nth-child(4) { transition-delay: .24s; }
.menu-sp.is-open nav a:nth-child(5) { transition-delay: .3s; }
.menu-sp.is-open nav a:nth-child(6) { transition-delay: .36s; }
.menu-sp nav a i { font-size: 15px; color: #8E97B0; }
.menu-sp .m-cta {
  margin-top: auto; display: flex; align-items: center; justify-content: center; gap: 12px;
  background: var(--bg); color: var(--navy); padding: 18px;
  font-size: 15px; font-weight: 600; letter-spacing: 0.14em; border-radius: 4px;
  opacity: 0; transform: translateY(16px);
  transition: opacity .55s cubic-bezier(.22,1,.36,1) .3s, transform .55s cubic-bezier(.22,1,.36,1) .3s;
}
.menu-sp.is-open .m-cta { opacity: 1; transform: none; }

/* ================= 記事レイアウト ================= */
.breadcrumb {
  max-width: 1160px; margin: 0 auto; padding: 20px clamp(20px, 4vw, 40px) 0;
  font-size: 12px; letter-spacing: 0.08em; color: var(--muted);
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.breadcrumb a { color: var(--text-gray); }
.breadcrumb a:hover { color: var(--navy); }
.breadcrumb i { font-size: 9px; }

.art-hero { max-width: 1160px; margin: 0 auto; padding: 28px clamp(20px, 4vw, 40px) 0; }
.art-cat {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--green); color: var(--bg); font-size: 12px; letter-spacing: 0.2em;
  padding: 7px 16px; border-radius: 3px;
}
.art-hero h1 {
  margin: 22px 0 0; font-size: clamp(24px, 3.4vw, 38px); font-weight: 600;
  letter-spacing: 0.1em; line-height: 1.75;
}
.art-meta { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 18px; font-size: 14px; letter-spacing: 0.08em; color: var(--muted); }
.art-meta i { margin-right: 6px; }
.art-eyecatch { margin-top: 28px; border-radius: 10px; overflow: hidden; aspect-ratio: 21/9; position: relative; }
.art-eyecatch img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: hero-in 1.9s cubic-bezier(.22,1,.36,1) both; }
@keyframes hero-in { from { opacity: 0; transform: scale(1.045); } to { opacity: 1; transform: scale(1); } }

.art-layout {
  max-width: 1160px; margin: 0 auto; padding: 40px clamp(20px, 4vw, 40px) 80px;
  display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 56px; align-items: start;
}
@media (max-width: 1100px) { .art-layout { grid-template-columns: minmax(0, 1fr); } .art-side { display: none; } }
.art-body { min-width: 0; }

/* 本文 */
.art-body { font-size: 16px; line-height: 2.15; letter-spacing: 0.06em; color: var(--text-sub); }
.art-body > p { margin: 0 0 1.8em; }
.art-lead { font-size: 16.5px; }

.art-body h2 {
  position: relative; margin: 88px 0 36px; padding-bottom: 18px;
  color: var(--navy); font-size: clamp(21px, 2.4vw, 27px); font-weight: 600;
  letter-spacing: 0.1em; line-height: 1.7;
}
.art-body h2::before { content: ''; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px; background: var(--line); }
.art-body h2::after {
  content: ''; position: absolute; left: 0; bottom: 0; width: 64px; height: 2px; background: var(--olive);
  transform: scaleX(0); transform-origin: left center; transition: transform 1.1s cubic-bezier(.22,1,.36,1) .25s;
}
.art-body h2.is-visible::after { transform: scaleX(1); }
.art-body h3 {
  position: relative; margin: 56px 0 24px; padding-left: 20px;
  color: var(--navy); font-size: clamp(17.5px, 1.8vw, 20px); font-weight: 600; letter-spacing: 0.08em; line-height: 1.7;
}
.art-body h3::before { content: ''; position: absolute; left: 0; top: 0.42em; width: 8px; height: 8px; background: var(--olive); border-radius: 1px; transform: rotate(45deg); }

/* 蛍光アンダーライン(左→右に走るアニメーション) */
.hl {
  font-weight: 600; color: var(--navy); font-style: normal;
  background-image: linear-gradient(transparent 64%, rgba(122,134,92,0.38) 64%, rgba(122,134,92,0.38) 92%, transparent 92%);
  background-repeat: no-repeat; background-size: 0% 100%; background-position: left center;
  transition: background-size 1.1s cubic-bezier(.22,1,.36,1) .15s;
}
.hl.is-visible { background-size: 100% 100%; }

/* 図版 */
.art-fig { margin: 40px 0; }
.art-fig .fig-frame { border-radius: 8px; overflow: hidden; aspect-ratio: 16/9; position: relative; }
.art-fig img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.22,1,.36,1); }
.art-fig:hover img { transform: scale(1.04); }
.art-fig figcaption { margin-top: 12px; font-size: 13.5px; letter-spacing: 0.08em; color: var(--muted); text-align: center; }

/* 目次 */
.toc {
  background: var(--card); border: 1px solid var(--line); border-radius: 8px;
  padding: 28px 28px 24px; margin: 44px 0 0;
}
.toc-title { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; letter-spacing: 0.2em; color: var(--navy); }
.toc-title i { color: var(--olive); }
.toc ol { margin: 18px 0 0; padding: 0 0 0 4px; list-style: none; counter-reset: toc; }
.toc ol li { counter-increment: toc; border-bottom: 1px dashed var(--line); }
.toc ol li:last-child { border-bottom: none; }
.toc ol a {
  display: flex; gap: 14px; align-items: baseline; padding: 11px 4px;
  font-size: 15px; letter-spacing: 0.06em; color: var(--text-sub); line-height: 1.7;
}
.toc ol a::before { content: counter(toc, decimal-leading-zero); font-size: 12px; letter-spacing: 0.1em; color: var(--olive); flex-shrink: 0; }
.toc ol a:hover { color: var(--navy); transform: translateX(4px); }
.art-side .toc { margin: 0; position: sticky; top: 104px; max-height: calc(100vh - 130px); overflow-y: auto; }
.art-side .toc a.is-current { color: var(--navy); font-weight: 600; }
.art-side .toc a.is-current::before { color: var(--green); font-weight: 700; }
@media (min-width: 1101px) { .toc-inline { display: none; } }

/* ポイントボックス */
.box {
  border-radius: 8px; padding: 26px 28px 22px; margin: 36px 0; position: relative;
  font-size: 15px; line-height: 2;
}
.box-point { background: #EEF0E6; border: 1px solid #C8CDB4; }
.box-point .box-label { color: var(--green); }
.box-memo { background: #FFFFFF; border: 1px solid var(--line); }
.box-memo .box-label { color: var(--navy); }
.box .box-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 600; letter-spacing: 0.24em; margin-bottom: 12px;
}
.box p { margin: 0 0 0.8em; }
.box p:last-child { margin-bottom: 0; }
.box ul { margin: 0; padding-left: 1.4em; }
.box li { margin-bottom: 0.4em; }

/* チェックリスト(行頭マーカーはアイコンのみ) */
.box ul.checklist { list-style: none; padding-left: 0; }
.box ul.checklist li { position: relative; padding-left: 32px; margin-bottom: 0.7em; }
.box ul.checklist li::before {
  content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900;
  position: absolute; left: 2px; top: 0.32em; font-size: 15px; color: var(--olive);
}
.box ul.checklist.x li::before { content: '\f00d'; color: #B0543F; }

/* テーブル */
.table-scroll { overflow-x: auto; margin: 36px 0; position: relative; }
table.art-table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 15px; line-height: 1.9; background: #FFFFFF; }
.art-table th, .art-table td { border: 1px solid var(--line); padding: 13px 16px; text-align: left; vertical-align: top; }
.art-table thead th { background: var(--navy); color: var(--bg); font-weight: 600; letter-spacing: 0.1em; white-space: nowrap; }
.art-table tbody th { background: var(--card); font-weight: 600; white-space: nowrap; }
.art-table tbody tr:nth-child(even) td { background: #FCFBF8; }

/* 横スクロールヒント(スワイプサイン) */
.scroll-hint {
  position: absolute; inset: 0; z-index: 5;
  display: flex; align-items: center; justify-content: center;
  background: rgba(30,42,74,0.16); border-radius: 4px;
  transition: opacity .5s ease; pointer-events: none;
}
.scroll-hint.is-hidden { opacity: 0; }
.scroll-hint-body {
  background: rgba(20,28,51,0.85); color: #F2EFE9; border-radius: 10px;
  padding: 16px 24px 14px; display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: 12px; letter-spacing: 0.18em; white-space: nowrap;
  box-shadow: 0 8px 24px rgba(20,28,51,0.35);
}
.scroll-hint-body i { font-size: 24px; animation: hint-swipe 1.5s ease-in-out infinite; }
@keyframes hint-swipe {
  0%, 100% { transform: translateX(14px) rotate(8deg); }
  50% { transform: translateX(-14px) rotate(-8deg); }
}

/* アイデア実例カード */
.idea { margin: 44px 0; background: #FFFFFF; border-radius: 10px; overflow: hidden; box-shadow: 0 4px 20px rgba(30,42,74,0.06); }
.idea .idea-img { position: relative; aspect-ratio: 16/8.2; overflow: hidden; }
.idea .idea-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.22,1,.36,1); }
.idea:hover .idea-img img { transform: scale(1.04); }
.idea .idea-no {
  position: absolute; top: 0; left: 0; background: rgba(20,28,51,0.85); color: var(--bg);
  font-size: 12px; letter-spacing: 0.22em; padding: 8px 16px;
}
.idea .idea-body { padding: 26px 30px 28px; }
.idea h3 { margin: 0 0 14px !important; padding-left: 20px; }
.idea p { margin: 0; font-size: 15px; line-height: 2.05; }

/* FAQ */
.faq { background: #FFFFFF; border: 1px solid var(--line); border-radius: 8px; margin: 0 0 16px; overflow: hidden; }
.faq summary {
  display: flex; align-items: baseline; gap: 14px; padding: 20px 24px;
  cursor: pointer; list-style: none; font-weight: 600; font-size: 15.5px; letter-spacing: 0.06em; color: var(--navy); line-height: 1.8;
  transition: background-color .3s ease;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: 'Q'; color: var(--olive); font-size: 18px; font-weight: 700; flex-shrink: 0; }
.faq summary::after {
  content: '\f078'; font-family: 'Font Awesome 6 Free'; font-weight: 900; font-size: 11px;
  margin-left: auto; color: var(--muted); transition: transform .4s cubic-bezier(.22,1,.36,1); align-self: center;
}
.faq[open] summary::after { transform: rotate(180deg); }
.faq summary:hover { background: var(--card); }
.faq .faq-a { display: flex; gap: 14px; padding: 4px 24px 22px; font-size: 15px; line-height: 2.05; }
.faq .faq-a::before { content: 'A'; color: #B0543F; font-size: 18px; font-weight: 700; font-family: 'Shippori Mincho', serif; flex-shrink: 0; }
.faq[open] .faq-a { animation: faq-in .5s cubic-bezier(.22,1,.36,1) both; }
@keyframes faq-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.faq .faq-a p { margin: 0; }

/* 著者・出典 */
.author-box {
  display: flex; gap: 22px; align-items: flex-start; margin: 72px 0 0;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 28px;
}
.author-box .a-icon {
  flex-shrink: 0; width: 64px; height: 64px; border-radius: 50%;
  background: var(--navy); display: flex; align-items: center; justify-content: center;
}
.author-box .a-icon img { width: 38px; filter: brightness(0) invert(1); opacity: 0.95; }
.author-box .a-name { font-size: 15px; font-weight: 600; letter-spacing: 0.1em; color: var(--navy); }
.author-box .a-name span { font-size: 12px; color: var(--muted); margin-left: 10px; letter-spacing: 0.08em; }
.author-box p { margin: 10px 0 0; font-size: 15px; line-height: 1.95; color: var(--text-gray); }
.sources { margin: 40px 0 0; padding: 24px 28px; background: #FFFFFF; border-left: 3px solid var(--olive); border-radius: 0 8px 8px 0; }
.sources .s-title { font-size: 14px; font-weight: 600; letter-spacing: 0.22em; color: var(--navy); margin-bottom: 10px; }
.sources ul { margin: 0; padding-left: 1.3em; font-size: 14px; line-height: 2.1; color: var(--text-gray); }
.sources a { color: var(--text-sub); border-bottom: 1px solid var(--line-dark); }
.sources a:hover { color: var(--navy); border-color: var(--navy); }

/* 関連記事 */
.related { margin: 72px 0 0; }
.related h2 { margin-bottom: 28px !important; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 760px) { .related-grid { grid-template-columns: 1fr; } }
.related-card {
  background: #FFFFFF; border-radius: 8px; overflow: hidden; color: var(--navy);
  transition: transform .7s cubic-bezier(.22,1,.36,1), box-shadow .7s cubic-bezier(.22,1,.36,1);
}
.related-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(30,42,74,0.14); }
.related-card .r-img { display: block; position: relative; aspect-ratio: 16/9; overflow: hidden; }
.related-card .r-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1s cubic-bezier(.22,1,.36,1); }
.related-card:hover .r-img img { transform: scale(1.05); }
.related-card .r-body { padding: 18px 20px 20px; }
.related-card .r-title { display: block; font-size: 15px; font-weight: 600; letter-spacing: 0.06em; line-height: 1.8; }
.related-card .r-date { display: block; margin-top: 10px; font-size: 12px; letter-spacing: 0.1em; color: var(--muted); }

/* 記事内CTA */
.art-cta {
  margin: 64px 0 0; background: var(--navy); border-radius: 10px; padding: 40px clamp(24px, 4vw, 48px);
  color: var(--bg); text-align: center; position: relative; overflow: hidden;
}
.art-cta::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at top right, rgba(92,102,72,0.5), transparent 60%);
}
.art-cta > * { position: relative; }
.art-cta .c-title { font-size: clamp(18px, 2vw, 22px); font-weight: 600; letter-spacing: 0.14em; line-height: 1.9; margin: 0; }
.art-cta p { margin: 14px 0 0; font-size: 15px; letter-spacing: 0.08em; line-height: 2; color: #C6CBDA; }
.art-cta .c-btn {
  display: inline-flex; align-items: center; gap: 12px; margin-top: 26px;
  background: var(--bg); color: var(--navy); font-size: 15px; font-weight: 600; letter-spacing: 0.1em;
  padding: 18px 40px; border-radius: 4px;
}
.art-cta .c-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0,0,0,0.3); }

/* ================= フッター ================= */
.footer { background: var(--navy); color: var(--bg); padding: clamp(48px, 6vw, 80px) clamp(24px, 5vw, 64px) 36px; }
.footer-inner { max-width: 1440px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 44px; justify-content: space-between; align-items: flex-start; }
.footer .f-logo img { height: 52px; display: block; filter: brightness(0) invert(1); opacity: 0.95; }
.footer .f-desc { margin: 20px 0 0; font-size: 14px; line-height: 2.1; letter-spacing: 0.1em; color: #C6CBDA; }
.footer nav { display: flex; flex-direction: column; gap: 14px; }
.footer nav a { color: var(--bg); font-size: 15px; letter-spacing: 0.1em; }
.footer nav a:hover { opacity: 0.7; }
.footer .f-actions { display: flex; flex-direction: column; gap: 16px; min-width: 240px; }
.footer .f-consult {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  border: 1px solid rgba(242,239,233,0.5); color: var(--bg);
  padding: 16px 24px; font-size: 15px; letter-spacing: 0.12em; border-radius: 4px;
}
.footer .f-consult:hover { background: rgba(242,239,233,0.1); }
.footer .f-mail {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  color: #C6CBDA; font-size: 14px; letter-spacing: 0.1em;
}
.footer .copyright {
  max-width: 1440px; margin: 56px auto 0; padding-top: 24px;
  border-top: 1px solid rgba(242,239,233,0.2);
  font-size: 11px; letter-spacing: 0.2em; color: #8E97B0; text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: .01ms !important; transition-delay: 0s !important;
    animation-duration: .01ms !important; animation-delay: 0s !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hl { background-size: 100% 100%; }
  .art-body h2::after { transform: scaleX(1); }
}
