/* ハレノヒ 操作マニュアル 共通スタイル（To-Be/マニュアル/01_構成・デザイン規約.md §7） */
:root {
  --bg: #ffffff;
  --bg-sunken: #f7f5f3;
  --ink: #2a2623;
  --muted: #6e6763;
  --line: #e6e1dc;
  --line-strong: #cfc8c1;
  --brand: #ef897a;
  --brand-soft: #ffe7e3;
  --link: #b04a36;
  --mark: #e5322d;
  --note-bg: #eef3f8; --note-line: #5b7fa6;
  --warn-bg: #fef3c7; --warn-line: #b45309;
  --stop-bg: #fee2e2; --stop-line: #b91c1c;
  --r-staff-bg: #ffe7e3; --r-staff: #d86357;
  --r-home-bg: #e1f5e4;  --r-home: #48a260;
  --r-shien-bg: #dbf3ff; --r-shien: #008dbe;
  --r-audit-bg: #f1eaff; --r-audit: #8766bb;
  --r-admin-bg: #f6f3f0; --r-admin: #595450;
  --font: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Yu Gothic', 'Meiryo', sans-serif;
  --side-w: 240px;
  --toc-w: 220px;
  --article-w: 720px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.8;
  font-feature-settings: 'palt';
}
a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--note-line); outline-offset: 2px; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { line-height: 1.4; text-wrap: balance; margin: 0; }
h1 { font-size: 28px; font-weight: 700; }
h2 { font-size: 22px; font-weight: 700; margin-top: 48px; padding-bottom: 8px; border-bottom: 2px solid var(--line); }
h3 { font-size: 18px; font-weight: 700; margin-top: 28px; }
p { margin: 12px 0; }
ul, ol { padding-left: 1.4em; margin: 12px 0; }
li + li { margin-top: 4px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
th { background: var(--bg-sunken); font-weight: 700; white-space: nowrap; }
.table-wrap { overflow-x: auto; margin: 12px 0; }
.num { font-variant-numeric: tabular-nums; }

/* ── ヘッダー ── */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  border-top: 4px solid var(--brand);
}
.site-header .inner {
  display: flex; align-items: center; gap: 16px;
  padding: 10px 24px;
}
.site-title { font-weight: 700; font-size: 17px; text-decoration: none; color: var(--ink); white-space: nowrap; }
.site-title small { font-weight: 500; color: var(--muted); margin-left: 8px; font-size: 13px; }
.manual-guide-nav { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 13px; }
.manual-guide-nav [aria-current] { font-weight: 700; }
.search { margin-left: auto; position: relative; width: min(360px, 40vw); }
.search input {
  width: 100%; font: inherit; font-size: 15px;
  padding: 8px 12px 8px 36px;
  border: 1px solid var(--line-strong); border-radius: 6px;
  background: var(--bg-sunken);
}
.search::before {
  content: ''; position: absolute; left: 12px; top: 50%; width: 14px; height: 14px; margin-top: -8px;
  border: 2px solid var(--muted); border-radius: 50%;
}
.search::after {
  content: ''; position: absolute; left: 23px; top: 50%; width: 2px; height: 7px; margin-top: 2px;
  background: var(--muted); transform: rotate(-45deg);
}
.search-results {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: 6px;
  box-shadow: 0 8px 24px rgba(42, 38, 35, .12);
  max-height: 60vh; overflow: auto; display: none;
}
.search-results.open { display: block; }
.search-results a { display: block; padding: 8px 12px; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line); }
.search-results a:hover { background: var(--bg-sunken); }
.search-results .role { font-size: 12px; color: var(--muted); margin-left: 8px; }
.search-results .empty { padding: 10px 12px; color: var(--muted); font-size: 14px; }
.menu-toggle { display: none; font: inherit; border: 1px solid var(--line-strong); background: var(--bg); border-radius: 6px; padding: 6px 10px; }

