/* Laravel integration — handoff theme on top of legacy bootstrap stack */
html[data-handoff="1"] body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-sans);
  -webkit-font-smoothing: antialiased;
}

html[data-handoff="1"] .handoff-hide-legacy {
  display: none !important;
}

html[data-handoff="1"] .logo-img img {
  filter: brightness(0) invert(1);
  height: 36px;
  width: auto;
}

html[data-handoff="1"] .app-header .logo-img img {
  height: 36px;
}

@media (max-width: 760px) {
  html[data-handoff="1"] .app-header .logo-img img {
    height: 32px;
  }
}

html[data-handoff="1"][data-theme="light"] .logo-img img {
  filter: none;
}

html[data-handoff="1"] .alert-box {
  border-radius: var(--r-2);
  margin: var(--sp-4) auto;
  max-width: var(--maxw);
}

html[data-handoff="1"] main.handoff-main {
  min-height: calc(100vh - var(--header-h) - 120px);
  padding-top: 0;
}

html[data-handoff="1"] .cookie-bar {
  z-index: 900;
}

/* Bootstrap resets — headings/paragraphs inside handoff shell */
html[data-handoff="1"] .handoff-main,
html[data-handoff="1"] .app-header,
html[data-handoff="1"] .mobile-menu,
html[data-handoff="1"] .app-footer {
  color: var(--fg);
}

html[data-handoff="1"] .handoff-main h1,
html[data-handoff="1"] .handoff-main h2,
html[data-handoff="1"] .handoff-main h3,
html[data-handoff="1"] .handoff-main h4,
html[data-handoff="1"] .handoff-main h5,
html[data-handoff="1"] .handoff-main h6,
html[data-handoff="1"] .card h1,
html[data-handoff="1"] .card h2,
html[data-handoff="1"] .card h3,
html[data-handoff="1"] .card h4,
html[data-handoff="1"] .how-step h3,
html[data-handoff="1"] .photo-tile-overlay h3 {
  color: var(--fg);
}

html[data-handoff="1"] .handoff-main p,
html[data-handoff="1"] .card p,
html[data-handoff="1"] .how-step p {
  color: var(--fg-dim);
}

html[data-handoff="1"] .section-sub,
html[data-handoff="1"] .hero-sub {
  color: var(--fg-dim) !important;
}

html[data-handoff="1"] .handoff-main .btn {
  font-family: var(--f-sans);
}

/* Header layout — prevent nav/auth overlap on tablet */
html[data-handoff="1"] .app-header {
  position: sticky;
  top: 0;
  z-index: 200;
  isolation: isolate;
}

html[data-handoff="1"] .app-header .header-inner {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(10px, 2vw, 24px);
  min-width: 0;
  flex-wrap: nowrap !important;
  margin: 0 !important;
  height: var(--header-h);
}

html[data-handoff="1"] .header-right {
  justify-self: end;
}

html[data-handoff="1"] .app-header .logo {
  flex-shrink: 0;
  min-width: 0;
}

html[data-handoff="1"] .header-mid {
  min-width: 0;
  display: flex;
  justify-content: center;
  overflow: hidden;
}

html[data-handoff="1"] .nav-desktop {
  flex: 1;
  min-width: 0;
  justify-content: center;
  gap: clamp(10px, 1.4vw, 20px);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex-wrap: nowrap;
}

html[data-handoff="1"] .nav-desktop::-webkit-scrollbar {
  display: none;
}

html[data-handoff="1"] .nav-desktop a {
  flex-shrink: 0;
  white-space: nowrap;
}

html[data-handoff="1"] .header-right {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

html[data-handoff="1"] .icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 40px;
}

html[data-handoff="1"] .icon-btn svg {
  display: block;
  flex-shrink: 0;
}

html[data-handoff="1"] .cart-bubble {
  line-height: 0;
}

/* Mobile menu — respect [hidden] attribute (design-system forces display:block on mobile) */
html[data-handoff="1"] .mobile-menu[hidden] {
  display: none !important;
}

html[data-handoff="1"] .mobile-menu:not([hidden]) {
  display: block;
}

/* Collapse desktop nav earlier to avoid crowding auth buttons */
@media (max-width: 1100px) {
  html[data-handoff="1"] .header-mid {
    display: none;
  }

  html[data-handoff="1"] .app-header .header-inner {
    grid-template-columns: auto 1fr;
  }

  html[data-handoff="1"] .app-header .logo {
    grid-column: 1;
  }

  html[data-handoff="1"] .header-right {
    grid-column: 2;
    justify-self: end;
  }

  html[data-handoff="1"] .nav-desktop {
    display: none !important;
  }

  html[data-handoff="1"] .nav-burger {
    display: inline-flex !important;
  }
}

