/* Shared TikTok guide banner (+ Copy link) & Desktop QR Code modal across all landing pages */

body.in-tiktok {
  padding-top: calc(248px + env(safe-area-inset-top, 0px)) !important;
}

.in-tiktok .hero {
  min-height: calc(100dvh - 270px);
}

.guide {
  display: none;
  position: absolute;
  z-index: 20;
  top: calc(48px + env(safe-area-inset-top, 0px));
  right: calc(10px + env(safe-area-inset-right, 0px));
  width: min(296px, calc(100vw - 20px));
  padding: 13px 15px 14px;
  border-radius: 16px;
  background: #f2dca0;
  color: #2a1d06;
  text-align: left;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.5);
  animation: wisdomGuideIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.35s both;
}

.guide.show {
  display: block;
}

.guide-arrow {
  position: absolute;
  top: -40px;
  right: 16px;
  width: 24px;
  height: 30px;
  color: #f0d385;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
  animation: wisdomArrowBob 1.1s ease-in-out infinite alternate;
}

@keyframes wisdomArrowBob {
  0% { transform: translateY(2px); }
  100% { transform: translateY(-6px); }
}

@keyframes wisdomGuideIn {
  0% { opacity: 0; transform: translateY(-10px); }
  100% { opacity: 1; transform: translateY(0); }
}

.guide-close {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #5a4413;
  cursor: pointer;
  touch-action: manipulation;
}

.guide-close:active {
  background: rgba(42, 29, 6, 0.12);
}

.guide-close:focus-visible {
  outline: 2px solid #2a1d06;
  outline-offset: -3px;
}

.guide-close svg {
  width: 16px;
  height: 16px;
}

.guide-title {
  padding-right: 36px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
  text-wrap: balance;
  margin-bottom: 4px;
}

.guide-text {
  font-size: 13px;
  line-height: 1.45;
  color: #5a4413;
  text-wrap: pretty;
  margin-bottom: 10px;
}

.guide-text strong {
  color: #2a1d06;
}

.guide-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

.guide-copy {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 14px;
  border: 0;
  border-radius: 10px;
  background: #2a1d06;
  color: #fff9eb;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.16s ease, background 0.16s ease;
}

.guide-copy:hover {
  background: #3d2b0a;
}

.guide-copy:active {
  transform: scale(0.97);
}

.guide-copy.is-copied {
  background: #1d4a28;
}

.guide-copy:focus-visible {
  outline: 2px solid #2a1d06;
  outline-offset: 2px;
}

.guide-copy-status {
  font-size: 12px;
  font-weight: 600;
  color: #3d2b0a;
  line-height: 1.3;
}

.store-link.nudge {
  animation: wisdomStoreNudge 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes wisdomStoreNudge {
  0%, 100% { transform: scale(1); }
  30% { transform: scale(0.96); }
  60% { transform: scale(1.03); }
}

/* Desktop QR code trigger pill inside .store-row */
.qr-wrap {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  body.is-desktop .qr-wrap {
    display: flex;
    flex-basis: 100%;
    justify-content: inherit;
    margin-top: 2px;
  }
}

.qr-trigger {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(240, 211, 133, 0.25);
  background: rgba(240, 211, 133, 0.08);
  color: #f0d385;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.qr-trigger:hover {
  background: rgba(240, 211, 133, 0.15);
  border-color: rgba(240, 211, 133, 0.48);
  transform: translateY(-1px);
}

.qr-trigger:active {
  transform: scale(0.98);
}

.qr-trigger:focus-visible {
  outline: 2px solid #f0d385;
  outline-offset: 3px;
}

/* Native <dialog> QR modal — strict light-dismiss + backdrop scroll containment */
.qr-dialog {
  margin: auto;
  width: min(392px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 22px 22px 20px;
  border: 1px solid rgba(240, 211, 133, 0.24);
  border-radius: 22px;
  background: #151109;
  color: #fff9eb;
  text-align: center;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.72), 0 0 0 1px rgba(255, 246, 224, 0.04);
}

.qr-dialog[open] {
  display: block;
}

.qr-dialog:modal {
  overscroll-behavior: contain;
}

.qr-dialog::backdrop {
  background: rgba(9, 7, 5, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow: hidden;
  overscroll-behavior: contain;
}

.qr-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
}

.qr-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.qr-brand img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.qr-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #fff9eb;
  text-wrap: balance;
}

.qr-close {
  appearance: none;
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: -6px -8px -6px 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(244, 236, 217, 0.72);
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.qr-close:hover {
  background: rgba(255, 246, 224, 0.08);
  color: #fff9eb;
}

.qr-close:focus-visible {
  outline: 2px solid #f0d385;
  outline-offset: 2px;
}

.qr-frame {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 18px auto 14px;
  padding: 16px;
  border-radius: 18px;
  background: #fff9eb;
  border: 1px solid rgba(240, 211, 133, 0.4);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.qr-svg {
  display: block;
  width: 204px;
  height: 204px;
}

.qr-sub {
  font-size: 14px;
  line-height: 1.45;
  color: rgba(244, 236, 217, 0.78);
  max-width: 34ch;
  margin: 0 auto 16px;
  text-wrap: balance;
}

.qr-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.qr-copy {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid rgba(240, 211, 133, 0.28);
  border-radius: 12px;
  background: rgba(240, 211, 133, 0.1);
  color: #f0d385;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.qr-copy:hover {
  background: rgba(240, 211, 133, 0.18);
  border-color: rgba(240, 211, 133, 0.5);
}

.qr-copy:active {
  transform: scale(0.985);
}

.qr-copy.is-copied {
  background: rgba(74, 155, 96, 0.18);
  border-color: rgba(124, 212, 146, 0.45);
  color: #a9efc0;
}

.qr-copy:focus-visible {
  outline: 2px solid #f0d385;
  outline-offset: 3px;
}

.qr-copy-status:empty {
  display: none;
}

.qr-copy-status {
  font-size: 12.5px;
  font-weight: 500;
  color: #a9efc0;
  line-height: 1.3;
}

.qr-external {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 8px;
  color: rgba(244, 236, 217, 0.68);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.16s ease;
}

.qr-external:hover {
  color: #f0d385;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.qr-external:focus-visible {
  outline: 2px solid #f0d385;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .guide,
  .guide-arrow,
  .store-link.nudge,
  .guide-copy,
  .qr-trigger,
  .qr-copy,
  .qr-close,
  .qr-external {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
}
