.help-menu-wrap {
  position: relative;
  display: inline-flex;
}

.help-menu-button {
  width: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 8px;
}

.help-menu-button svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

.help-menu-button[aria-expanded="true"] {
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.help-menu {
  position: absolute;
  z-index: 80;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  gap: 4px;
  min-width: 184px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(8, 10, 10, 0.97);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.34);
}

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

.help-menu button {
  justify-content: flex-start;
  min-height: 30px;
  padding: 0 10px;
  border-color: transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--soft);
  font-size: 12px;
  font-weight: 760;
  text-align: left;
}

.help-menu button:hover {
  border-color: rgba(70, 208, 184, 0.28);
  background: rgba(70, 208, 184, 0.09);
}

/* Expandable sections (Tours / Look) inside the Options menu. */
.help-menu button.help-menu-section {
  justify-content: space-between;
  font-weight: 820;
}

.help-menu-chevron {
  margin-left: 8px;
  font-size: 15px;
  line-height: 1;
  opacity: 0.65;
  transition: transform 140ms ease;
}

.help-menu button.help-menu-section[aria-expanded="true"] .help-menu-chevron {
  transform: rotate(90deg);
  opacity: 1;
}

.help-submenu {
  display: grid;
  gap: 4px;
  margin: 0 0 2px 6px;
  padding-left: 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

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

.help-menu-separator {
  height: 1px;
  margin: 3px 2px;
  background: var(--line);
}

.onboarding-backdrop {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(3, 5, 5, 0.64);
  backdrop-filter: blur(8px);
}

.onboarding-backdrop[hidden] {
  display: none;
}

.onboarding-card {
  width: min(560px, 100%);
  max-height: min(720px, calc(100vh - 44px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: #111615;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.46);
  overflow: hidden;
}

.onboarding-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 20px 20px 12px;
}

.onboarding-header h2 {
  margin: 0;
  color: var(--text);
  font-size: 20px;
  line-height: 1.18;
  letter-spacing: 0;
}

.onboarding-header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.onboarding-close {
  width: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 8px;
  font-size: 18px;
  line-height: 1;
}

.onboarding-body {
  display: grid;
  gap: 8px;
  min-height: 0;
  padding: 0 20px 16px;
  overflow: auto;
}

.onboarding-feature {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.onboarding-feature-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(70, 208, 184, 0.32);
  border-radius: 8px;
  background: rgba(70, 208, 184, 0.1);
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}

.onboarding-feature h3 {
  margin: 0;
  color: var(--soft);
  font-size: 14px;
  line-height: 1.2;
}

.onboarding-feature p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.42;
}

.onboarding-feature-step {
  min-height: 138px;
  align-items: center;
}

.onboarding-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto auto;
  align-items: center;
  gap: 10px;
  padding: 14px 20px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.onboarding-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.onboarding-checkbox input {
  accent-color: var(--accent);
}

.onboarding-progress {
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .onboarding-footer {
    grid-template-columns: 1fr;
  }

  .onboarding-footer button {
    width: 100%;
  }
}

/* ---- Shared show/hide for the right controls panel (topbar button) ---- */
.right-drawer-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  min-width: 38px;
  padding-inline: 0;
}

.right-drawer-toggle svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

/* Lit up while the panel is open, so its state reads at a glance. */
.right-drawer-toggle.is-active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}
