/* MODTAC MODLAB V1.5.0 R5 — visitor-facing visual onboarding. */
.guide-tour[hidden],
.guide-prompt[hidden] {
  display: none !important;
}

body.guide-is-open {
  overflow: hidden !important;
}

.guide-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 6, 4, .86);
  backdrop-filter: blur(6px);
}

.guide-prompt,
.guide-tour {
  position: fixed;
  z-index: 9000;
  inset: 0;
  display: grid;
  padding: 14px;
  place-items: center;
}

.guide-prompt__card,
.guide-tour__card {
  position: relative;
  z-index: 1;
  border: 1px solid rgba(201, 133, 50, .72);
  color: var(--cream);
  background:
    radial-gradient(circle at 80% 0, rgba(201, 133, 50, .12), transparent 34%),
    #18110c;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .62), inset 0 0 0 1px rgba(255, 255, 255, .025);
}

.guide-prompt__card {
  width: min(560px, calc(100vw - 28px));
  padding: clamp(24px, 5vw, 44px);
}

.guide-prompt__eyebrow,
.guide-kicker {
  display: block;
  color: #d99642;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .18em;
}

.guide-prompt h2 {
  margin: 12px 0 10px;
  font-family: var(--font-display);
  font-size: clamp(25px, 5vw, 42px);
  font-weight: 400;
  line-height: 1.03;
  letter-spacing: .025em;
}

.guide-prompt p {
  margin: 0;
  color: #d8c9b8;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .075em;
  line-height: 1.6;
}

.guide-prompt__actions {
  display: flex;
  gap: 9px;
  margin-top: 24px;
}

.guide-prompt__actions button,
.guide-nav__buttons button,
.guide-close {
  appearance: none;
  -webkit-appearance: none;
  min-height: 44px;
  border: 1px solid #9b652d;
  border-radius: 0;
  color: #f7f0e6;
  background: #281a11;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .09em;
  cursor: pointer;
}

.guide-prompt__start,
.guide-next {
  color: #17100b !important;
  background: #d28a35 !important;
}

.guide-prompt__actions button {
  flex: 1 1 0;
  padding: 11px 14px;
}

.guide-prompt__actions button:hover,
.guide-prompt__actions button:focus-visible,
.guide-nav__buttons button:hover,
.guide-nav__buttons button:focus-visible,
.guide-close:hover,
.guide-close:focus-visible {
  border-color: #f7f0e6;
  outline: 2px solid rgba(210, 138, 53, .34);
  outline-offset: 2px;
}