@media (min-width: 1101px) {
  html[data-handoff="1"] .nav-burger {
    display: none !important;
  }
}

@media (max-width: 760px) {
  html[data-handoff="1"] .header-right {
    gap: 6px;
  }

  html[data-handoff="1"] .header-right .btn-primary.btn-sm {
    padding: 0 12px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  html[data-handoff="1"] .header-right .btn-ghost.hide-mobile {
    display: none !important;
  }
}

/* CTA card on landing */
html[data-handoff="1"] .landing-cta-card {
  padding: clamp(32px, 6vw, 48px);
  text-align: center;
  background: var(--bg-2);
}

html[data-handoff="1"] .landing-cta-card h2 {
  font-size: clamp(36px, 5vw, 64px);
  letter-spacing: -0.035em;
  font-weight: 500;
  margin: 12px 0 24px;
  line-height: 0.95;
  color: var(--fg);
}

html[data-handoff="1"] .landing-cta-card h2 .serif {
  color: var(--accent);
}

/* Two paths cards */
html[data-handoff="1"] .two-paths .path-title {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 500;
  letter-spacing: -0.025em;
  margin: 0;
  line-height: 1.05;
  color: var(--fg);
}

html[data-handoff="1"] .two-paths .path-card {
  padding: 32px;
  min-height: 280px;
  display: flex;
  flex-direction: column;
}

html[data-handoff="1"] .two-paths .path-card-accent {
  background: var(--accent-soft);
  border-color: transparent;
}

/* Academy & article pages — bootstrap typography reset */
html[data-handoff="1"] .academy-title,
html[data-handoff="1"] .academy-featured-title,
html[data-handoff="1"] .academy-card-title,
html[data-handoff="1"] .article-title,
html[data-handoff="1"] .article-body h2,
html[data-handoff="1"] .article-cta h3 {
  color: var(--fg);
}

html[data-handoff="1"] .academy-lead,
html[data-handoff="1"] .academy-featured-lead,
html[data-handoff="1"] .academy-card-lead,
html[data-handoff="1"] .article-lead,
html[data-handoff="1"] .article-body p,
html[data-handoff="1"] .article-intro {
  color: var(--fg-dim);
}

html[data-handoff="1"] .article-quote {
  color: var(--fg-dim);
  border-left-color: var(--accent);
}

html[data-handoff="1"] .academy-toplist a {
  color: inherit;
  text-decoration: none;
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  align-items: start;
}

html[data-handoff="1"] a.academy-featured,
html[data-handoff="1"] a.academy-card {
  text-decoration: none;
  color: inherit;
}

html[data-handoff="1"] .academy-cats .chip {
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
}

html[data-handoff="1"] .academy-search input[type="search"] {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  height: auto;
  color: var(--fg);
}

html[data-handoff="1"] .academy-newsletter input[type="email"] {
  width: 100%;
}

html[data-handoff="1"] .pd-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  color: var(--fg-dim);
  text-decoration: none;
}

html[data-handoff="1"] .pd-back:hover {
  color: var(--fg);
}

html[data-handoff="1"] .academy-empty[hidden] {
  display: none !important;
}

html[data-handoff="1"] .academy-card[hidden] {
  display: none !important;
}

html[data-handoff="1"] .cashout-tabs .tab,
html[data-handoff="1"] .profile-tabs .tab {
  font-family: inherit;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 8px 0;
  margin-right: 16px;
  cursor: pointer;
  color: var(--fg-mute);
}

html[data-handoff="1"] .cashout-method {
  width: 100%;
  text-align: left;
  font: inherit;
  appearance: none;
}

html[data-handoff="1"] .wall-grid .wall-card {
  font: inherit;
  appearance: none;
  width: 100%;
  text-align: left;
}

html[data-handoff="1"] .handoff-main--store .pk-store-header {
  display: none;
}

html[data-handoff="1"] .handoff-main--store .product-keys-store {
  padding-top: 0;
}

html[data-handoff="1"] .handoff-main--store .pk-store-page {
  background: var(--bg);
  color: var(--fg);
}

html[data-handoff="1"] .tabs a.tab {
  text-decoration: none;
  color: var(--fg-mute);
}

html[data-handoff="1"] .tabs a.tab:hover {
  color: var(--fg);
}

/* Bootstrap modals — handoff-design-system .modal styles break display:none */
html[data-handoff="1"] .modal.fade {
  display: none !important;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1055;
  width: 100%;
  height: 100%;
  max-width: none;
  padding: 0 !important;
  margin: 0;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  overflow-x: hidden;
  overflow-y: auto;
  outline: 0;
  animation: none !important;
}