/* ── 3列レイアウト ── */
.shell {
  display: grid;
  grid-template-columns: var(--side-w) minmax(0, 1fr) var(--toc-w);
  gap: 0 32px;
  max-width: 1360px; margin: 0 auto; padding: 0 24px;
}
.side {
  position: sticky; top: 61px; align-self: start;
  max-height: calc(100vh - 61px); overflow: auto;
  padding: 24px 0 40px; border-right: 1px solid var(--line);
  font-size: 14px;
}
.side h2 { font-size: 13px; margin: 20px 0 6px; padding: 0; border: 0; color: var(--muted); font-weight: 700; letter-spacing: .04em; }
.side h2:first-child { margin-top: 0; }
.side ul { list-style: none; padding: 0; margin: 0; }
.side li { margin: 0; }
.side a { display: block; padding: 5px 12px 5px 10px; color: var(--ink); text-decoration: none; border-left: 3px solid transparent; }
.side a:hover { background: var(--bg-sunken); }
.side a[aria-current="page"] { border-left-color: var(--brand); background: var(--brand-soft); font-weight: 700; }
.side .group { padding-left: 10px; color: var(--muted); font-size: 13px; margin-top: 10px; }

.article { max-width: var(--article-w); padding: 24px 0 80px; min-width: 0; }
.toc {
  position: sticky; top: 61px; align-self: start;
  padding: 28px 0 40px; font-size: 13px;
}
.toc h2 { font-size: 13px; margin: 0 0 8px; padding: 0; border: 0; color: var(--muted); }
.toc ol { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.toc li a { display: block; padding: 4px 10px; color: var(--ink); text-decoration: none; margin-left: -2px; border-left: 2px solid transparent; }
.toc li.h3 a { padding-left: 22px; color: var(--muted); }
.toc li a:hover, .toc li a.active { border-left-color: var(--brand); color: var(--link); }

/* ── 記事の部品 ── */
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 0; margin: 0; }
.crumbs li + li::before { content: '›'; margin: 0 6px; color: var(--line-strong); }
.crumbs a { color: var(--muted); }
.lead { font-size: 16px; margin: 12px 0 16px; }
.subject { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; font-size: 14px; color: var(--muted); padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.subject dt { display: inline; font-weight: 700; margin-right: 6px; }
.subject dd { display: inline; margin: 0; }
.subject > div { display: inline-flex; align-items: center; gap: 4px; }
.chip { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 10px; border-radius: 6px; font-size: 13px; font-weight: 700; }
.chip.r-staff { background: var(--r-staff-bg); color: var(--r-staff); }
.chip.r-home  { background: var(--r-home-bg);  color: var(--r-home); }
.chip.r-shien { background: var(--r-shien-bg); color: var(--r-shien); }
.chip.r-audit { background: var(--r-audit-bg); color: var(--r-audit); }
.chip.r-admin { background: var(--r-admin-bg); color: var(--r-admin); }
.chip.device { background: var(--bg-sunken); color: var(--ink); font-weight: 500; }

.ui { font-weight: 700; } /* ［ボタン名］ */
.summary { background: var(--bg-sunken); border-radius: 8px; padding: 14px 18px; margin: 16px 0; }
.summary ol { margin: 0; }

/* 手順の詳細 */
ol.steps { list-style: none; padding: 0; margin: 20px 0; counter-reset: step; }
ol.steps > li { position: relative; padding-left: 48px; margin: 0 0 28px; counter-increment: step; }
ol.steps > li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--ink); color: #fff;
  font-weight: 700; font-size: 16px; line-height: 32px; text-align: center;
  font-variant-numeric: tabular-nums;
}
ol.steps > li[data-step]::before { content: attr(data-step); font-size: 14px; }
ol.steps > li > p:first-child { margin-top: 2px; font-weight: 500; }
.result { color: var(--muted); border-left: 3px solid var(--line-strong); padding-left: 10px; margin: 8px 0 0; font-size: 15px; }

