/* ============================================================
   SAMPARK APP — brand layer (matches sampark.me)
   Fonts: Fredoka (headings/buttons), Nunito (body)
   ============================================================ */

:root {
  --sp-yellow:  #FFED00;
  --sp-ink:     #17160F;
  --sp-paper:   #FBFAF5;
  --sp-sand:    #F1EFE6;
  --sp-muted:   #6B6860;
  --sp-muted-2: #8D8A7F;
  --sp-label:   #A7A395;
  --sp-border:  #ECE9DE;
  --sp-border-2:#DCD8CC;
  --sp-white:   #FFFFFF;
  --sp-font-head: 'Fredoka', sans-serif;
  --sp-font-body: 'Nunito', sans-serif;
  --sp-radius-pill: 999px;
  --sp-radius-lg: 24px;
  --sp-radius-md: 18px;
  --sp-radius-sm: 12px;
  --sp-app-width: 520px;
}

/* ---------- Global app shell ---------- */
body.sampark-app {
  font-family: var(--sp-font-body) !important;
  background: var(--sp-paper) !important;
  color: var(--sp-ink) !important;
  -webkit-font-smoothing: antialiased;
}
body.sampark-app #content {
  background: var(--sp-paper);
}
body.sampark-app .bg-header {
  background: rgba(255, 255, 255, .92) !important;
  border-bottom: 1px solid var(--sp-border) !important;
  backdrop-filter: blur(10px);
}
body.sampark-app .offcanvas.sidebar-drawer {
  background: var(--sp-paper) !important;
}
body.sampark-app .activetap {
  background: var(--sp-yellow) !important;
  border-color: var(--sp-border-2) !important;
  color: var(--sp-ink) !important;
}
/* Tag manage tabs: yellow + dark ink (never white on yellow) */
body.sampark-app .mytag-page .mytag-tab.activetap {
  background: var(--sp-yellow) !important;
  color: var(--sp-ink) !important;
}

/* Legacy theme classes → Sampark yellow primary buttons */
body.sampark-app .theme_bg,
body.sampark-app .theme_bg2,
body.sampark-app .theme_bg3,
body.sampark-app input.theme_bg,
body.sampark-app input.theme_bg2,
body.sampark-app input.theme_bg3,
body.sampark-app button.theme_bg,
body.sampark-app button.theme_bg2,
body.sampark-app button.theme_bg3,
body.sampark-app .btn.theme_bg,
body.sampark-app .btn.theme_bg2,
body.sampark-app .btn.theme_bg3,
body.sampark-app .btn-primary {
  background: var(--sp-yellow) !important;
  color: var(--sp-ink) !important;
  border: none !important;
  border-color: transparent !important;
  font-family: var(--sp-font-head) !important;
  font-weight: 600 !important;
  font-size: 16px !important;
  border-radius: var(--sp-radius-pill) !important;
  padding: 12px 22px !important;
  transition: filter .15s ease, transform .15s ease;
  box-shadow: none !important;
}
body.sampark-app .theme_bg:hover,
body.sampark-app .theme_bg2:hover,
body.sampark-app .theme_bg3:hover,
body.sampark-app .btn.theme_bg:hover,
body.sampark-app .btn.theme_bg2:hover,
body.sampark-app .btn.theme_bg3:hover,
body.sampark-app .btn-primary:hover,
body.sampark-app .btn-primary:focus,
body.sampark-app .btn-primary:active {
  background: var(--sp-yellow) !important;
  color: var(--sp-ink) !important;
  border-color: transparent !important;
  filter: brightness(.96);
}

/* Page-specific dark submit buttons → yellow */
body.sampark-app .btn-submit,
body.sampark-app .btn-primary-demo,
body.sampark-app .btn-primary-cancel,
body.sampark-app .quiz-next {
  background: var(--sp-yellow) !important;
  color: var(--sp-ink) !important;
  border: none !important;
  font-family: var(--sp-font-head) !important;
  font-weight: 600 !important;
}
body.sampark-app .btn-submit:hover,
body.sampark-app .btn-primary-demo:hover,
body.sampark-app .btn-primary-cancel:hover {
  color: var(--sp-ink) !important;
  filter: brightness(.96);
  opacity: 1 !important;
}
body.sampark-app .footer_item {
  background: var(--sp-yellow) !important;
  border-top: 1px solid var(--sp-border-2) !important;
}
body.sampark-app .footer_item a {
  color: var(--sp-ink) !important;
  font-family: var(--sp-font-head);
  font-weight: 600;
}
body.sampark-app .theHome3,
body.sampark-app .footer_item .theHome3 {
  color: var(--sp-ink) !important;
}

