
/* ===== Help & docs dialog (help.js) ===== */
#help-dialog { position: fixed; left: 50%; top: 4vh; transform: translateX(-50%); width: min(980px, 95vw); height: 90vh; max-width: none; max-height: none;
  padding: 0; overflow: hidden; flex-direction: column; font-size: 0.88rem; z-index: 300; }
#help-dialog.show { display: flex; }
#help-top { display: flex; gap: 6px; align-items: center; padding: 8px; border-bottom: 1px solid var(--border); background: var(--surface); }
#help-top button { width: auto; margin: 0; padding: 4px 10px; }
#help-top button:disabled { opacity: .35; cursor: default; }
#help-search { flex: 1; margin: 0; padding: 6px 10px; background: var(--bg-deep); color: var(--text); border: 1px solid var(--line-3); border-radius: 4px; font-size: 0.9rem; }
#help-search:focus { outline: none; border-color: var(--accent); }
#help-main { display: flex; flex: 1; min-height: 0; }
#help-nav { width: 250px; flex: none; overflow-y: auto; border-right: 1px solid var(--border); padding: 6px 0 14px; background: var(--surface); }
#help-content { flex: 1; overflow-y: auto; padding: 4px 22px 30px; line-height: 1.45; }
.help-cat-head { padding: 10px 12px 3px; font-size: 0.7rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.help-nav-item { display: block; padding: 4px 12px 4px 18px; color: var(--text); text-decoration: none; font-size: 0.85rem; border-left: 3px solid transparent; }
.help-nav-item:hover { background: var(--surface-2); color: var(--accent); }
.help-nav-item.on, .help-res.on { background: var(--surface-2); border-left-color: var(--accent); color: var(--accent); }
.help-res { display: block; padding: 7px 12px; color: var(--text); text-decoration: none; border-left: 3px solid transparent; border-bottom: 1px solid var(--line-1); }
.help-res:hover { background: var(--surface-2); }
.help-res b { display: block; font-size: 0.86rem; }
.help-res small { color: var(--muted); font-size: 0.7rem; text-transform: uppercase; letter-spacing: .05em; }
.help-res span { display: block; color: var(--text-2); font-size: 0.76rem; margin-top: 2px; word-break: break-word; }
.help-res-count, .help-none { padding: 8px 12px; color: var(--muted); font-size: 0.8rem; }
#help-content h2 { margin: 14px 0 2px; font-size: 1.35rem; }
#help-content h3 { margin: 16px 0 4px; font-size: 0.78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
#help-content p { margin: 6px 0; }
#help-content ol, #help-content ul { margin: 4px 0 4px 20px; padding: 0; }
#help-content li { margin: 3px 0; }
#help-content a { color: var(--link); }
#help-content .help-cat { color: var(--muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px; }
#help-content .help-what { font-size: 0.95rem; }
#help-content .help-limits li::marker { color: var(--warn); }
#help-content .help-limits li { color: var(--warn); }
#help-content .help-note { background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: 4px; padding: 6px 10px; margin: 8px 0; color: var(--warn); font-size: 0.82rem; }
#help-content .help-tip { color: var(--text-2); }
#help-content .help-home { list-style: none; margin-left: 0; }
#help-content .help-home li { margin: 6px 0; font-size: 0.95rem; }
#help-content kbd { background: var(--surface-2); border: 1px solid var(--line-4); border-bottom-width: 2px; border-radius: 3px; padding: 0 5px; font-family: inherit; font-size: 0.8rem; white-space: nowrap; }
#help-content mark { background: #f9a825; color: #000; border-radius: 2px; padding: 0 1px; }
.help-table { border-collapse: collapse; width: 100%; margin: 6px 0; font-size: 0.82rem; }
.help-table th { text-align: left; color: var(--text-2); font-weight: 600; border-bottom: 1px solid var(--line-3); padding: 4px 8px; }
.help-table td { border-bottom: 1px solid var(--line-1); padding: 5px 8px; vertical-align: top; }
.help-q { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; margin: 0 6px 0 8px; border: 1px solid var(--line-4); border-radius: 50%;
  font-size: 0.7rem; line-height: 1; color: var(--text-2); cursor: pointer; flex: none; margin-right: auto; }
.help-q:hover { color: var(--accent); border-color: var(--accent); }
.mp-tab-header .mp-help { width: auto; margin: 0 4px 0 auto; padding: 1px 7px; background: var(--surface-2); color: var(--text-2); border-radius: 50%; font-size: 0.75rem; }
.mp-tab-header .mp-help:hover { color: var(--accent); }
@media (max-width: 700px) { #help-main { flex-direction: column; } #help-nav { width: auto; max-height: 30%; border-right: none; border-bottom: 1px solid var(--border); } }