/* スクリーンショット */
figure.shot { margin: 12px 0 0; }
figure.shot img, figure.shot .placeholder { border: 1px solid var(--line); border-radius: 6px; background: #fff; }
figure.shot.tablet { max-width: 640px; }
figure.shot figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; }
figure.shot .placeholder {
  width: 100%; aspect-ratio: 16 / 9; display: grid; place-items: center;
  background: repeating-linear-gradient(135deg, #faf8f6 0 12px, #f3f0ed 12px 24px);
  color: var(--muted); font-size: 14px; text-align: center; position: relative;
}
figure.shot .placeholder .mark {
  position: absolute; border: 3px solid var(--mark); box-shadow: 0 0 0 2px #fff; pointer-events: none;
}
figure.shot .placeholder .badge {
  position: absolute; width: 22px; height: 22px; border-radius: 50%;
  background: var(--mark); color: #fff; font-weight: 700; font-size: 13px; line-height: 22px; text-align: center;
  box-shadow: 0 0 0 2px #fff;
}

/* 囲み */
.callout { border: 1px solid; border-left-width: 6px; border-radius: 6px; padding: 12px 16px; margin: 20px 0; }
.callout .label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.callout p { margin: 4px 0; }
.callout.note { background: var(--note-bg); border-color: var(--note-line); }
.callout.note .label { color: var(--note-line); }
.callout.warn { background: var(--warn-bg); border-color: var(--warn-line); }
.callout.warn .label { color: var(--warn-line); }
.callout.stop { background: var(--stop-bg); border-color: var(--stop-line); }
.callout.stop .label { color: var(--stop-line); }
.callout.stop q { font-weight: 700; quotes: '「' '」'; }

/* 関連・前後・更新日 */
.related ul { list-style: none; padding: 0; }
.related li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.related li span { color: var(--muted); font-size: 13px; margin-left: 8px; }
.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 40px; }
.pager a { flex: 1; border: 1px solid var(--line-strong); border-radius: 8px; padding: 12px 16px; text-decoration: none; color: var(--ink); }
.pager a:hover { background: var(--bg-sunken); }
.pager .dir { display: block; font-size: 12px; color: var(--muted); }
.pager .next { text-align: right; }
.meta { margin-top: 32px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; }

/* ── トップ・ロール別トップ ── */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 16px 0; }
.card { border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; background: var(--bg); text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 8px; }
.card:hover { border-color: var(--line-strong); background: var(--bg-sunken); }
.card .card-title { font-size: 18px; font-weight: 700; }
.card .card-desc { font-size: 14px; color: var(--muted); }
.card .card-screens { font-size: 13px; color: var(--muted); }
.flow { list-style: none; padding: 0; margin: 16px 0; counter-reset: flow; }
.flow li { position: relative; padding: 0 0 20px 48px; counter-increment: flow; }
.flow li::before {
  content: counter(flow); position: absolute; left: 0; top: 0;
  width: 32px; height: 32px; border-radius: 50%; background: var(--brand-soft); color: var(--r-staff);
  font-weight: 700; text-align: center; line-height: 32px; font-variant-numeric: tabular-nums;
}
.flow li:not(:last-child)::after { content: ''; position: absolute; left: 15px; top: 36px; bottom: 0; width: 2px; background: var(--line); }
.flow .when { display: block; font-size: 13px; color: var(--muted); }
.flow .what { font-weight: 700; }
.flow .links { font-size: 14px; }
.flow .links > * + *::before { content: '／'; color: var(--muted); text-decoration: none; display: inline-block; margin: 0 4px; }
.flow .links .planned { color: var(--muted); }

.draft-banner { background: var(--warn-bg); border-bottom: 1px solid var(--warn-line); color: var(--warn-line); font-size: 13px; text-align: center; padding: 4px 12px; }

