/* Справка (#/help, static/help.js): длинный текст в узкой колонке, оглавление капсулами, примеры нот как в песне */

.hp { max-width: 820px; line-height: 1.6; }
.hp > * + * { margin-top: 16px; }
.hp h1 { margin-bottom: 6px; }
.hp h2 { font-size: 22px; font-weight: 600; letter-spacing: -.01em; margin: 0 0 12px; }
.hp h3 { font-size: 16px; font-weight: 600; margin: 24px 0 8px; }
.hp p, .hp ul, .hp ol { margin: 0 0 12px; }
.hp ul, .hp ol { padding-left: 22px; }
.hp li + li { margin-top: 6px; }
.hp li::marker { color: var(--faint); }
.hp b { font-weight: 600; }
.hp a { text-decoration: none; }
.hp a:hover { text-decoration: underline; }

/* главное предупреждение: ноты бывают неточными */
.hp-warn {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px 20px; border-radius: var(--radius);
  background: var(--accent-soft); border: 1px solid rgba(255, 107, 74, .35);
}
.hp-warn .hp-mark {
  flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: var(--ink); font-weight: 800; font-size: 16px; line-height: 1;
}
.hp-warn p { margin: 0; }
.hp-warn p + p { margin-top: 6px; }

/* оглавление: карточки тем, в каждой — вопросы-ссылки */
.hp-toc { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.hp-toc-card { background: var(--surface); border-radius: var(--radius); padding: 14px 16px 12px; }
.hp-toc-h { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.hp-toc-h svg { width: 15px; height: 15px; color: var(--accent-text); }
.hp-toc ul { list-style: none; padding: 0; margin: 0; }
.hp-toc li + li { margin-top: 2px; }
.hp-toc a { display: block; padding: 4px 0; color: var(--text); font-size: 14px; line-height: 1.35; }
.hp-toc a:hover { color: var(--accent-text); text-decoration: none; }

/* скриншоты: рамка как у окна, подпись под ним; нажатие открывает крупно */
.hp-shot { margin: 4px 0 16px; }
.hp-shot img {
  display: block; width: 100%; height: auto; border-radius: 12px; cursor: zoom-in;
  border: 1px solid var(--border-2); box-shadow: 0 10px 32px rgba(0, 0, 0, .35); background: var(--surface);
}
.hp-shot figcaption { margin-top: 8px; font-size: 13px; color: var(--faint); line-height: 1.45; }
.hp-shot.light img { border-color: transparent; }
/* узкий скриншот рядом с текстом */
.hp-side { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: start; margin-bottom: 12px; }
.hp-side > figure { width: var(--w, 220px); margin: 0; }
.hp-side > div > :last-child { margin-bottom: 0; }
/* два скриншота рядом */
.hp-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.hp-pair .hp-shot { margin: 0 0 16px; }

/* выноски на скриншоте: рамка вокруг части экрана и номер в углу, под картинкой — что есть что */
.hp-annot { position: relative; }
.hp-box {
  position: absolute; border: 2px solid var(--accent); border-radius: 10px; pointer-events: none;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .35), 0 0 18px rgba(255, 107, 74, .25);
}
.hp-box::before {
  content: attr(data-n); position: absolute; left: -11px; top: -11px; display: grid; place-items: center;
  width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--ink);
  font: 800 12px/1 var(--mono); box-shadow: 0 2px 8px rgba(0, 0, 0, .5);
}
.hp-legend { list-style: none; padding: 0; counter-reset: n; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; }
.hp-legend li { counter-increment: n; display: flex; gap: 10px; align-items: baseline; margin: 0; font-size: 14px; line-height: 1.45; }
.hp-legend li::before {
  content: counter(n); flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent); color: var(--ink); font: 800 11px/1 var(--mono); transform: translateY(3px);
}

/* шаги — крупные номера в кружках */
.hp-steps { list-style: none; padding: 0; counter-reset: s; }
.hp-steps > li { counter-increment: s; position: relative; padding-left: 38px; min-height: 26px; }
.hp-steps > li + li { margin-top: 10px; }
.hp-steps > li::before {
  content: counter(s); position: absolute; left: 0; top: 0; display: grid; place-items: center;
  width: 26px; height: 26px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border-2);
  font: 700 12px/1 var(--mono); color: var(--text);
}

/* совет и плашка «важно» внутри раздела */
.hp-tip {
  display: flex; gap: 12px; align-items: flex-start; margin: 4px 0 14px; padding: 12px 16px; border-radius: 12px;
  background: var(--note-soft); border: 1px solid rgba(182, 156, 255, .25); font-size: 14px; line-height: 1.5;
}
.hp-tip svg { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--note); }
.hp-tip p { margin: 0; }
.hp-tip.warn { background: var(--accent-soft); border-color: rgba(255, 107, 74, .35); }
.hp-tip.warn svg { color: var(--accent-text); }