html[data-handoff="1"] .modal.fade.show {
  display: block !important;
}

html[data-handoff="1"] .modal-backdrop {
  z-index: 1050;
}

html[data-handoff="1"] .modal.fade .modal-dialog {
  margin: 1.75rem auto;
  max-width: 420px;
}

html[data-handoff="1"] .modal.fade .modal-content {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  color: var(--fg);
}

html[data-handoff="1"] .modal.fade .modal-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg-3);
}

html[data-handoff="1"] .modal.fade .modal-body {
  color: var(--fg);
}

html[data-handoff="1"] .modal.fade .form-control {
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--fg);
}

html[data-handoff="1"] .modal.fade label,
html[data-handoff="1"] .modal.fade .nav-link {
  color: var(--fg-dim);
}

html[data-handoff="1"] .modal.fade .nav-link.active {
  color: var(--fg);
  border-bottom-color: var(--accent) !important;
}

/* Auth / contact modals */
html[data-handoff="1"] .handoff-auth-modal .modal-header {
  padding: 24px 24px 0;
}

html[data-handoff="1"] .handoff-auth-modal .modal-body {
  padding: 0 24px 24px;
}

html[data-handoff="1"] .handoff-auth-modal .modal-tabs {
  display: flex;
  gap: 0;
  margin-bottom: var(--sp-5);
  border-bottom: 1px solid var(--line);
}

html[data-handoff="1"] .handoff-auth-modal .modal-tabs .tab {
  padding: 10px 0;
  margin-right: var(--sp-5);
  font-size: 13px;
  color: var(--fg-mute);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}

html[data-handoff="1"] .handoff-auth-modal .modal-tabs .tab.active {
  color: var(--fg);
  border-bottom-color: var(--accent);
}

html[data-handoff="1"] .handoff-auth-modal .oauth-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: var(--sp-4);
}

html[data-handoff="1"] .handoff-auth-modal .oauth-row .oauth {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
}

html[data-handoff="1"] .handoff-auth-modal .divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: var(--sp-4) 0;
  font-size: 11px;
  color: var(--fg-mute);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

html[data-handoff="1"] .handoff-auth-modal .divider::before,
html[data-handoff="1"] .handoff-auth-modal .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

html[data-handoff="1"] .handoff-auth-modal .handoff-modal-close {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  background-image: none !important;
}

/* Offerwall */
html[data-handoff="1"] .handoff-offerwall-modal .modal-content {
  background: var(--bg);
  border: none;
  border-radius: 0;
}

html[data-handoff="1"] .handoff-offerwall-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}

html[data-handoff="1"] .handoff-offerwall-head .modal-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

html[data-handoff="1"] .handoff-offerwall-frame {
  position: relative;
  height: calc(100vh - 56px);
  min-height: 500px;
  background: #fff;
}

html[data-handoff="1"] .handoff-offerwall-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

html[data-handoff="1"] .handoff-offerwall-loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.98);
  z-index: 2;
}

/* Store funnel */
html[data-handoff="1"] .handoff-store-page {
  padding-top: var(--sp-6);
  padding-bottom: var(--sp-8);
}

html[data-handoff="1"] .store-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

html[data-handoff="1"] .handoff-empty-card,
html[data-handoff="1"] .handoff-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: 24px;
}

html[data-handoff="1"] .handoff-empty-card {
  text-align: center;
}

html[data-handoff="1"] .handoff-alert {
  padding: 12px 16px;
  border-radius: var(--r-2);
  margin-bottom: 16px;
  font-size: 14px;
}

html[data-handoff="1"] .handoff-alert--success {
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
}

html[data-handoff="1"] .handoff-alert--error {
  background: rgba(248, 113, 113, 0.12);
  color: #fecaca;
}

html[data-handoff="1"] .handoff-cart-grid,
html[data-handoff="1"] .handoff-checkout-grid,
html[data-handoff="1"] .handoff-aff-grid {
  display: grid;
  gap: 16px;
}

@media (min-width: 992px) {
  html[data-handoff="1"] .handoff-cart-grid {
    grid-template-columns: 1fr 340px;
  }
  html[data-handoff="1"] .handoff-checkout-grid {
    grid-template-columns: 1fr 380px;
  }
  html[data-handoff="1"] .handoff-aff-grid {
    grid-template-columns: 2fr repeat(3, 1fr);
  }
}

html[data-handoff="1"] .handoff-cart-row {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  margin-bottom: 8px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
}

html[data-handoff="1"] .handoff-cart-thumb img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: var(--r-2);
}

