.help-entry {
  position: fixed;
  z-index: 1019;
  left: 50%;
  bottom: calc(1.05rem + env(safe-area-inset-bottom, 0px));
  width: max-content;
  max-width: calc(100% - 2rem);
  min-height: 48px;
  border: 1px solid #f0d6a3;
  border-radius: 100px;
  padding: .6rem 1.1rem;
  box-shadow: 0 8px 24px #0008;
  transform: translateX(-50%);
}

.help-dialog {
  box-sizing: border-box;
  width: min(40rem, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 0;
  border: 1px solid var(--button-edge);
  border-radius: 15px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 22px 80px #0008;
}

.help-dialog::backdrop { background: #080808b8; backdrop-filter: blur(4px); }
html:has(.help-dialog[open]) { overflow: hidden; }
.help-dialog-inner { padding: clamp(1rem, 4vw, 2rem); }
.help-dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: .7rem; }
.help-dialog-heading h2 { margin: 0; font: 440 clamp(2.15rem, 6vw, 3.45rem)/.97 var(--serif); letter-spacing: -.045em; }
.help-dialog-heading p { display: flex; align-items: center; gap: .5rem; margin: .55rem 0 0; color: var(--muted); font-size: .89rem; }
.help-close { flex: none; display: grid; width: 44px; height: 44px; place-items: center; border: 1px solid var(--edge); border-radius: 7px; background: var(--panel); color: var(--gold-ink); }
.help-close:hover { background: var(--panel-hover); }
.help-dialog-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .65rem; margin-block: 1.15rem 1.2rem; }
.help-dialog-actions .button { min-height: 56px; padding: .45rem .5rem; }
.help-dialog-actions small { display: block; font-size: .75rem; line-height: 1.15; }
.help-dialog section h3 { margin: 0 0 .55rem; font-size: .98rem; font-weight: 800; }
.help-choices { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .6rem; margin: 0; }
.help-choice { display: flex; align-items: center; gap: .64rem; height: 100%; min-height: 66px; padding: .6rem .7rem; border: 1px solid var(--edge); border-radius: 8px; background: var(--panel); text-decoration: none; transition: background .18s ease, border-color .18s ease; }
.help-choice:hover { border-color: var(--button-hover-edge); background: var(--panel-hover); }
.help-choice strong { display: block; line-height: 1.22; font-size: .9rem; }
.help-choice small { display: block; margin-top: .18rem; color: var(--muted); line-height: 1.35; font-size: .79rem; }
.help-choice-icon { display: grid; flex: none; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--icon-surface); color: var(--gold-ink); }
.help-choice-arrow { margin-inline-start: auto; color: var(--gold-ink); font-size: .78rem; }
.home-help .section-heading p { max-width: 64ch; color: var(--muted); }
.home-help .help-choices { grid-template-columns: repeat(4,minmax(0,1fr)); }

@media (max-width: 991.98px) { .home-help .help-choices { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 575.98px) {
  .help-dialog { width: calc(100% - 1rem); max-height: calc(100dvh - 1rem - env(safe-area-inset-top, 0px)); margin: auto auto max(.5rem, env(safe-area-inset-bottom, 0px)); }
  .help-dialog .help-choices, .home-help .help-choices { grid-template-columns: 1fr; }
  .help-choice { min-height: 54px; }
}
@media (prefers-reduced-motion: no-preference) {
  @keyframes help-in { from { opacity: .3; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
  .help-dialog[open] { animation: help-in .24s cubic-bezier(.2,.75,.25,1) both; }
}