/* частые вопросы — раскрываются по одному */
.hp-q { background: var(--surface); border-radius: 12px; padding: 0 16px; }
.hp-q + .hp-q { margin-top: 8px; }
.hp-q summary { cursor: pointer; list-style: none; padding: 13px 0; font-weight: 600; display: flex; gap: 10px; align-items: center; }
.hp-q summary::-webkit-details-marker { display: none; }
.hp-q summary::after { content: "+"; margin-left: auto; color: var(--muted); font: 400 20px/1 var(--mono); transition: transform .2s ease; }
.hp-q[open] summary::after { transform: rotate(45deg); }
.hp-q > :not(summary) { margin: 0 0 14px; }

.hp-back { display: inline-block; margin-top: 14px; font-size: 13px; color: var(--muted); }
.hp-back::before { content: "↑ "; }

/* крупный скриншот поверх страницы */
.hp-zoom {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 24px;
  background: rgba(0, 0, 0, .86); cursor: zoom-out; animation: hp-fade .15s ease-out;
}
.hp-zoom img { max-width: 100%; max-height: 100%; border-radius: 12px; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
@keyframes hp-fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .hp-zoom { animation: none; } .hp-q summary::after { transition: none; } }

/* обучение: кнопка-приглашение */
.hp-tour { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; padding: 16px 18px; border-radius: var(--radius); background: var(--surface); }
.hp-tour p { margin: 0; flex: 1 1 260px; }

.hp section { padding-top: 24px; border-top: 1px solid var(--border); margin-top: 32px; }
.hp section > :last-child { margin-bottom: 0; }

.hp table { width: 100%; border-collapse: collapse; margin: 4px 0 16px; font-size: 14px; line-height: 1.45; }
.hp th, .hp td { text-align: left; vertical-align: top; padding: 9px 12px; border-bottom: 1px solid var(--border); }
.hp th { color: var(--muted); font-weight: 500; font-size: 13px; }
.hp td:first-child { width: 42%; }
.hp-keys td:first-child { width: 120px; white-space: nowrap; }

.hp kbd {
  display: inline-block; min-width: 22px; padding: 1px 7px; border-radius: 6px; text-align: center;
  background: var(--surface-2); border: 1px solid var(--border-2); border-bottom-width: 2px;
  font: 600 12px/1.6 var(--mono); color: var(--text);
}

/* значки на нотах: слог-пример слева, объяснение справа */
.hp-marks { list-style: none; padding: 0; }
.hp-marks li { display: flex; align-items: center; gap: 14px; }
.hp-marks li + li { margin-top: 10px; }
.hp-demo { flex: none; pointer-events: none; min-width: 3.4em; background: var(--surface-2); }
.hp-demo .tx { font-size: 16px; }

/* окно правки ноты — неподвижная копия настоящего рядом с шагами */
.hp-edit { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; align-items: start; margin-bottom: 12px; }
.hp-edit ol { margin: 0; }
.hp-pop {
  pointer-events: none; display: grid; gap: 8px; padding: 14px; line-height: 1.3;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 16px 48px rgba(0, 0, 0, .45);
}
.hp-pop .btn { cursor: default; }
.hp-pop p { margin: 0; }
.hp figure { margin: 0; }
.hp-pop .btn svg { width: 14px; height: 14px; }
.hp-cap { margin: 8px 0 0; font-size: 12px; color: var(--faint); text-align: center; }

/* ссылка «Как проверять ноты» внизу настоящего окна правки ноты (app.js, openNoteEditor) и в его копии здесь */
.note-pop .np-help, .hp-pop .np-help {
  justify-self: center; font-size: 12px; color: var(--muted); text-decoration: underline;
  text-decoration-color: var(--border-2); text-underline-offset: 3px;
}
.note-pop .np-help:hover { color: var(--text); text-decoration-color: currentColor; }

@media (max-width: 860px) {
  .hp-edit { grid-template-columns: 1fr; }
  .hp-edit figure { max-width: 280px; }
}
@media (max-width: 700px) {
  .hp h2 { font-size: 20px; }
  .hp td:first-child { width: auto; }
  .hp-side { grid-template-columns: 1fr; }
  .hp-side > figure { width: min(var(--w, 220px), 70%); }
  .hp-pair, .hp-legend { grid-template-columns: 1fr; }
  .hp-box::before { width: 18px; height: 18px; left: -9px; top: -9px; font-size: 10px; }
}