.guide-tour__card {
  display: grid;
  width: min(1180px, calc(100vw - 28px));
  max-height: 92vh;
  max-height: 92dvh;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.guide-tour__head {
  display: flex;
  min-height: 54px;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 10px 18px;
  border-bottom: 1px solid #52371f;
  background: rgba(29, 19, 12, .96);
}

.guide-tour__head b,
.guide-tour__head span {
  display: block;
}

.guide-tour__head b {
  color: #f7f0e6;
  font-size: 12px;
  letter-spacing: .16em;
}

.guide-tour__head span {
  margin-top: 3px;
  color: #ba9e7e;
  font-size: 7px;
  letter-spacing: .13em;
}

.guide-close {
  width: 44px;
  min-height: 44px;
  padding: 0;
  font-family: Arial, sans-serif;
  font-size: 25px;
  line-height: 1;
}

.guide-tour__layout {
  display: grid;
  min-height: 0;
  grid-template-columns: minmax(0, 1.72fr) minmax(260px, .72fr);
  overflow: auto;
}

.guide-visual {
  min-width: 0;
  padding: 18px;
  border-right: 1px solid #4d3420;
  background: #0f0b08;
}

.guide-visual__frame {
  --guide-x: 20%;
  --guide-y: 20%;
  --guide-w: 40%;
  --guide-h: 35%;
  --callout-x: 50%;
  --callout-y: 15%;
  position: relative;
  width: 100%;
  overflow: hidden;
  aspect-ratio: 1363 / 936;
  border: 1px solid #62452d;
  background: #0c0907;
}

.guide-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.guide-highlight {
  position: absolute;
  z-index: 2;
  left: var(--guide-x);
  top: var(--guide-y);
  width: var(--guide-w);
  height: var(--guide-h);
  border: 2px solid #f0a044;
  background: rgba(240, 160, 68, .07);
  box-shadow: 0 0 0 999px rgba(3, 2, 2, .48), 0 0 0 3px rgba(255, 194, 112, .16), 0 0 22px rgba(240, 160, 68, .45);
  pointer-events: none;
}

.guide-step-badge {
  position: absolute;
  z-index: 4;
  left: var(--guide-x);
  top: var(--guide-y);
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 2px solid #16100b;
  border-radius: 50%;
  color: #17100b;
  background: #f0a044;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .55);
  font-family: var(--font-display);
  font-size: 12px;
  transform: translate(-42%, -42%);
  pointer-events: none;
}

.guide-image-callout {
  position: absolute;
  z-index: 4;
  left: var(--callout-x);
  top: var(--callout-y);
  max-width: 42%;
  padding: 6px 8px;
  border-left: 3px solid #f0a044;
  color: #fff3df;
  background: rgba(18, 12, 8, .9);
  box-shadow: 0 5px 15px rgba(0, 0, 0, .4);
  font-family: var(--font-display);
  font-size: 8px;
  font-weight: 400;
  letter-spacing: .08em;
  line-height: 1.25;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.guide-visual > small {
  display: block;
  margin-top: 8px;
  color: #8f806e;
  font-size: 8px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.guide-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: clamp(22px, 3vw, 42px);
}

.guide-copy h2 {
  margin: 12px 0 14px;
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 42px);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: .02em;
}

.guide-copy > p {
  margin: 0;
  color: #d8c9b8;
  font-size: 13px;
  line-height: 1.65;
}

.guide-tip {
  margin-top: 22px;
  padding: 12px 13px;
  border: 1px solid rgba(201, 133, 50, .34);
  border-left: 3px solid #c98532;
  background: rgba(201, 133, 50, .08);
}

.guide-tip b,
.guide-tip span {
  display: block;
}

.guide-tip b {
  color: #d99642;
  font-family: var(--font-display);
  font-size: 8px;
  letter-spacing: .13em;
}

.guide-tip span {
  margin-top: 5px;
  color: #bcae9d;
  font-size: 10px;
  line-height: 1.5;
}

.guide-nav {
  display: flex;
  min-height: 66px;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 10px 18px;
  border-top: 1px solid #52371f;
  background: #17100b;
}

.guide-progress {
  display: flex;
  width: min(380px, 46vw);
  gap: 12px;
  align-items: center;
}

.guide-progress b {
  flex: 0 0 auto;
  color: #e6c08d;
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: .08em;
}

.guide-progress span {
  display: block;
  width: 100%;
  height: 4px;
  overflow: hidden;
  background: #3b291c;
}

.guide-progress i {
  display: block;
  width: 0;
  height: 100%;
  background: #d28a35;
  transition: width .18s ease;
}

.guide-nav__buttons {
  display: flex;
  gap: 8px;
}

.guide-nav__buttons button {
  min-width: 116px;
  padding: 10px 13px;
}

.guide-nav__buttons button:disabled {
  opacity: .38;
  cursor: default;
}

@media (max-width: 760px) {
  .guide-prompt,
  .guide-tour {
    padding: 6px;
  }

  .guide-prompt__card {
    width: calc(100vw - 12px);
    padding: 24px 18px;
  }

  .guide-prompt__actions {
    flex-direction: column;
  }

  .guide-prompt__actions button {
    flex: 0 0 auto;
    width: 100%;
  }

  .guide-tour__card {
    width: calc(100vw - 12px);
    max-height: 96vh;
    max-height: 96dvh;
  }

  .guide-tour__head {
    min-height: 52px;
    padding: 7px 7px 7px 12px;
  }

  .guide-tour__layout {
    display: block;
    overflow-y: auto;
  }

  .guide-visual {
    padding: 8px;
    border-right: 0;
    border-bottom: 1px solid #4d3420;
  }

  .guide-step-badge {
    width: 27px;
    height: 27px;
    font-size: 9px;
  }

  .guide-image-callout {
    max-width: 50%;
    padding: 4px 5px;
    font-size: 6px;
  }

  .guide-visual > small {
    margin-top: 5px;
    font-size: 6px;
  }

  .guide-copy {
    display: block;
    padding: 18px 16px 20px;
  }

  .guide-copy h2 {
    margin: 8px 0 9px;
    font-size: 25px;
  }

  .guide-copy > p {
    font-size: 12px;
    line-height: 1.5;
  }

  .guide-tip {
    margin-top: 13px;
    padding: 9px 10px;
  }

  .guide-nav {
    display: grid;
    min-height: 0;
    gap: 9px;
    padding: 9px;
  }

  .guide-progress {
    width: 100%;
  }

  .guide-nav__buttons {
    display: grid;
    grid-template-columns: 1fr 1.25fr;
  }

  .guide-nav__buttons button {
    width: 100%;
    min-width: 0;
    min-height: 44px;
  }

  .guide-close {
    width: 44px;
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .guide-progress i {
    transition: none;
  }
}
