/*
 * 写ルンにゃ サイト共通スタイル（LP・マニュアル・規約類で共有）
 *
 * 色はすべてアプリ本体（src/Style.html の :root）と同じ値を使う。
 * ここで新しい色を足さない。アプリ側を変えたらここも合わせる。
 *
 *   --blue       押せるもの（CTA・カードの左帯）
 *   --blue-dark  面で塗る濃い青（目次バー）
 *   --queue      手順番号のタグ（アプリの「未送信」と同色）
 *   --pick       補足ボックス（読み取り成功の緑）
 */
:root {
  --paper: #f4f7fa;
  --card: #ffffff;
  --panel: #eaf1f8;
  --ink: #172238;
  --sub: #47526a;
  --muted: #667085;
  --line: #d9e1e8;
  --blue: #2457d6;
  --blue-dark: #173f9e;
  --pick: #0f9d63;
  --pick-line: #a9e2c9;
  --pick-soft: #dff7ed;
  --pick-ink: #0a6244;
  --queue: #bd6b00;
  --queue-line: #f0cd8c;
  --queue-soft: #fff1d6;
  --queue-ink: #7a4600;
  --danger: #bd3147;
  --danger-line: #f3bac3;
  --danger-soft: #ffe7ea;
  --danger-ink: #8f2334;
  --shadow: 0 12px 32px -24px rgba(23, 34, 56, 0.5);
  --nav-h: 48px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--sub);
  font-family: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", sans-serif;
  font-size: 18px;
  line-height: 1.9;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 780px; margin: 0 auto; padding: 0 22px; }

a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
p a, li a, td a, th a { word-break: keep-all; overflow-wrap: break-word; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

strong { color: var(--ink); font-weight: 700; }

/* ── ヘッダー ─────────────────────────────── */
header {
  position: relative;
  padding: 44px 0 34px;
  background:
    repeating-linear-gradient(90deg, rgba(36, 87, 214, 0.045) 0 1px, transparent 1px 22px),
    linear-gradient(180deg, var(--panel), var(--paper));
  border-bottom: 1px solid var(--line);
}
header .inner { position: relative; max-width: 780px; margin: 0 auto; padding: 0 22px; }
header .kicker {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Oswald", "Zen Kaku Gothic New", sans-serif;
  font-size: 0.72em;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blue);
}
header .kicker::after { content: ""; flex: 1; height: 1px; background: var(--line); }
header h1 span { display: inline-block; }
header h1 {
  margin: 14px 0 0;
  padding-right: 136px;
  color: var(--ink);
  font-size: 2em;
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: 0.01em;
  text-wrap: balance;
}
header .lead { margin: 12px 0 0; max-width: 34em; color: var(--sub); }
header .cat-box {
  position: absolute;
  right: 22px;
  top: 0;
  width: 120px;
  height: 120px;
  border-radius: 26px;
  box-shadow: 0 2px 10px rgba(23, 34, 56, 0.12);
}

/* ── スティッキー目次 ────────────────────── */
nav.toc {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--blue-dark);
  padding: 8px 0;
}
nav.toc ul {
  list-style: none;
  margin: 0 auto;
  padding: 0 16px;
  max-width: 1000px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 6px;
  font-size: 0.82em;
}
nav.toc a {
  display: inline-block;
  padding: 4px 13px;
  border-radius: 6px;
  color: #cfdcf5;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.04em;
}
nav.toc a:hover { color: #fff; background: rgba(255, 255, 255, 0.14); }
nav.toc a.active { color: var(--blue-dark); background: #fff; }

@media (max-width: 780px) {
  nav.toc ul {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
  }
  nav.toc ul::-webkit-scrollbar { display: none; }
  nav.toc li { flex: 0 0 auto; }
  nav.toc a { white-space: nowrap; }
}

/* ── セクション ──────────────────────────── */
section[id], h2[id], h3[id] { scroll-margin-top: calc(var(--nav-h) + 16px); }
section { padding: 40px 0 36px; }
section + section { border-top: 1px solid var(--line); }
section h2 {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 20px;
  color: var(--ink);
  font-size: 1.5em;
  font-weight: 900;
  letter-spacing: 0.01em;
}
section h2 .sec-no {
  font-family: "Oswald", sans-serif;
  font-style: normal;
  font-size: 0.52em;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--queue);
}
section h3 {
  margin: 30px 0 10px;
  color: var(--ink);
  font-size: 1.1em;
  font-weight: 900;
}
section h4 { margin: 22px 0 8px; color: var(--ink); font-size: 1em; font-weight: 700; }
section p, section li { color: var(--sub); }
section h2, section h3, section p, section li { overflow-wrap: anywhere; }

ul.cute { list-style: none; padding-left: 0.1em; }
ul.cute > li { padding-left: 1.4em; position: relative; margin: 0.35em 0; }
ul.cute > li::before {
  content: "";
  position: absolute;
  left: 0.15em;
  top: 0.82em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--blue);
}
ol { padding-left: 1.4em; }
ol li::marker { color: var(--blue); font-weight: 700; }