/* Mobile bottom nav — compact frosted glass pill */
body.sampark-app .bottom-panel {
  background: rgba(255, 255, 255, 0.52) !important;
  border: 1px solid rgba(255, 255, 255, 0.45) !important;
  box-shadow:
    0 10px 36px rgba(20, 18, 8, .1),
    0 2px 10px rgba(20, 18, 8, .05),
    inset 0 1px 0 rgba(255, 255, 255, .75),
    inset 0 -1px 0 rgba(236, 233, 222, .25) !important;
  width: 80% !important;
  max-width: 360px !important;
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%);
  bottom: calc(26px + env(safe-area-inset-bottom, 0px)) !important;
  height: auto !important;
  min-height: 54px;
  border-radius: 999px !important;
  padding: 5px 8px !important;
  -webkit-backdrop-filter: blur(26px) saturate(160%);
  backdrop-filter: blur(26px) saturate(160%);
  z-index: 100;
}
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  body.sampark-app .bottom-panel {
    background: rgba(255, 255, 255, 0.88) !important;
  }
}
body.sampark-app .bottom-panel .the_ys_s9 {
  width: 100% !important;
  max-width: 520px !important;
  margin: 0 auto !important;
  display: flex !important;
  align-items: stretch;
  justify-content: space-between;
  gap: 2px;
  padding: 0 2px;
  float: none !important;
}
body.sampark-app .bottom-panel .bp-col {
  float: none !important;
  width: auto !important;
  flex: 1 1 0;
  min-width: 0;
  height: auto !important;
  border: none !important;
}
body.sampark-app .bottom-panel .bp-col a {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 100% !important;
  height: auto !important;
  min-height: 42px;
  padding: 5px 3px 4px !important;
  border-radius: 999px;
  text-decoration: none;
  transition: background .18s ease, transform .12s ease;
}
body.sampark-app .bottom-panel .bp-col a:hover {
  background: rgba(255, 255, 255, 0.35);
}
body.sampark-app .bottom-panel .bp-col .bp-icon {
  width: auto !important;
  height: auto !important;
  padding: 0 !important;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
body.sampark-app .bottom-panel .bp-icon i {
  font-size: 1.12rem !important;
  line-height: 1;
  color: #B8B5AB !important;
  transition: color .18s ease;
}
body.sampark-app .bottom-panel .bp-text {
  width: auto !important;
  color: #C4C1B6 !important;
  font-size: 0.58rem !important;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.15;
  margin: 0 !important;
  padding: 0 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  transition: color .18s ease;
}
body.sampark-app .bottom-panel .bp-icon,
body.sampark-app .bottom-panel .theHome3,
body.sampark-app .bottom-panel .thescan3,
body.sampark-app .bottom-panel .theshop3,
body.sampark-app .bottom-panel .theprof98,
body.sampark-app .bottom-panel .themores3 {
  color: #B8B5AB !important;
}
body.sampark-app .bottom-panel .bp-col a:hover .bp-icon i,
body.sampark-app .bottom-panel .bp-col a:hover .bp-text,
body.sampark-app .bottom-panel .bp-col a:hover .theHome3,
body.sampark-app .bottom-panel .bp-col a:hover .thescan3,
body.sampark-app .bottom-panel .bp-col a:hover .theshop3,
body.sampark-app .bottom-panel .bp-col a:hover .theprof98,
body.sampark-app .bottom-panel .bp-col a:hover .themores3 {
  color: #8D8A7F !important;
}
body.sampark-app .bottom-panel .bp-col:active {
  transform: none;
}
body.sampark-app .bottom-panel .bp-col a:active {
  background: rgba(255, 237, 0, 0.4);
  transform: scale(0.97);
}
body.sampark-app .bottom-panel .bp-col a:active .bp-icon i,
body.sampark-app .bottom-panel .bp-col a:active .bp-text,
body.sampark-app .bottom-panel .bp-col a:active .theHome3,
body.sampark-app .bottom-panel .bp-col a:active .thescan3,
body.sampark-app .bottom-panel .bp-col a:active .theshop3,
body.sampark-app .bottom-panel .bp-col a:active .theprof98,
body.sampark-app .bottom-panel .bp-col a:active .themores3 {
  color: #6B6860 !important;
}
body.sampark-app .bp-col:active {
  transform: none !important;
}

/* Content clearance above floating pill + safe area */
body.sampark-app #content {
  padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)) !important;
}
body.sampark-app .app-home {
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important;
}
body.sampark-app .thehider_9302 {
  padding: 0 !important;
  margin: 0 !important;
  min-height: 0 !important;
  height: 0 !important;
  overflow: hidden;
}
body.sampark-app .thefix_btn {
  bottom: calc(96px + env(safe-area-inset-bottom, 0px)) !important;
}
body.sampark-app .form-control {
  border: 1.5px solid var(--sp-border-2) !important;
  font-family: var(--sp-font-body) !important;
  font-size: 16px !important;
  color: var(--sp-ink) !important;
}
body.sampark-app .form-control:focus {
  border-color: var(--sp-ink) !important;
  box-shadow: 0 0 0 3px rgba(255, 237, 0, .35) !important;
}