/* ── レスポンシブ ── */
@media (max-width: 1100px) {
  .shell { grid-template-columns: var(--side-w) minmax(0, 1fr); }
  .toc { display: none; }
}
@media (max-width: 800px) {
  .shell { grid-template-columns: minmax(0, 1fr); padding: 0 16px; }
  .side { display: none; position: static; max-height: none; border-right: 0; border-bottom: 1px solid var(--line); }
  .side.open { display: block; }
  .menu-toggle { display: inline-block; }
  .search { width: 100%; }
  .site-header .inner { flex-wrap: wrap; padding: 10px 16px; }
  .pager { flex-direction: column; }
}
@media print {
  .site-header, .side, .toc, .pager, .search, .draft-banner { display: none !important; }
  .shell { display: block; padding: 0; }
  .article { max-width: none; }
  a { color: var(--ink); text-decoration: none; }
  figure.shot img { max-width: 100%; page-break-inside: avoid; }
  ol.steps > li { page-break-inside: avoid; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

/* 要確認マーク（撮影・実画面確認前の文言。確定したら外す） */
.todo { display: inline-block; background: var(--warn-bg); color: var(--warn-line); border: 1px solid var(--warn-line); border-radius: 4px; font-size: 11px; font-weight: 700; padding: 0 5px; margin-left: 4px; vertical-align: middle; line-height: 1.6; }
.side .planned, .pager .planned, .related .planned, .search-results .planned { color: var(--muted); }
.side .planned::after, .related .planned::after, .search-results .planned::after { content: '（作成予定）'; font-size: 12px; }
.pager span.planned { flex: 1; border: 1px dashed var(--line-strong); border-radius: 8px; padding: 12px 16px; }
.card.planned { color: var(--muted); background: var(--bg-sunken); }
.card.planned:hover { border-color: var(--line); }

@media print {
  h2, h3 { break-after: avoid; }
  figure.shot, .callout, .summary, tr { break-inside: avoid; }
  thead { display: table-header-group; }
  .todo { display: none; }
}
.side li > span.planned { display: block; padding: 5px 12px 5px 10px; border-left: 3px solid transparent; }

/* ホームの類型（包括型／日中サービス支援型／サテライト） */
.chip.type { background: #fff; color: var(--ink); border: 1px solid var(--line-strong); font-weight: 500; font-size: 12px; margin-left: 6px; min-height: 20px; padding: 0 8px; }
[data-home-type] { border-left: 3px solid var(--line-strong); padding-left: 14px; margin: 16px 0; }
[data-home-type] > .chip.type { display: inline-flex; margin: 0 0 6px; }

/* 困ったとき: 行アンカーへの着地（ヘッダーに隠れない・強調） */
.article tr[id] { scroll-margin-top: var(--header-offset, 140px); }
.article tr:target td { background: var(--warn-bg); }

/* ページ番号（台帳の no。h1 の先頭に表示） */
.page-no {
  display: inline-block;
  margin-right: 10px;
  padding: 2px 10px;
  border: 1.5px solid var(--line-strong);
  border-radius: 6px;
  background: var(--bg-sunken);
  color: var(--muted);
  font-size: .55em;
  font-weight: 700;
  letter-spacing: .04em;
  vertical-align: middle;
}

/* 初めて使う人の入口。全体の流れを先に、詳しい操作はリンク先で読む。 */
body[data-page="homecho"] .shell { grid-template-columns: var(--side-w) minmax(0, 1fr); }
body[data-page="homecho"] .article { max-width: 960px; }
body[data-page="homecho"] .toc { display: none; }
.overview-flow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); list-style: none; gap: 14px; padding: 0; margin: 16px 0; }
.overview-flow li { position: relative; margin: 0; padding: 12px; border: 1px solid var(--line-strong); border-top: 4px solid var(--r-home); border-radius: 6px; font-size: 13px; }
.overview-flow li:nth-child(2) { border-top-color: var(--r-staff); }
.overview-flow li:last-child { border-top-color: var(--r-shien); }
.overview-flow li:not(:last-child)::after { content: '→'; position: absolute; right: -15px; top: 40%; color: var(--muted); font-size: 16px; }
.overview-flow strong, .overview-flow span { display: block; }
.overview-flow strong { font-size: 15px; margin: 4px 0; }
.flow-who { font-size: 12px; color: var(--muted); }
.brief { padding: 10px 14px; background: var(--bg-sunken); border-radius: 6px; font-size: 14px; }
.start-links { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding-left: 24px; }
.start-links li { padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; margin: 0; }
.start-links a { font-weight: 700; }
.start-links span { display: block; color: var(--muted); font-size: 13px; }
.compact-flow li { padding-bottom: 16px; }
.task-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.task-groups section { background: var(--bg-sunken); border-radius: 6px; padding: 14px; }
.task-groups h3 { margin: 0; font-size: 16px; }
.task-groups ul { padding-left: 18px; font-size: 14px; margin-bottom: 0; }
.help-links { display: flex; flex-wrap: wrap; list-style: none; padding: 0; gap: 12px 20px; }
.help-links li { margin: 0; }
.entry-cards .card { border-top: 4px solid var(--r-home); }
.entry-cards .card:last-child { border-top-color: var(--r-staff); }
.entry-cards .card h3 { margin: 0; }
.entry-cards .card p { margin: 0; }
.entry-cards .card .chip { align-self: flex-start; }
.entry-cards .card a { font-weight: 700; }
.foldout, .trouble-item { margin: 16px 0; border: 1px solid var(--line-strong); border-radius: 6px; padding: 0 16px; }
.foldout > summary, .trouble-item > summary { padding: 12px 0; cursor: pointer; font-weight: 700; }
.foldout[open] > summary, .trouble-item[open] > summary { border-bottom: 1px solid var(--line); }
details.trouble-group { margin: 12px 0; padding: 0 14px; border: 1px solid var(--line); border-radius: 6px; }
details.trouble-group > summary { padding: 12px 0; cursor: pointer; font-weight: 700; }
summary:focus-visible { outline: 3px solid var(--note-line); outline-offset: 2px; }
.article [id] { scroll-margin-top: var(--header-offset, 140px); }
.article :target { outline: 2px solid var(--warn-line); outline-offset: 4px; }
.return-task { margin: 16px 0; padding: 12px 16px; border-left: 4px solid var(--note-line); background: var(--note-bg); font-size: 14px; }
.return-task a { color: var(--ink); font-weight: 700; }
.side .side-home { margin-bottom: 14px; font-weight: 700; }
.toc { max-height: calc(100vh - var(--header-offset, 140px)); overflow: auto; }
.side, .toc { top: var(--header-offset, 140px); }
.side { max-height: calc(100vh - var(--header-offset, 140px)); }
.site-header .inner { flex-wrap: wrap; }
.site-title { white-space: normal; }
.search { flex-shrink: 0; }
.search-results a:focus-visible { outline-offset: -3px; background: var(--note-bg); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.trouble-search { padding: 12px 16px; background: var(--bg-sunken); border-radius: 6px; }
#trouble-search { display: block; width: 100%; font: inherit; padding: 10px; border: 1px solid var(--line-strong); border-radius: 6px; margin-top: 8px; }
#trouble-count { font-size: 14px; color: var(--muted); }
[hidden] { display: none !important; }

/* 元画像を保ったまま、位置を番号で示し、拡大して読めるようにする。 */
.screen-frame { position: relative; display: block; width: 100%; line-height: 0; }
.screen-frame img { width: 100%; }
.screen-mark { position: absolute; left: var(--x); top: var(--y); width: var(--w); height: var(--h); border: 3px solid var(--mark); box-shadow: 0 0 0 1px white; color: white; font-size: 0; pointer-events: none; }
.screen-mark { line-height: 22px; text-align: left; text-indent: 0; }
.screen-mark > span, .screen-marker-number { position: absolute; top: -12px; left: -12px; min-width: 24px; height: 24px; padding: 0 4px; border-radius: 50%; background: var(--mark); font: 700 14px/24px var(--font); color: #fff; text-align: center; box-shadow: 0 0 0 1px white; }
.screen-zoom { display: block; position: relative; width: 100%; padding: 0; border: 0; background: transparent; cursor: zoom-in; color: inherit; text-align: left; }
.zoom-hint { display: block; background: var(--bg-sunken); text-align: right; padding: 3px 8px; font: 13px/1.6 var(--font); color: var(--link); }
.screen-crop { overflow-x: auto; }
.screen-crop > .screen-zoom { width: var(--image-width, 1000px); max-width: none; }
.screen-key { font-size: 15px; }
.screen-key li + li { margin-top: 10px; }
.image-dialog { width: min(96vw, 1700px); max-width: 96vw; max-height: 96vh; padding: 12px; border: 1px solid var(--line-strong); border-radius: 8px; }
.image-dialog::backdrop { background: rgba(0, 0, 0, .65); }
.image-close { display: block; position: sticky; top: 0; z-index: 2; margin: 0 0 8px auto; padding: 8px 24px; border: 1px solid var(--line-strong); border-radius: 6px; background: white; color: var(--ink); font: 700 16px var(--font); cursor: pointer; }
.image-dialog-body { overflow: auto; max-height: calc(90vh - 65px); }
.image-dialog-body .screen-frame { max-width: none; }
.image-dialog-body p { margin: 12px; }
@media (max-width: 800px) {
  body[data-page="homecho"] .shell { grid-template-columns: minmax(0, 1fr); }
  .overview-flow { grid-template-columns: 1fr; gap: 10px; }
  .overview-flow li { display: grid; grid-template-columns: 90px 1fr; column-gap: 8px; padding: 8px 12px; }
  .overview-flow .flow-who { grid-row: span 2; align-self: center; }
  .overview-flow li strong { margin: 0; }
  .overview-flow li:not(:last-child)::after { content: '↓'; right: auto; left: 40px; top: auto; bottom: -17px; z-index: 1; }
  .start-links, .task-groups { grid-template-columns: 1fr; }
  .site-title small { display: block; margin-left: 0; }
  .site-title { font-size: 15px; }
  .site-header .inner { gap: 8px; }
  .search { width: 100%; }
  .side { max-height: none; }
  .card { min-width: 0; }
}
@media print {
  .return-task, .zoom-hint, .image-dialog, .trouble-search, #trouble-count { display: none !important; }
  details > * { display: block !important; }
  details::details-content { content-visibility: visible !important; }
  .trouble-item[hidden], .trouble-group[hidden] { display: block !important; }
  .screen-crop { overflow: visible; }
  .screen-crop > .screen-zoom { width: 100%; }
  .overview-flow { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .article :target { outline: 0; }
}

/* 仕事から探す入口。既存の色・文字を使い、分類名と操作名を先に読む。 */
.side-group { border-bottom: 1px solid var(--line); }
.side-group > summary { cursor: pointer; font-weight: 700; padding: 12px 8px; line-height: 1.6; }
.side-group[open] > summary { color: var(--link); background: var(--bg-sunken); }
.side-group ul { padding-bottom: 10px; }
.side-group .side-entry { font-size: 13px; color: var(--link); text-decoration: underline; }
.side .side-help { margin: 8px 0 14px; font-weight: 700; }
.side .side-first-links { margin: -6px 0 12px 14px; padding: 0 0 0 10px; border-left: 2px solid var(--line); }
.side-first-links a { font-size: 13px; }
.side .side-section-title { margin: 16px 0 4px; padding: 8px 10px; font-size: 15px; font-weight: 700; }
.side:has(.side-section-title) > .side-group { margin-left: 14px; }
.side .side-shared { display: block; margin: 8px 0 12px 14px; padding: 8px 10px; font-size: 13px; border-left: 3px solid var(--link); background: var(--bg-sunken); }
.link-no { display: inline-block; font-size: 11px; color: var(--muted); font-weight: 400; margin-left: 7px; white-space: nowrap; }
.article h1 .page-no { margin: 0 0 0 10px; vertical-align: middle; font-size: 13px; }
.first-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); padding-left: 0; list-style-position: inside; }
.task-categories { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.task-category { position: relative; padding: 20px 0; border-bottom: 1px solid var(--line); }
.task-category h3 { font-size: 18px; margin: 0; text-wrap: wrap; }
.task-category p { color: var(--muted); font-size: 14px; margin: 8px 0 0; }
.task-category [data-category-anchor] { position: absolute; top: 0; }
.operation-links { list-style: none; padding: 0; }
.operation-links li { border-bottom: 1px solid var(--line); padding: 10px 0; margin: 0; }
.operation-links a { display: block; }
.route-flow > li { margin: 20px 0; padding-left: 6px; }
.route-flow p { margin: 5px 0; }
.category-return { border-top: 1px solid var(--line); padding-top: 20px; margin-top: 36px; }
@media (max-width: 680px) { .first-steps, .task-categories { grid-template-columns: 1fr; } }
@media print { .category-return { display: none; } .task-category { break-inside: avoid; } }

.side { padding-top: 0; }
.side-pinned { position: sticky; top: 0; z-index: 2; background: var(--bg); padding: 28px 0 4px; }
.operation-note { display: block; color: var(--muted); font-size: 14px; margin-top: 4px; }

@media (max-width: 800px) {
  .side-pinned { padding-top: 16px; }
  .side.open { position: fixed; top: calc(var(--header-offset, 140px) - 12px); left: 0; right: 0; z-index: 15; max-height: calc(100dvh - var(--header-offset, 140px)); overflow-y: auto; padding: 0 16px 16px; background: var(--bg); }
}