html[data-handoff="1"] .handoff-cart-title {
  color: var(--fg);
  font-weight: 600;
  text-decoration: none;
}

html[data-handoff="1"] .handoff-cart-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

html[data-handoff="1"] .handoff-qty {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: var(--r-1);
  overflow: hidden;
}

html[data-handoff="1"] .handoff-qty button {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--bg-3);
  color: var(--fg);
  cursor: pointer;
}

html[data-handoff="1"] .handoff-qty input {
  width: 40px;
  border: none;
  text-align: center;
  background: transparent;
  color: var(--fg);
}

html[data-handoff="1"] .handoff-cart-summary,
html[data-handoff="1"] .handoff-checkout-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: 20px;
}

html[data-handoff="1"] .summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  font-size: 14px;
}

html[data-handoff="1"] .handoff-note {
  font-size: 12px;
  color: var(--fg-mute);
  margin: 0 0 8px;
}

html[data-handoff="1"] .handoff-pay-option {
  display: flex;
  gap: 10px;
  padding: 12px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  cursor: pointer;
}

html[data-handoff="1"] .handoff-pay-option.is-selected {
  border-color: var(--accent);
  background: rgba(232, 185, 72, 0.08);
}

html[data-handoff="1"] .handoff-stat-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: 16px;
}

html[data-handoff="1"] .handoff-stat-card .num {
  font-size: 1.25rem;
  font-weight: 600;
}

html[data-handoff="1"] .handoff-stat-card .lbl {
  font-size: 12px;
  color: var(--fg-mute);
}

html[data-handoff="1"] .handoff-store-filters .filter-item {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

html[data-handoff="1"] .store-browse-pagination .pagination {
  gap: 6px;
}

html[data-handoff="1"] .store-browse-pagination .page-link {
  background: var(--bg-2);
  border-color: var(--line);
  color: var(--fg-dim);
  border-radius: var(--r-pill);
  font-size: 13px;
}

html[data-handoff="1"] .store-browse-pagination .page-item.active .page-link {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

html[data-handoff="1"] .gcard {
  text-decoration: none;
  color: inherit;
}

html[data-handoff="1"] .scroller .gcard {
  flex-shrink: 0;
}

/* Hide legacy pk-store chrome when handoff index is active */
html[data-handoff="1"] .handoff-store-page .pk-store-container,
html[data-handoff="1"] main .pk-store-hero-wrap,
html[data-handoff="1"] main .store-page-bands {
  display: none !important;
}

/* Earn — offer cards as buttons + wall logos */
html[data-handoff="1"] button.offer-card {
  border: 1px solid var(--line);
  background: var(--bg-2);
  border-radius: var(--r-2);
  padding: 0;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  width: 100%;
  overflow: hidden;
  transition: border-color 0.15s ease, background 0.15s ease;
}

html[data-handoff="1"] button.offer-card:hover {
  border-color: var(--line-strong);
  background: var(--bg-3);
}

html[data-handoff="1"] .offer-card-img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
  background: var(--bg-3);
}

html[data-handoff="1"] .wall-card .wall-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  display: block;
}

html[data-handoff="1"] .wall-card.locked {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Store — tokenize legacy pk-store blocks on handoff */
html[data-handoff="1"] .handoff-store-page .pk-store-container {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}

html[data-handoff="1"] .handoff-store-page .pk-store-filters,
html[data-handoff="1"] .handoff-store-page .pk-product-card,
html[data-handoff="1"] .handoff-store-page .pk-store-band,
html[data-handoff="1"] .handoff-store-page .pk-gift-tile {
  --pk-surface: var(--bg-2);
  --pk-line: var(--line);
  color: var(--fg);
}

html[data-handoff="1"] .handoff-store-page .pk-product-card,
html[data-handoff="1"] .handoff-store-page .pk-gift-tile {
  background: var(--bg-2) !important;
  border-color: var(--line) !important;
}

html[data-handoff="1"] .handoff-store-page .pk-store-trust-bar,
html[data-handoff="1"] .handoff-store-page .pk-store-hero-wrap {
  border-color: var(--line);
}

html[data-handoff="1"] #ApiModal .modal-content {
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--fg);
}

html[data-handoff="1"] #ApiModal .modal-header,
html[data-handoff="1"] #ApiModal .modal-footer {
  border-color: var(--line);
}

html[data-handoff="1"] #ApiModal .text-white,
html[data-handoff="1"] #ApiModal .text-white-50 {
  color: var(--fg-dim) !important;
}

html[data-handoff="1"] #ApiModal #game-payout {
  color: var(--accent) !important;
}

