/* ヘルプページ — iOS Safari / PWA 縦スクロール（内側スクロール方式） */
html.page-help,
html:has(body.page-help) {
  height: 100%;
  width: 100%;
  overflow: hidden;
  position: fixed;
  overscroll-behavior: none;
}
body.page-help {
  height: 100%;
  width: 100%;
  margin: 0;
  overflow: hidden;
  position: fixed;
  overscroll-behavior: none;
}
.help-scroll {
  position: fixed;
  inset: 0;
  overflow-x: hidden;
  overflow-y: scroll;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
  background: var(--bg, #f9fafb);
}
.page-help .app-header {
  position: sticky;
  top: 0;
  z-index: 10;
}
.page-help .help-figure img {
  -webkit-user-drag: none;
  touch-action: manipulation;
}
.page-help .help-figure--compact img {
  max-width: 360px;
}
.help-img-tappable {
  cursor: zoom-in;
}
body.help-viewer-open .help-scroll {
  overflow: hidden;
}

/* 画像拡大ビューア（モバイル · ピンチズーム） */
.help-image-viewer {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, .92);
  display: flex;
  flex-direction: column;
}
.help-image-viewer.hidden {
  display: none !important;
}
.help-image-viewer-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: none;
  padding: .5rem;
  box-sizing: border-box;
}
.help-image-viewer-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transform-origin: center center;
  will-change: transform;
  user-select: none;
  -webkit-user-select: none;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
.help-image-viewer-hint {
  flex-shrink: 0;
  margin: 0;
  padding: .65rem 1rem calc(.65rem + env(safe-area-inset-bottom, 0));
  text-align: center;
  font-size: .8rem;
  color: rgba(255, 255, 255, .75);
}

/* URL コピー トースト（マニュアル一覧の「URLをコピー」ボタン） */
.help-copy-toast {
  position: fixed;
  left: 50%;
  bottom: calc(1.25rem + env(safe-area-inset-bottom, 0));
  transform: translateX(-50%);
  z-index: 10001;
  max-width: min(92vw, 22rem);
  padding: .65rem 1rem;
  border-radius: 10px;
  background: rgba(17, 24, 39, .92);
  color: #fff;
  font-size: .82rem;
  line-height: 1.45;
  text-align: center;
  white-space: pre-line;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .25);
  pointer-events: none;
}
.help-copy-toast.hidden {
  display: none !important;
}

/* マニュアル一覧（help-manuals.html） */
.help-manual-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .65rem;
}
.help-manual-card {
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 10px;
  background: var(--white, #fff);
  overflow: hidden;
  transition: border-color .15s, box-shadow .15s;
}
.help-manual-card:has(.help-manual-item:hover),
.help-manual-card:has(.help-manual-item:focus-visible),
.help-manual-card:has(.help-manual-copy-url:hover),
.help-manual-card:has(.help-manual-copy-url:focus-visible) {
  border-color: var(--primary, #1a56db);
  box-shadow: 0 2px 8px rgba(26, 86, 219, .08);
}
.help-manual-item {
  display: block;
  padding: .85rem 1rem .65rem;
  text-decoration: none;
  color: inherit;
}
.help-manual-item-title {
  margin: 0 0 .25rem;
  font-size: .95rem;
  font-weight: 600;
  color: var(--primary, #1a56db);
}
.help-manual-item-desc {
  margin: 0;
  font-size: .85rem;
  color: var(--muted, #6b7280);
  line-height: 1.45;
}
.help-manual-item-arrow {
  float: right;
  margin-left: .5rem;
  color: var(--muted, #6b7280);
  font-size: .9rem;
}
.help-manual-item-actions {
  display: flex;
  justify-content: flex-end;
  padding: 0 .75rem .75rem;
}
.help-manual-copy-url {
  margin: 0;
  padding: .35rem .75rem;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 999px;
  background: var(--white, #fff);
  color: var(--primary, #1a56db);
  font-size: .78rem;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  touch-action: manipulation;
  transition: background .15s, border-color .15s, color .15s;
}
.help-manual-copy-url:hover,
.help-manual-copy-url:focus-visible {
  border-color: var(--primary, #1a56db);
  background: rgba(26, 86, 219, .06);
  outline: none;
}
.help-manual-copy-url:active {
  opacity: .85;
}

/* マニュアル一覧 — カテゴリ見出し */
.help-manual-section {
  margin: 0 0 1.5rem;
}
.help-manual-section:last-child {
  margin-bottom: 0;
}
.help-manual-section-title {
  margin: 0 0 .5rem;
  padding: 0 .15rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted, #6b7280);
}
.help-manual-section-desc {
  margin: 0 0 .65rem;
  padding: 0 .15rem;
  font-size: .82rem;
  color: var(--muted, #6b7280);
  line-height: 1.45;
}
.help-manual-hub-actions {
  display: flex;
  justify-content: flex-end;
  margin: -.35rem 0 1.25rem;
}
.help-manual-copy-url--hub {
  font-size: .82rem;
  padding: .45rem .9rem;
}
