/* CARMO 総合操作マニュアル（/products/yoyaku/manual/）。構成は /products/yoyaku/ と同じナビ・配色。 */
:root {
  --navy: #141833;
  --ink: #26304f;
  --muted: #5d6583;
  --blue: #3d68e6;
  --brand1: #4a7bf7;
  --brand2: #7b5cf0;
  --line: #dfe3f2;
  --paper: #f6f7fc;
  --soft: #eef1fe;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font: 16px/1.85 -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", "Hiragino Sans", sans-serif;
}
a { color: var(--blue); text-underline-offset: 4px; }
a:focus-visible, summary:focus-visible { outline: 3px solid #e07a19; outline-offset: 4px; border-radius: 3px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--navy); line-height: 1.5; }
h1 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: 0.02em; margin-bottom: 18px; }
h2 { font-size: 1.55rem; margin-bottom: 20px; }
h3 { font-size: 1.08rem; margin: 26px 0 8px; }
p { margin-bottom: 16px; }
ul, ol { padding-left: 1.5em; }
.wrap { max-width: 1160px; margin: auto; padding: 0 28px; }
.skip { position: absolute; top: -80px; left: 20px; background: #fff; padding: 10px; z-index: 30; }
.skip:focus { top: 12px; }

/* ---- ブランド・ナビ（/products/yoyaku/ と共通の見た目） ---- */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px; display: inline-grid; place-items: center;
  background: linear-gradient(135deg, var(--brand1), var(--brand2));
  box-shadow: 0 6px 16px rgba(74, 123, 247, 0.35);
}
.brand-mark svg { width: 20px; height: 20px; fill: #fff; }
.brand-name { font-weight: 900; letter-spacing: 0.16em; font-size: 20px; color: var(--navy); }
#site-nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, 0.95); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px);
}
#site-nav .wrap { width: min(1180px, 92%); max-width: none; margin: auto; padding: 0; }
.navin { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.links { display: flex; align-items: center; gap: 24px; }
.links a { text-decoration: none; color: var(--ink); font-size: 14px; font-weight: 700; white-space: nowrap; }
.links a.current { color: var(--blue); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 7px; }
.button {
  display: inline-flex; justify-content: center; align-items: center; border: 0; border-radius: 8px;
  padding: 14px 23px; background: linear-gradient(135deg, var(--brand1), var(--brand2));
  color: #fff !important; text-decoration: none !important; font-weight: 800; cursor: pointer;
}
.button.small { padding: 9px 17px; }

/* ---- ヒーロー ---- */
.hero {
  padding: 60px 0 48px; border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 90% 20%, rgba(123, 92, 240, 0.1), transparent 40%),
    linear-gradient(115deg, #eef2ff, #fbfbff);
}
.eyebrow { font-size: 0.76rem; font-weight: 800; letter-spacing: 0.14em; color: var(--blue); margin-bottom: 12px; }
.lead { font-size: 1.05rem; max-width: 760px; color: var(--muted); margin-bottom: 0; }

/* ---- レイアウト（左目次＋本文） ---- */
.layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 34px; padding-block: 40px 70px; }
.layout.wrap { max-width: 1500px; }
.toc { align-self: start; position: sticky; top: 92px; font-size: 0.86rem; }
.toc-title { font-weight: 700; color: var(--navy); margin-bottom: 10px; }
.toc ol { list-style: none; padding: 0; margin: 0; }
.toc a { display: block; padding: 7px 12px; border-left: 2px solid var(--line); color: var(--muted); text-decoration: none; }
.toc a:hover { background: var(--soft); color: var(--blue); border-color: var(--blue); }
.toc .other { margin-top: 20px; border: 0; padding: 0; color: var(--blue); }
.article { min-width: 0; }
.chapter {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 30px; margin-bottom: 24px; scroll-margin-top: 90px;
}
.chapter h2 { display: flex; align-items: center; gap: 15px; }
.chapter h2 > span {
  display: inline-grid; place-items: center; min-width: 43px; height: 32px; border-radius: 5px;
  background: linear-gradient(135deg, var(--brand1), var(--brand2)); color: #fff; font-size: 0.8rem; flex: 0 0 auto;
}
.chapter li + li { margin-top: 7px; }

/* ---- 手順 ---- */
.steps { list-style: none; padding: 0; counter-reset: step; }
.steps > li { position: relative; padding: 0 0 16px 46px; counter-increment: step; }
.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 0; display: grid; place-items: center;
  width: 28px; height: 28px; border-radius: 50%; background: var(--soft); color: var(--blue); font-size: 0.78rem; font-weight: 800;
}
.steps p { color: var(--muted); margin: 3px 0 0; }

/* ---- 画像 ---- */
.manual-shot { margin: 22px 0; }
.manual-shot img {
  display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 7px;
  box-shadow: 0 8px 24px rgba(20, 24, 70, 0.08); cursor: zoom-in; transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.manual-shot img:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(20, 24, 70, 0.16); }
