/* Onboarding, Guided Tour, tooltips, help and feature discovery. */
.ng-menu-lang {
  margin: 12px 2px 0;
  padding: 10px 12px;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  background: rgba(12, 22, 40, .72);
}
.ng-menu-lang-head {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.ng-lang-seg {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.ng-lang-btn {
  min-height: 38px;
  padding: 7px 11px;
  border: 1px solid var(--panel-border);
  border-radius: 9px;
  background: rgba(20, 34, 56, .9);
  color: var(--text);
  font: 600 12px/1 var(--font-ui);
  cursor: pointer;
}
.ng-lang-btn:hover, .ng-lang-btn:focus-visible { border-color: var(--accent); }
.ng-lang-btn.active {
  border-color: var(--amber);
  background: rgba(255, 176, 32, .16);
  color: #ffd479;
  box-shadow: 0 0 0 1px rgba(255, 176, 32, .18) inset;
}
.ng-menu-lang .fineprint { margin-top: 7px; }

.ng-welcome[open], .ng-help[open] { width: min(620px, 94vw); }
.ng-welcome-body { padding: 22px 24px calc(20px + var(--safe-b)); }
.ng-welcome-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.ng-welcome-head h2 { margin: 0 0 4px; font-size: 22px; }
.ng-welcome-head .about-sub { margin: 0; }
.ng-welcome p { margin: 9px 0; line-height: 1.5; }
.ng-welcome-lang { margin: 16px 0 4px; }
.ng-welcome-actions, .ng-settings-actions, .ng-help-actions {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 14px 0 8px;
}
.ng-welcome-actions .text-button, .ng-tour-actions .text-button { color: var(--muted); }
.ng-welcome .fineprint { color: var(--muted); font-size: 12px; }
.ng-welcome[open] { max-height: var(--dlg-max); overflow: auto; }

.ng-help { padding: 22px 24px calc(18px + var(--safe-b)); max-height: var(--dlg-max); overflow: auto; }
.ng-help h2 { margin: 0 30px 8px 0; }
.ng-help h3 { margin: 16px 0 7px; }
.ng-help-topics { display: flex; flex-wrap: wrap; gap: 6px; }
.ng-help-topic.active { border-color: var(--amber); color: #ffd479; background: rgba(255,176,32,.12); }
.ng-help-features { display: grid; gap: 7px; }
.ng-help-feature {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 8px;
  border: 1px solid var(--panel-border); border-radius: 9px; padding: 8px 10px;
  font-size: 12px;
}
.ng-help-feature span { grid-column: 1; color: var(--muted); }
.ng-help-feature small { grid-row: 1 / span 2; grid-column: 2; color: var(--green); align-self: center; }
#ng-help-body { min-height: 48px; line-height: 1.55; color: var(--text); }

.ng-settings-block { margin-top: 18px; padding-top: 4px; border-top: 1px solid var(--panel-border); }
.ng-settings-block > h3 { margin-top: 14px; }
.ng-settings-block .set-switch { margin-top: 8px; }
.ng-settings-block .voice-volume { margin-top: 8px; }
.ng-settings-actions { margin-top: 10px; }

.ng-help-btn {
  width: 26px; height: 26px; min-width: 26px; margin-left: 7px;
  display: inline-grid; place-items: center;
  border: 1px solid var(--panel-border); border-radius: 50%;
  background: rgba(20,34,56,.9); color: var(--cyan);
  font: 700 12px/1 var(--font-ui); cursor: pointer; vertical-align: middle;
}
.ng-help-btn:hover, .ng-help-btn:focus-visible { border-color: var(--cyan); }

.ng-feature {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-h) + var(--safe-b) + 12px + var(--stack-h, 0px));
  transform: translateX(-50%);
  z-index: 80;
  width: min(520px, calc(100vw - 20px));
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid rgba(255,176,32,.36);
  border-radius: 12px;
  background: rgba(18, 28, 46, .96);
  box-shadow: 0 8px 26px rgba(0,0,0,.45);
  backdrop-filter: blur(10px);
}
.ng-feature.hidden { display: none !important; }
.ng-feature-copy { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; font-size: 12px; }
.ng-feature-copy b { color: #ffd479; font-size: 12px; }
.ng-feature-copy span:last-child { color: var(--text); line-height: 1.4; }
.ng-feature-actions { display: flex; gap: 6px; align-items: center; }
.ng-feature-x {
  width: 32px; height: 32px; border: 1px solid var(--panel-border); border-radius: 8px;
  background: transparent; color: var(--muted); font-size: 18px; cursor: pointer;
}
.ng-feature .chip { white-space: nowrap; }

.ng-tour {
  position: fixed; inset: 0; z-index: 200; pointer-events: none;
}
.ng-tour.hidden { display: none !important; }
.ng-tour-hole {
  position: fixed;
  border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(3, 8, 18, .62);
  border: 2px solid rgba(255, 176, 32, .9);
  pointer-events: none;
  transition: left .18s ease, top .18s ease, width .18s ease, height .18s ease;
}
.ng-tour-tip {
  position: fixed;
  z-index: 201;
  pointer-events: auto;
  padding: 14px 15px 11px;
  border: 1px solid rgba(110,150,255,.35);
  border-radius: 12px;
  background: rgba(14, 24, 42, .98);
  box-shadow: 0 12px 36px rgba(0,0,0,.55);
  outline: none;
}
.ng-tour-head { display: flex; justify-content: space-between; gap: 8px;
  color: var(--muted); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.ng-tour-progress { height: 3px; border-radius: 2px; background: #22314d; margin: 7px 0 10px; overflow: hidden; }
.ng-tour-progress i { display: block; height: 100%; width: 0; background: var(--amber); transition: width .2s ease; }
.ng-tour-tip h3 { margin: 0 0 6px; font-size: 16px; }
.ng-tour-tip p { margin: 0 0 8px; color: #c9d6ea; font-size: 13px; line-height: 1.5; }
.ng-tour-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.ng-tour-actions > span { flex: 1; }
.ng-tour-actions .chip { min-height: 34px; font-size: 12px; }
.ng-tour #ng-tour-status { min-height: 16px; }

.ng-tooltip {
  position: fixed;
  z-index: 300;
  padding: 10px 12px;
  border: 1px solid rgba(110,150,255,.35);
  border-radius: 10px;
  background: rgba(14, 24, 42, .98);
  box-shadow: 0 10px 28px rgba(0,0,0,.5);
  font-size: 12px;
}
.ng-tooltip.hidden { display: none !important; }
.ng-tooltip b { display: block; margin: 0 20px 4px 0; font-size: 12px; color: #ffd479; }
.ng-tooltip p { margin: 0; line-height: 1.45; color: #c9d6ea; }
.ng-tooltip-x {
  position: absolute; top: 3px; right: 4px; width: 24px; height: 24px;
  border: 0; background: transparent; color: var(--muted); font-size: 16px; cursor: pointer;
}

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
body.ng-tour-active { overscroll-behavior: none; }

@media (max-width: 640px) {
  .ng-welcome-body, .ng-help { padding: 16px 14px calc(14px + var(--safe-b)); }
  .ng-welcome-head { align-items: flex-start; }
  .ng-welcome-head h2 { font-size: 19px; }
  .ng-welcome-actions, .ng-settings-actions, .ng-help-actions { gap: 6px; }
  .ng-welcome-actions .chip, .ng-settings-actions .chip, .ng-help-actions .chip { flex: 1 1 44%; min-height: 40px; }
  .ng-feature { bottom: calc(var(--tabbar-h) + var(--safe-b) + 10px + var(--stack-h, 0px)); padding: 10px; }
  .ng-feature .chip { min-height: 36px; }
  .ng-feature-copy span:last-child { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .ng-tour-tip { left: 10px !important; right: 10px !important; width: auto !important; }
  .ng-tour-actions .chip { min-height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .ng-tour-hole, .ng-tour-progress i { transition: none !important; }
}