/* ── ステップカード ──────────────────────── */
.steps { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; margin: 30px 0; }
.step {
  position: relative;
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 5px solid var(--blue);
  border-radius: 0 14px 14px 0;
  padding: 22px 22px 20px;
  box-shadow: var(--shadow);
}
.step > :first-child { margin-top: 0; }
.step > :last-child { margin-bottom: 0; }
.step-num {
  position: absolute;
  top: -12px;
  left: 16px;
  padding: 1px 10px;
  border-radius: 4px;
  background: var(--queue);
  color: #fff;
  font-family: "Oswald", sans-serif;
  font-size: 0.72em;
  font-weight: 500;
  letter-spacing: 0.12em;
}
.step h3 { margin: 4px 0 8px; color: var(--ink); font-size: 1.12em; }

/* ── スクリーンショット ────────────────── */
figure.manual-shot { margin: 22px 0 6px; text-align: center; }
figure.manual-shot img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
figure.manual-shot figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.82em;
}
figure.manual-shot.phone img { width: min(100%, 320px); }
figure.manual-shot.wide img { width: min(100%, 560px); }

/* ── 注釈 ────────────────────────────────── */
.note, .warn, .danger {
  margin: 18px 0;
  padding: 13px 18px;
  border-radius: 10px;
  font-size: 0.9em;
  line-height: 1.8;
}
.note   { background: var(--pick-soft); border: 1px solid var(--pick-line); color: var(--pick-ink); }
.warn   { background: var(--queue-soft); border: 1px solid var(--queue-line); color: var(--queue-ink); }
.danger { background: var(--danger-soft); border: 1px solid var(--danger-line); color: var(--danger-ink); }
.note p, .warn p, .danger p { color: inherit; }
.note strong, .warn strong, .danger strong { color: inherit; }
.note > :first-child, .warn > :first-child, .danger > :first-child { margin-top: 0; }
.note > :last-child, .warn > :last-child, .danger > :last-child { margin-bottom: 0; }

/* ── Q&A 折りたたみ ──────────────────────── */
details.accordion {
  margin: 12px 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
details.accordion > summary {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 12px 18px;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  border-radius: 12px;
  list-style: none;
}
details.accordion > summary::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--blue);
  border-bottom: 2px solid var(--blue);
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
}
details.accordion > summary::-webkit-details-marker { display: none; }
details.accordion > summary:hover { background: var(--panel); }
details.accordion[open] > summary {
  border-bottom: 1px solid var(--line);
  border-radius: 12px 12px 0 0;
}
details.accordion[open] > summary::before { transform: rotate(45deg); }
details.accordion .accordion-body { padding: 10px 20px 16px; }

/* ── 表 ──────────────────────────────────── */
.table-scroll { overflow-x: auto; margin: 18px 0; border-radius: 12px; }
table.compact {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.9em;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
table.compact th, table.compact td {
  border-bottom: 1px solid var(--line);
  padding: 9px 13px;
  text-align: left;
  vertical-align: top;
}
table.compact th + th, table.compact td + td { border-left: 1px solid var(--line); }
table.compact tr:last-child td { border-bottom: none; }
table.compact th { background: var(--panel); color: var(--ink); font-weight: 700; }
table.compact td { color: var(--sub); }
table.compact td strong { color: var(--blue-dark); }
table.compact td.nw, table.compact th.nw { white-space: nowrap; }

code {
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--panel);
  color: var(--ink);
  font-family: ui-monospace, Consolas, "BIZ UDGothic", monospace;
  font-size: 0.88em;
}

/* ── ボタン風リンク（値札タグの形） ──────── */
.cta {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 8px 0;
  padding: 11px 22px 11px 26px;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  clip-path: polygon(13px 0, 100% 0, 100% 100%, 13px 100%, 0 50%);
}
.cta::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  opacity: 0.85;
}
.cta:hover { background: var(--blue-dark); }