.manual-shot img:focus-visible { outline: 4px solid #e07a19; outline-offset: 4px; }
figcaption { margin-top: 9px; color: var(--muted); font-size: 0.84rem; }
.phone-shots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin: 22px 0; }
.phone-shots .manual-shot { margin: 0; }
.phone-shots img { border-radius: 16px; border: 5px solid #141833; background: #141833; }
.two-shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.two-shots .manual-shot { margin: 12px 0; }

/* ---- 注記・表・カード ---- */
.note { border-left: 4px solid var(--blue); background: var(--soft); padding: 16px 19px; margin-top: 18px; }
.note p { margin: 4px 0 0; color: var(--muted); }
.note ul, .note ol { margin: 8px 0 0; color: var(--muted); }
.note.warning { border-color: #d58b22; background: #fff8e9; }
.fine { font-size: 0.84rem; color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 22px 0; }
.cards > div { border: 1px solid var(--line); border-radius: 7px; padding: 18px; }
.cards h3 { margin-top: 0; }
.cards p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.table-wrap { max-width: 100%; overflow-x: auto; margin: 20px 0; }
table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 0.92rem; }
th, td { padding: 11px 14px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: var(--soft); color: var(--navy); white-space: nowrap; }
kbd {
  font-family: inherit; font-size: 0.85em; background: #fff; border: 1px solid #c9cfe6;
  border-bottom-width: 2px; border-radius: 4px; padding: 1px 6px;
}
details { border-top: 1px solid var(--line); padding: 15px 0; }
details:last-child { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; color: var(--navy); font-weight: 700; }
details p { margin: 10px 0 0; color: var(--muted); }

/* ---- フッター ---- */
.footer { background: #090b1a; color: #d5d9ee; padding: 28px 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.footer p { margin: 0; font-weight: 700; }
.footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
.footer a { color: #fff; font-size: 0.84rem; }

/* ---- 利用規約ダイアログ（/terms を iframe で表示） ---- */
.terms-dialog {
  width: min(1100px, 96vw); max-width: none; height: 92vh; max-height: none;
  padding: 0; border: 0; border-radius: 12px; overflow: hidden;
}
.terms-dialog::backdrop { background: rgba(6, 8, 20, 0.78); }
.terms-dialog-header {
  height: 58px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px 0 24px; border-bottom: 1px solid #dfe3f2; color: #0d1030;
}
.terms-dialog-header button { width: 40px; height: 40px; border: 0; background: transparent; color: #0d1030; font-size: 28px; cursor: pointer; }
.terms-dialog iframe { display: block; width: 100%; height: calc(92vh - 58px); border: 0; background: #fff; }

/* ---- 画像拡大 ---- */
.image-lightbox {
  width: min(96vw, 1800px); max-width: none; height: 96vh; max-height: none; margin: auto;
  padding: 56px 18px 18px; border: 0; border-radius: 12px; background: #11142a; color: #fff; overflow: hidden;
}
.image-lightbox::backdrop { background: rgba(6, 8, 20, 0.86); backdrop-filter: blur(3px); }
.image-lightbox img { display: block; width: 100%; height: calc(96vh - 116px); object-fit: contain; }
.image-lightbox p {
  margin: 10px 50px 0; text-align: center; font-size: 0.9rem; color: #e4e8ff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.image-lightbox-close {
  position: absolute; top: 10px; right: 14px; width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: #fff; color: var(--navy); font-size: 26px; line-height: 1; cursor: pointer;
}

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .toc { position: static; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 18px; }
  .toc ol { display: grid; grid-template-columns: 1fr 1fr; }
  .toc a { border-left: 0; border-bottom: 1px solid var(--line); }
  .cards { grid-template-columns: 1fr; }
  .phone-shots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .image-lightbox { width: 98vw; height: 94vh; padding: 52px 8px 10px; }
  .image-lightbox img { height: calc(94vh - 108px); }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  .wrap { padding-inline: 18px; }
  .links { gap: 14px; }
  .links > a:not(.button):not(.global-link) { display: none; }
  .hero { padding: 40px 0 34px; }
  .layout { padding-block: 24px 50px; gap: 24px; }
  .toc ol, .two-shots { grid-template-columns: 1fr; }
  .chapter { padding: 22px 18px; }
  .chapter h2 { align-items: flex-start; font-size: 1.3rem; }
  .footer-inner { display: block; }
  .footer nav { margin-top: 12px; }
}
@media (max-width: 430px) {
  /* 狭い画面ではナビを「ロゴ＋もう一方のページへのリンク＋相談ボタン」に絞る */
  .links { gap: 10px; }
  .links .global-link.current { display: none; }
  .links a { font-size: 13px; }
  .links .button.small { padding: 8px 11px; }
  .brand { gap: 8px; }
  .brand-name { font-size: 17px; letter-spacing: 0.1em; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