/* ---------- Sampark buttons (sampark.me .btn) ---------- */
.sp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--sp-font-head);
  font-weight: 600;
  font-size: 15px;
  padding: 13px 22px;
  border-radius: var(--sp-radius-pill);
  border: none;
  text-decoration: none;
  cursor: pointer;
  transition: filter .15s ease, transform .15s ease, background .15s ease;
  line-height: 1.2;
}
.sp-btn:hover { text-decoration: none; transform: translateY(-1px); }
.sp-btn--lg { font-size: 16px; padding: 15px 26px; }
.sp-btn--sm { font-size: 14px; padding: 10px 18px; }
.sp-btn--block { width: 100%; }
.sp-btn--yellow { background: var(--sp-yellow); color: var(--sp-ink); }
.sp-btn--yellow:hover { filter: brightness(.96); color: var(--sp-ink); }
.sp-btn--dark { background: var(--sp-yellow); color: var(--sp-ink); border: 1px solid var(--sp-border-2); }
.sp-btn--dark:hover { filter: brightness(.96); color: var(--sp-ink); }
.sp-btn--outline {
  background: transparent;
  color: var(--sp-ink);
  border: 1.5px solid var(--sp-border-2);
  font-weight: 500;
}
.sp-btn--outline:hover { border-color: var(--sp-ink); color: var(--sp-ink); }

/* ---------- Typography ---------- */
.sp-eyebrow {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  color: var(--sp-label);
  text-transform: uppercase;
  margin: 0 0 10px;
}
.sp-display {
  font-family: var(--sp-font-head);
  font-weight: 500;
  font-size: clamp(26px, 6.5vw, 34px);
  line-height: 1.08;
  letter-spacing: -.02em;
  color: var(--sp-ink);
  margin: 0 0 12px;
}
.sp-h2 {
  font-family: var(--sp-font-head);
  font-weight: 500;
  font-size: clamp(22px, 5vw, 28px);
  letter-spacing: -.01em;
  color: var(--sp-ink);
  margin: 0 0 10px;
  line-height: 1.1;
}
.sp-h3 {
  font-family: var(--sp-font-head);
  font-weight: 500;
  font-size: 17px;
  color: var(--sp-ink);
  margin: 0 0 6px;
}
.sp-lead {
  font-size: 16px;
  line-height: 1.55;
  color: var(--sp-muted);
  margin: 0 0 16px;
}
.sp-muted { color: var(--sp-muted); font-size: 14px; line-height: 1.5; }
.sp-trust {
  font-size: 12px;
  font-weight: 700;
  color: var(--sp-muted-2);
  margin: 12px 0 0;
  line-height: 1.45;
}

/* ---------- Home layout (compact, light only) ---------- */
.sampark-home#content {
  max-width: var(--sp-app-width);
  margin: 0 auto;
  padding: 50px 12px 70px !important;
  background: var(--sp-paper);
  min-height: auto !important;
}
.sampark-home .sp-warn {
  background: var(--sp-white);
  border: 1px solid #fecaca;
  color: #b91c1c;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  padding: 6px 8px;
  border-radius: 8px;
  margin: 0 0 10px;
  line-height: 1.35;
}

/* Hero */
.sp-hero-compact { margin-bottom: 10px; }
.sp-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--sp-sand);
  color: var(--sp-ink);
  border: 1px solid var(--sp-border);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--sp-radius-pill);
  margin-bottom: 8px;
}
.sp-pill .star { color: var(--sp-yellow); text-shadow: 0 0 0 var(--sp-ink); }
.sp-title {
  font-family: var(--sp-font-head);
  font-weight: 500;
  font-size: 1.2rem;
  line-height: 1.25;
  letter-spacing: -.02em;
  color: var(--sp-ink);
  margin: 0 0 6px;
}
.sp-lead {
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--sp-muted);
  margin: 0;
}

/* Action grid */
.sp-action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.sp-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 8px;
  background: var(--sp-white);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius-sm);
  text-decoration: none;
  color: var(--sp-ink);
  font-family: var(--sp-font-head);
  font-size: 0.8rem;
  font-weight: 600;
  transition: box-shadow .15s ease;
}
.sp-action:hover { box-shadow: 0 2px 8px rgba(20,18,8,.06); color: var(--sp-ink); }
.sp-action i { font-size: 1.15rem; color: var(--sp-muted); }
.sp-action--primary {
  background: var(--sp-yellow);
  border-color: var(--sp-border-2);
}
.sp-action--primary i { color: var(--sp-ink); }

