/* ========== GLOBAL FONTS (Calm / Expressive) ========== */
@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700&family=Inter:wght@400;500;600&display=swap');

/* ========== BASE RESET ========== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Be Vietnam Pro', 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
body {
  margin: 0;
  background: none;
  color: var(--tier-ink, #222);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ========== GLOBAL VARIABLES (fallback) ========== */
:root {
  --tier-accent: #4f46e5;
  --tier-ink: #0f172a;
  --tier-bg1: #eef2ff;
  --tier-bg2: #ffffff;
  --tier-chip: #eef2ff;
}

/* ========== GLOBAL ELEMENTS ========== */
a { text-decoration: none; color: inherit; }
.topbar {
  padding: 12px 16px;
  font-weight: 600;
  background: var(--tier-bg1);
  border-bottom: 1px solid rgba(0,0,0,.05);
  color: var(--tier-ink);
}
.container {
  padding: 12px 14px;
  max-width: 820px;
  margin: 0 auto;
}
.card {
  background: #fff;
  border-radius: 16px;
  padding: 14px;
  margin: 10px 0;
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
}
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 768px) {
  .grid2 { grid-template-columns: 1fr; }
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 600;
  background: var(--tier-accent);
  color: #fff;
  text-align: center;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}
.btn:hover { opacity: 0.92; }
.btn-outline {
  border: 1px solid var(--tier-accent);
  color: var(--tier-accent);
  background: transparent;
}

/* ========== TABLES & LISTS ========== */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td {
  padding: 8px;
  border-bottom: 1px solid #eee;
  text-align: left;
}
.list li {
  list-style: none;
  padding: 12px 6px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ========== INPUTS ========== */
input, select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-family: inherit;
}
input:focus, select:focus {
  border-color: var(--tier-accent);
  outline: none;
}

/* ========== PROGRESS BAR ========== */
.progress {
  height: 10px;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
}
.progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--tier-accent), #ff6b6b);
  transition: width .3s ease;
}

/* ========== BADGE & CHIP ========== */
.badge, .chip {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  background: var(--tier-chip);
  color: var(--tier-ink);
}

/* ========== FOOTER TABS ========== */
.header-tabs {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid #eee;
  display: flex;
  gap: 10px;
  justify-content: space-around;
  padding: 8px 0;
  z-index: 100;
}
.header-tabs a {
  padding: 6px 10px;
  font-weight: 500;
  color: #333;
  font-family: inherit;
}
.header-tabs a[style*="font-weight:700"] {
  color: var(--tier-accent);
}

/* ========== MISC UI ========== */
.space { height: 60px; }
.small { font-size: 12px; color: #666; }
.kpi { display: flex; justify-content: space-between; text-align: center; }
.kpi .item { flex: 1; }

.banner {
  height: 140px;
  border-radius: 16px;
  background: linear-gradient(120deg, var(--tier-accent), #ffd3b6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
}

/* ========== TIER-SPECIFIC BACKGROUND CLASSES ========== */
body.tier-member { --tier-accent:#66a309; --tier-bg1:#FFFFF; }
body.tier-gold { --tier-accent:#675200; --tier-bg1:#fffadd; }
body.tier-diamond { --tier-accent:#06b6d4; --tier-bg1:#e4fcff; }
body.tier-infinite { --tier-accent:#7c3aed; --tier-bg1:#ede9fe; }

/* === Tier theming for selected cards === */
body[class^="tier-"] .card.themed {
  background: var(--tier-bg1) !important;
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 6px 20px rgba(0,0,0,.04);
}
body[class^="tier-"] .card.themed .badge,
body[class^="tier-"] .card.themed .chip {
  background: var(--tier-chip);
  color: var(--tier-ink);
}

/* ===== Variants Carousel ===== */
.hv-carousel {
  position: relative;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: #f5f3ff;
  margin: 12px 0 16px;
  box-shadow: 0 6px 16px rgba(15,23,42,.06);
}
.hv-track { display: flex; transition: transform .5s ease; will-change: transform; }
.hv-slide { min-width: 100%; aspect-ratio: 16/9; display: block; position: relative; }
.hv-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (min-width:768px){ .hv-slide{ aspect-ratio: 21/9; } }

.hv-dots {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0,0,0,.18);
  backdrop-filter: saturate(140%) blur(6px);
}
.hv-dots button {
  width: 8px; height: 8px; border-radius: 999px;
  border: 0; background: #fff; opacity: .55; cursor: pointer;
}
.hv-dots button[aria-current="true"] {
  opacity: 1; width: 18px; border-radius: 6px; transition: width .2s;
}
