.page-help-trigger {
  position: fixed;
  z-index: 35;
  inset-inline-end: max(16px, env(safe-area-inset-right));
  inset-block-end: calc(16px + env(safe-area-inset-bottom));
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 8px 16px;
  border: 0;
  border-radius: 999px;
  background: #245746;
  color: #fff;
  box-shadow: 0 3px 14px #17352a3b;
  font: 700 14px/1.4 var(--font-body);
}
.page-help-trigger:hover { background: #194234; }
.page-help-trigger .ic { width: 19px; height: 19px; }
.project-drawer-open .page-help-trigger { visibility: hidden; }

html:has(.page-help-dialog[open]) { overflow: hidden; }
.page-help-dialog {
  position: fixed;
  inset: 0;
  width: min(760px, calc(100% - 28px));
  max-width: none;
  max-height: calc(100dvh - 28px);
  margin: auto;
  padding: 16px;
  overflow: auto;
  overscroll-behavior: contain;
  border: 0;
  border-radius: 18px;
  background: #f7faf8;
  color: #202724;
  box-shadow: 0 12px 36px #16261f55;
  overflow-wrap: anywhere;
}
.page-help-dialog::backdrop { background: #17282091; }
.page-help-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-block-end: 12px;
}
.page-help-header h2 { font-size: 18px; line-height: 1.4; }
.page-help-actions { display: flex; align-items: center; gap: 8px; }
.page-help-close, .page-help-topics button, .page-help-pdf {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  color: #244e42;
  background: #e2ece5;
  font: 700 14px/1.35 var(--font-body);
}
.page-help-close { display: grid; place-items: center; width: 44px; }
.page-help-close .ic { width: 20px; height: 20px; }
.page-help-pdf { display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; }
.page-help-pdf .ic { flex: none; width: 16px; height: 16px; }
.page-help-topics { display: flex; flex-wrap: wrap; gap: 6px; margin-block-end: 12px; }
.page-help-topics button { padding: 7px 12px; }
.page-help-close:hover, .page-help-topics button:hover, .page-help-pdf:hover { background: #d1e2d8; }
.page-help-topics button[aria-pressed="true"] { background: #245746; color: #fff; }

.page-help-board {
  padding: clamp(14px, 3.5vw, 28px);
  border-radius: 12px;
  background: #244e42;
  color: #fffdf3;
}
.page-help-board-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.page-help-board-head img { width: clamp(58px, 14vw, 96px); height: auto; }
.page-help-teacher { margin: 0 0 4px; color: #f7dea1; font-size: 13px; font-weight: 700; }
.page-help-board h3 { font-size: clamp(18px, 3.8vw, 26px); line-height: 1.35; }
.page-help-flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-block-start: 16px; }
.page-help-flow > li { position: relative; padding: 12px; border-radius: 9px; background: #356456; }
.page-help-flow > li + li::before {
  content: "";
  position: absolute;
  inset-inline-start: -17px;
  inset-block-start: calc(50% - 5px);
  width: 10px;
  height: 10px;
  border-block-start: 2px solid #f7dea1;
  border-inline-end: 2px solid #f7dea1;
  transform: rotate(45deg);
}
.page-help-number {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-block-end: 6px;
  border-radius: 50%;
  background: #f7dea1;
  color: #244e42;
  font: 700 13px/1 var(--font-body);
}
.page-help-flow h4 { margin-block-end: 4px; font-size: 15px; line-height: 1.4; }
.page-help-flow p, .page-help-tip { font-size: 13px; line-height: 1.65; }
.page-help-tip { margin-block-start: 16px; padding: 8px 12px; border-radius: 7px; background: #f7dea1; color: #264639; }

@media (max-width: 600px) {
  html:not([data-project]) body:has(.bottom-nav) .page-help-trigger { inset-block-end: calc(84px + env(safe-area-inset-bottom)); }
  .page-help-dialog { padding: 12px; }
  .page-help-flow { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .page-help-flow > li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 2px 8px; padding: 9px 10px; }
  .page-help-flow > li + li::before { inset-inline-start: calc(50% - 5px); inset-block-start: -16px; transform: rotate(135deg); }
  .page-help-number { grid-row: span 2; margin: 0; }
  .page-help-flow h4 { margin: 0; }
}
