/* NOMYRA Finance V99 — walkthrough in a reserved, non-overlapping area.
   Desktop: application and guide have separate horizontal viewports.
   Small screens: dedicated guide row above a scrollable application viewport.
   The highlighted section is never darkened by a full-screen tour overlay. */
body.nf99-guide-open {
  --nf99-guide-width: clamp(350px, 28vw, 430px);
  margin: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}
body.nf99-guide-open .app-shell {
  box-sizing: border-box;
  width: calc(100vw - var(--nf99-guide-width)) !important;
  max-width: calc(100vw - var(--nf99-guide-width)) !important;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior: contain;
}
body.nf99-guide-open .app-shell main {
  box-sizing: border-box;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0;
}
body.nf99-guide-open .app-shell .sidebar {position: sticky;top: 0;}
body.nf99-guide-open #nf98Guide,
body.nf99-guide-open #nf98Guide.nf98-on-left {
  box-sizing: border-box;
  position: fixed;
  top: 0;
  bottom: 0;
  left: auto !important;
  right: 0 !important;
  width: var(--nf99-guide-width) !important;
  max-height: none;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  border-radius: 0;
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
  border-left: 1px solid #ccd9d5;
  box-shadow: -6px 0 22px rgba(20,32,51,.07);
  z-index: 1900;
}
/* Modal backdrop and dialog are confined to the application region. */
body.nf99-guide-open .modal {
  right: var(--nf99-guide-width) !important;
  box-sizing: border-box;
  width: auto;
  max-width: none;
}
body.nf99-guide-open .modal-card {max-width: min(98%, 980px);}
/* Keep the guided target highlighted without covering or dimming the page. */
body.nf99-guide-open #nf98Spotlight {
  box-shadow: 0 0 0 5px rgba(185,120,80,.15), 0 4px 12px rgba(20,32,51,.10) !important;
  border: 2px solid #b97850;
  background: transparent;
}
body.nf99-guide-open #nf98GuideButton {display: none !important;}
/* Login uses a full-viewport layout. Constrain it when the tutorial is open. */
body.nf99-guide-open.app-locked main,
body.nf99-guide-open.app-locked #access.view {
  box-sizing: border-box;
  width: 100% !important;
  max-width: 100% !important;
}
/* Compact displays: no overlay whatsoever. Reserve a fixed row for guide and
   put the live application in an independently scrollable viewport beneath. */
@media (max-width: 1139px) {
  body.nf99-guide-open {--nf99-guide-height: min(345px, 43dvh);}
  body.nf99-guide-open .app-shell {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-top: var(--nf99-guide-height);
    height: calc(100dvh - var(--nf99-guide-height));
    min-height: 0;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }
  body.nf99-guide-open #nf98Guide,
  body.nf99-guide-open #nf98Guide.nf98-on-left {
    left: 0 !important;
    right: 0 !important;
    top: 0;
    bottom: auto;
    width: 100vw !important;
    max-width: 100vw;
    height: var(--nf99-guide-height);
    max-height: var(--nf99-guide-height);
    border: 0;
    border-bottom: 1px solid #ccd9d5;
    border-radius: 0;
    box-shadow: 0 6px 16px rgba(20,32,51,.06);
  }
  body.nf99-guide-open .modal {
    left: 0 !important;
    right: 0 !important;
    top: var(--nf99-guide-height) !important;
    bottom: 0;
    height: calc(100dvh - var(--nf99-guide-height));
    padding: 8px;
  }
  body.nf99-guide-open .modal-card {
    max-height: calc(100dvh - var(--nf99-guide-height) - 16px);
    max-width: 100%;
  }
  body.nf99-guide-open.app-locked #access.view {min-height: 100% !important;}
}
@media (max-width: 540px) {
  body.nf99-guide-open {--nf99-guide-height: min(370px, 44dvh);}
  body.nf99-guide-open #nf98Guide .nf98-footer {display: none;}
  body.nf99-guide-open #nf98Guide .nf98-content h2 {font-size: 18px;}
}
@media print {
  body.nf99-guide-open {height: auto !important;overflow: visible !important;}
  body.nf99-guide-open .app-shell {width: 100% !important;max-width: none !important;height: auto !important;overflow: visible !important;margin-top: 0 !important;}
  body.nf99-guide-open #nf98Guide,body.nf99-guide-open #nf98Spotlight {display: none !important;}
}