/* Card */
.sampark-home .sp-card {
  background: var(--sp-white);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius-sm);
  padding: 10px 12px;
  margin-bottom: 10px;
  box-shadow: none;
}

/* Search */
.sp-search__label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--sp-ink);
  margin-bottom: 6px;
}
.sp-search .form-control {
  border-radius: var(--sp-radius-pill) !important;
  height: 40px !important;
  font-size: 14px !important;
  margin-bottom: 8px;
}
.sp-search .sp-btn {
  padding: 10px 18px;
  font-size: 14px;
}
.sp-search__loader {
  height: 20px;
  width: 20px;
  display: none;
  margin: 0 auto 6px;
}

/* Chips */
.sp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.sp-chips span {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--sp-muted);
  background: var(--sp-sand);
  border: 1px solid var(--sp-border);
  padding: 4px 8px;
  border-radius: var(--sp-radius-pill);
}

/* Carousel */
.sampark-home .sp-carousel {
  background: var(--sp-white);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius-sm);
  overflow: hidden;
  margin-bottom: 10px;
}
.sampark-home .sp-carousel .carousel-indicators { margin-bottom: 4px; }
.sampark-home .sp-carousel .carousel-indicators [data-bs-target] {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}
.sampark-home .sp-carousel .carousel-control-prev,
.sampark-home .sp-carousel .carousel-control-next {
  width: 28px;
  height: 28px;
  top: 50%;
  margin-top: -14px;
  border-radius: 50%;
  background: rgba(255,255,255,.85);
  border: 1px solid var(--sp-border);
  opacity: 1;
}
.sampark-home .sp-carousel .carousel-control-prev-icon,
.sampark-home .sp-carousel .carousel-control-next-icon {
  filter: invert(1) grayscale(1);
  width: 14px;
  height: 14px;
}

/* Quick links */
.sp-quick {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}
.sp-quick a {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 4px;
  background: var(--sp-white);
  border: 1px solid var(--sp-border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--sp-ink);
  font-size: 0.68rem;
  font-weight: 700;
}
.sp-quick a:hover { background: var(--sp-sand); color: var(--sp-ink); }
.sp-quick a i { font-size: 1rem; color: var(--sp-muted); margin-bottom: 2px; }

.sp-footnote {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--sp-muted-2);
  text-align: center;
  margin: 0 0 8px;
  line-height: 1.4;
}
.sp-footnote a {
  color: var(--sp-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Buttons — no dark variant on home */
.sampark-home .sp-btn--yellow { background: var(--sp-yellow); color: var(--sp-ink); }

/* Legacy home blocks (unused but keep light if referenced) */
.sampark-home .sp-section { margin-bottom: 10px; }
.sampark-home .sp-badge {
  background: var(--sp-sand);
  color: var(--sp-ink);
  border: 1px solid var(--sp-border);
}
.sampark-home .sp-stats {
  background: var(--sp-sand);
  border: 1px solid var(--sp-border);
}
.sampark-home .sp-stat__num { color: var(--sp-ink); }
.sampark-home .sp-stat__label { color: var(--sp-muted); }
.sampark-home .sp-ticker {
  background: var(--sp-sand);
  color: var(--sp-muted);
  border: 1px solid var(--sp-border);
}
.sampark-home .sp-game-link--hub {
  background: var(--sp-yellow);
  color: var(--sp-ink);
  border-color: var(--sp-border-2);
}
.sampark-home .sp-game-link--hub i { color: var(--sp-ink); }
.sampark-home .sp-video { background: var(--sp-sand); }
.sampark-home .sp-video__play { background: rgba(23,22,15,.5); }

/* Profile — list UI; yellow reserved for .profile-btn-primary only */
body.sampark-app .profile-page .profile-tab.activetap,
body.sampark-app .profile-page .pf-tab.activetap {
  background: #fff !important;
  color: var(--sp-ink) !important;
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
}
body.sampark-app .profile-page .theme_bg:not(.profile-btn-primary),
body.sampark-app .profile-page .theme_bg2:not(.profile-btn-primary),
body.sampark-app .profile-page .btn.theme_bg:not(.profile-btn-primary),
body.sampark-app .profile-page .btn.theme_bg2:not(.profile-btn-primary),
body.sampark-app .profile-page .btn-primary:not(.profile-btn-primary) {
  background: #f8fafc !important;
  color: #334155 !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  font-family: var(--sp-font-body) !important;
  padding: 10px 16px !important;
}
body.sampark-app .profile-page .profile-btn-primary {
  background: var(--sp-yellow) !important;
  color: var(--sp-ink) !important;
  border: none !important;
  font-family: var(--sp-font-head) !important;
}