/* ── フッター ────────────────────────────── */
footer {
  border-top: 1px solid var(--line);
  padding: 26px 24px 40px;
  text-align: center;
  color: var(--muted);
  font-size: 0.82em;
}
footer strong { color: var(--ink); }

@media (max-width: 600px) {
  body { font-size: 16.5px; }
  header { padding: 34px 0 26px; }
  header .inner { padding: 0 16px; }
  header h1 { font-size: 1.6em; }
  header .cat-box { width: 68px; height: 68px; right: 16px; top: 8px; border-radius: 16px; }
  header h1 { padding-right: 76px; }
  .container { padding: 0 16px; }
  /* 横スクロールを出さない: 折り返しを許し、詰めて収める */
  table.compact { font-size: 0.84em; }
  table.compact th, table.compact td { padding: 8px 9px; }
  table.compact td.nw, table.compact th.nw { white-space: normal; }
  table.compact tr > :first-child { width: 6em; }
  section { padding: 32px 0 28px; }
  .step { padding: 20px 16px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  details.accordion > summary::before { transition: none; }
}

@media print {
  nav.toc { display: none; }
  body { background: #fff; }
  figure.manual-shot { page-break-inside: avoid; }
  figure.manual-shot img { box-shadow: none; max-height: 18cm; width: auto; }
}

/* ── LP: ヒーローのボタン列 ──────────────── */
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.btn, .btn-sub {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 22px 11px 26px;
  font-weight: 700;
  text-decoration: none;
  clip-path: polygon(13px 0, 100% 0, 100% 100%, 13px 100%, 0 50%);
}
.btn { background: var(--blue); color: #fff; }
.btn::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  opacity: 0.85;
}
.btn:hover { background: var(--blue-dark); }
.btn-sub { background: var(--panel); color: var(--blue-dark); }
.btn-sub:hover { background: #dce7f5; }

/* ── LP: 特長カード ──────────────────────── */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin: 28px 0;
}
.feature {
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 4px solid var(--blue);
  border-radius: 0 0 12px 12px;
  padding: 18px 20px 20px;
  box-shadow: var(--shadow);
}
.feature .icon { display: block; width: 34px; height: 34px; margin-bottom: 6px; }
.feature h3 { margin: 0 0 6px; color: var(--ink); font-size: 1.05em; font-weight: 900; }
.feature p { margin: 0; font-size: 0.92em; color: var(--sub); }

.shot { text-align: center; margin: 28px 0 8px; }
.shot img {
  width: min(100%, 320px);
  height: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.shot figcaption { margin-top: 10px; color: var(--muted); font-size: 0.82em; }

section.block { padding: 10px 0 12px; border-top: 0; }
section.block h2 {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 1.6em 0 0.5em;
  color: var(--ink);
  font-size: 1.25em;
  font-weight: 900;
}
section.block h2::before {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--queue);
}

/* ── 規約・ポリシーなどの文書ページ ──────── */
.container.doc { padding: 34px 22px 48px; }
.doc h1 {
  margin: 0 0 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 1.6em;
  font-weight: 900;
  letter-spacing: 0.01em;
}
.doc h2 {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 2em 0 0.5em;
  color: var(--ink);
  font-size: 1.16em;
  font-weight: 900;
}
.doc h2::before {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--blue);
}
.doc h3 { margin: 1.6em 0 0.4em; color: var(--ink); font-size: 1.02em; font-weight: 700; }
.doc p, .doc li { color: var(--sub); overflow-wrap: anywhere; }
.doc ul, .doc ol { margin: 0.8em 0; padding-left: 1.5em; }
.doc li { margin: 0.4em 0; }
.back-link { margin: 0 0 22px; font-size: 0.9em; }
.date { margin-top: 3em; color: var(--muted); font-size: 0.9em; }
.notice {
  margin: 20px 0;
  padding: 13px 18px;
  border-radius: 10px;
  background: var(--pick-soft);
  border: 1px solid var(--pick-line);
  color: var(--pick-ink);
}
.notice > :first-child { margin-top: 0; }
.notice > :last-child { margin-bottom: 0; }
.notice p, .notice strong { color: inherit; }
.card {
  margin: 22px 0;
  padding: 20px 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 5px solid var(--blue);
  border-radius: 0 12px 12px 0;
  box-shadow: var(--shadow);
}
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.card h2 { margin-top: 0; }

footer nav { margin-bottom: 8px; }
footer nav a { margin: 0 8px; color: var(--muted); }
footer nav a:hover { color: var(--blue); }

@media (max-width: 600px) {
  .container.doc { padding: 26px 16px 40px; }
  .cta-row { gap: 10px; }
}
