body.help-open,
body.settings-open {
  overflow: hidden;
}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.help-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel);
  color: var(--primary-dark);
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
  transition: background-color 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease, transform 0.08s ease;
}

.help-button:hover,
.help-button:focus,
.help-button[aria-expanded="true"] {
  border-color: var(--primary);
  background: #ecfdf3;
  box-shadow: var(--focus-ring);
  outline: 0;
}

.help-button:active {
  transform: scale(0.98);
}

.help-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  align-items: start;
  justify-items: center;
  padding: 18px 12px;
  background: rgba(15, 23, 42, 0.42);
  overflow-y: auto;
}

.help-overlay[hidden] {
  display: none;
}

.help-dialog {
  width: min(520px, 100%);
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  background: #f8fbfa;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.28);
}

.help-dialog:focus {
  outline: none;
}

.help-dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.help-dialog h2 {
  margin: 0;
  font-size: 15px;
  letter-spacing: 0;
}

.help-close-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--text);
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
  transition: border-color 0.14s ease, box-shadow 0.14s ease, transform 0.08s ease;
}

.help-close-button:hover,
.help-close-button:focus {
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
  outline: 0;
}

.help-close-button:active {
  transform: scale(0.98);
}

.help-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

.help-list div {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 10px;
}

.help-list dt,
.help-list dd {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

.help-list dt {
  color: var(--primary-dark);
  font-weight: 800;
}

.help-list dd {
  color: var(--text);
  overflow-wrap: anywhere;
  word-break: break-word;
}
