.touch-help-dialog {
  box-sizing: border-box;
  width: min(460px, calc(100vw - 24px));
  max-height: 90vh;
  max-height: 90dvh;
  margin: auto;
  padding: 22px;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #c7dacf;
  border-radius: 25px;
  background: #fbfcf6;
  color: #2f574a;
  box-shadow: 0 22px 70px #183b3938;
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-align: left;
}
.touch-help-dialog::backdrop { background: #173f3b66; }
.touch-help-dialog * { box-sizing: border-box; }
.touch-help-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.touch-help-eyebrow { font-size: 12px; font-weight: 650; letter-spacing: .06em; color: #657d69; }
.touch-help-dialog h2 { margin: 4px 0 0; font-size: clamp(22px, 6vw, 28px); line-height: 1.25; letter-spacing: -.03em; color: #294f43; }
.touch-help-dialog button {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.touch-help-dialog button:focus-visible { outline: 3px solid #b38b24; outline-offset: 3px; }
.touch-help-close { flex: 0 0 44px; padding: 0; border-radius: 14px; background: #eaf1e8; color: #477264; font-size: 27px !important; line-height: 1; }
.touch-help-dialog #touch-help-intro { margin: 14px 0 18px; font-size: 14px; color: #5b7165; }
.touch-help-gestures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.touch-help-gesture { display: flex; flex-direction: column; align-items: center; text-align: center; }
.touch-help-gesture svg { display: block; width: 100%; max-width: 92px; height: auto; margin-bottom: 7px; }
.touch-help-gesture strong { font-size: 12px; line-height: 1.5; }
.touch-help-gesture > span { margin-top: 2px; color: #627a6c; font-size: 12px; }
.touch-help-building { display: grid; grid-template-columns: 25px minmax(0, 1fr); gap: 15px 9px; margin-top: 21px; padding: 17px 14px; border: 1px solid #e3e8d4; border-radius: 17px; background: #f4f4e7; }
.touch-help-step { display: flex; align-items: center; justify-content: center; width: 25px; height: 25px; border-radius: 50%; background: #e3c46f; color: #574929; font-size: 13px; font-weight: 700; }
.touch-help-building p { margin: 0; }
.touch-help-building strong { display: block; font-size: 14px; }
.touch-help-building p > span { display: block; margin-top: 3px; font-size: 13px; line-height: 1.55; color: #62715f; }
.touch-help-return { margin: 14px 0 17px; color: #6a7b6c; font-size: 12px; text-align: center; }
.touch-help-actions { position: sticky; bottom: -22px; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 -22px -22px; padding: 12px 22px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid #dce7d9; background: #fbfcf6; box-shadow: 0 -8px 14px #fbfcf6f0; }
.touch-help-actions button { padding: 11px 10px; border-radius: 14px; line-height: 1.4; }
.touch-help-actions .touch-help-practice { border-color: #c6d9ca; background: #ecf2e8; color: #3d6452; }
.touch-help-actions .touch-help-done { background: #466c59; color: #fffef5; }
@media (max-width: 360px) {
  .touch-help-dialog { padding: 17px; }
  .touch-help-gestures { gap: 5px; }
  .touch-help-gesture strong, .touch-help-gesture > span { font-size: 11px; }
  .touch-help-actions button { font-size: 13px; }
  .touch-help-actions { bottom: -17px; margin-inline: -17px; margin-bottom: -17px; padding-inline: 17px; }
}
@media (max-height: 560px) and (min-width: 600px) {
  .touch-help-dialog { width: min(580px, calc(100vw - 32px)); }
  .touch-help-gesture svg { max-width: 68px; }
}
