/* LABET REWARD — Majestic Tiffany (palette in /shared/majestic-tiffany.css) */
@import url("/shared/labet-enhance.css");

:root {
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;

  --shadow-card: 0 1px 0 rgba(255,255,255,0.03) inset, 0 8px 24px rgba(0,0,0,0.4);
  --shadow-elev: 0 20px 60px rgba(0,0,0,0.55);
  --ring-gold: var(--ring-accent);

  /* Action pills — same size on all devices */
  --pill-h: 28px;
  --pill-fs: 11px;
  --pill-px: 10px;
  --pill-py: 5px;

  --btn-h: 36px;
  --btn-fs: 12.5px;
  --btn-px: 14px;

  /* Aliased from labet-enhance (reward pages load styles after import) */
  --page-gutter-x: var(--labet-gutter-x, 6px);
  --page-gutter-y: var(--labet-gutter-y, 20px);
  --page-gutter-bottom: var(--labet-gutter-bottom, 28px);
  --page-card-pad: var(--labet-card-pad, 10px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-0);
  color: var(--text);
  font-family: "Kanit", "IBM Plex Sans Thai", system-ui, sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  opacity: 1;
  background: var(--gradient-body-wash), var(--bg-0);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.serif { font-family: "Kanit", sans-serif; font-weight: 500; letter-spacing: 0.01em; }
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; }

.gold { color: var(--gold); }
.gold-bright { color: var(--gold-bright); }
.muted { color: var(--text-muted); }
.dim { color: var(--text-dim); }

/* ──────────────────────────────────────────────────────────
   Layout shell
   ────────────────────────────────────────────────────────── */
.app {
  display: grid;
  grid-template-columns: 256px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: linear-gradient(180deg, var(--bg-1) 0%, var(--bg-0) 100%);
  border-right: 1px solid var(--border);
  padding: 22px 14px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 12px;
  border-bottom: 1px solid var(--border);
}
.brand-mark {
  width: 38px; height: 38px;
  border-radius: 8px;
  background: var(--gradient-brand);
  display: grid; place-items: center;
  font-family: "Kanit", serif;
  font-weight: 700;
  font-size: 22px;
  color: var(--on-primary);
  letter-spacing: -0.02em;
  box-shadow: 0 4px 14px var(--tiff-glow);
}
.brand-name {
  font-family: "Kanit", serif;
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 0.16em;
  color: var(--text);
  line-height: 1;
}
.brand-tag {
  font-size: 9px;
  letter-spacing: 0.32em;
  color: var(--tiff-muted);
  margin-top: 4px;
  text-transform: uppercase;
}

.nav-section {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-label {
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: 6px 10px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-size: 13.5px;
  transition: all 160ms ease;
  position: relative;
}
.nav-item:hover {
  background: var(--bg-2);
  color: var(--text);
}
.icon {
  width: 18px; height: 18px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
}
.nav-item.active {
  background: linear-gradient(90deg, var(--tiff-soft), transparent);
  color: var(--tiff-bright);
}
.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0; top: 8px; bottom: 8px;
  width: 2px;
  background: var(--tiff-primary);
  border-radius: 2px;
}
.nav-badge {
  margin-left: auto;
  font-size: 10px;
  background: var(--gradient-primary);
  color: var(--on-primary);
  padding: 2px 6px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.sidebar-footer {
  margin-top: auto;
  padding: 14px 10px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 11px;
  color: var(--text-muted);
}
.sb-trust {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sb-trust .dot {
  width: 6px; height: 6px;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--success);
}

/* Main area */
.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  height: 64px;
  border-bottom: 1px solid var(--border);
  padding: 0 var(--page-gutter-x);
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(10,9,8,0.7);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.search {
  flex: 1;
  max-width: 420px;
  height: 38px;
  border-radius: 999px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 8px;
}
.search input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
}
.search input::placeholder { color: var(--text-muted); }

.tb-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.points-pill.diamonds-pill {
  background: linear-gradient(135deg, var(--tiff-soft), rgba(120, 180, 255, 0.08));
  border-color: var(--tiff-line);
}
.points-pill.diamonds-pill .coin {
  font-size: 12px;
  line-height: 1;
}
.points-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold-soft), transparent);
  border: 1px solid var(--gold-line);
  color: var(--gold-bright);
  font-weight: 500;
}
.points-pill .coin {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold-deep));
  display: grid; place-items: center;
  color: var(--on-gold);
  font-weight: 700;
  font-size: 11px;
  font-family: "Kanit", serif;
}
.points-pill .val,
.points-pill .pts { font-size: 13px; font-variant-numeric: tabular-nums; }
.points-pill .lbl { font-size: 10px; color: var(--gold); letter-spacing: 0.12em; }
.points-pill.credit-pill .coin { font-size: 10px; }

.icon-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
  position: relative;
}
.icon-btn:hover { color: var(--tiff-bright); border-color: var(--tiff-line); }
.icon-btn .badge-dot {
  position: absolute;
  top: 9px; right: 11px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--tiff-primary);
  box-shadow: 0 0 0 2px var(--bg-0);
}
.avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bg-3), var(--bg-1));
  border: 1px solid var(--tiff-line);
  display: grid; place-items: center;
  color: var(--tiff-bright);
  font-weight: 600;
  font-size: 13px;
  font-family: "Kanit", serif;
}

.content {
  padding: var(--page-gutter-y) var(--page-gutter-x) var(--page-gutter-bottom);
  width: 100%;
  max-width: none;
}

/* ──────────────────────────────────────────────────────────
   Reusable elements
   ────────────────────────────────────────────────────────── */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 10px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.28em;
  color: var(--tiff-muted);
  text-transform: uppercase;
  margin-bottom: 8px;
}
h1.page-title {
  font-family: "Kanit", serif;
  font-weight: 500;
  font-size: 40px;
  letter-spacing: 0.01em;
  margin: 0;
  line-height: 1.1;
}
.page-sub {
  color: var(--text-dim);
  margin-top: 6px;
  font-size: 14px;
}

.card {
  background: linear-gradient(180deg, var(--surface), var(--bg-1));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--page-card-pad);
  box-shadow: var(--shadow-card);
}
.card.gold-edge {
  border-color: var(--tiff-line);
  background:
    linear-gradient(180deg, var(--tiff-soft), transparent),
    linear-gradient(180deg, var(--surface), var(--bg-1));
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: var(--btn-h);
  padding: var(--pill-py) var(--btn-px);
  border-radius: 999px;
  font-weight: 500;
  font-size: var(--btn-fs);
  line-height: 1.15;
  white-space: nowrap;
  width: auto;
  max-width: 100%;
  border: 1px solid transparent;
  transition: all 160ms ease;
  box-sizing: border-box;
}
.btn-primary {
  background: var(--gradient-primary);
  color: var(--on-primary);
  box-shadow: var(--shadow-primary);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-primary-hover);
}
.btn-ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--tiff-line); color: var(--tiff-bright); }

/* List rows — Telegram channels / missions (3 columns, no wrap) */
.tg-body { padding: 0; }
.tg-row,
.channel-row {
  display: grid;
  align-items: center;
  gap: 4px 6px;
  padding: 4px 10px;
  border-bottom: 1px solid var(--border);
  min-height: 0;
}
.tg-row:last-child,
.channel-row:last-child { border-bottom: 0; }
.tg-row {
  grid-template-columns: 18px minmax(0, 1fr) auto;
  font-size: 12px;
}
.tg-trail,
.ch-trail {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex-shrink: 0;
  min-width: 0;
}
.tg-row.done { background: rgba(109, 191, 140, 0.04); }
.tg-row .mark,
.ch-mark {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  display: grid;
  place-items: center;
  font-size: 10px;
  flex-shrink: 0;
}
.tg-row .mark.ok,
.ch-mark.ok {
  background: rgba(109, 191, 140, 0.15);
  color: var(--success);
}
.tg-row .mark.x,
.ch-mark.x {
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.tg-row .nm,
.ch-name {
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 12.5px;
  line-height: 1.3;
}
.tg-row .nm .members,
.ch-name .sm {
  font-size: 10px;
  color: var(--text-muted);
  font-family: "JetBrains Mono", monospace;
  padding: 2px 6px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  flex-shrink: 0;
}
.tg-row .gem-line,
.ch-gem,
.tg-trail .gem-line,
.ch-trail .ch-gem {
  color: var(--gold-bright);
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
  flex-shrink: 0;
  margin: 0;
}
.tg-row .gem-line .gem-ic {
  width: 12px;
  height: 12px;
  display: inline-block;
  background: linear-gradient(135deg, #d8e8ff, #88b8ff 50%, #4a7fd9);
  clip-path: polygon(50% 0%, 100% 35%, 80% 100%, 20% 100%, 0% 35%);
}
.channel-row {
  grid-template-columns: 18px minmax(0, 1fr) auto;
}
.channel-row.done { background: rgba(109, 191, 140, 0.04); }

/* Compact pill actions — fixed size every device */
.ch-action,
.tg-row .act,
.btn-mini,
.bundle-head .btn,
.bundle-head .btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  flex-shrink: 0;
  width: auto !important;
  max-width: none;
  height: var(--pill-h);
  min-height: var(--pill-h);
  max-height: var(--pill-h);
  padding: 0 var(--pill-px);
  border-radius: 999px;
  font-size: var(--pill-fs);
  line-height: 1;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  box-sizing: border-box;
}
.tg-trail .act,
.ch-trail .ch-action {
  flex-shrink: 0;
}
.ch-action.join,
.tg-row .act.join {
  background: var(--gradient-primary);
  color: var(--on-primary);
  border-color: transparent;
}
.ch-action.joined,
.tg-row .act.joined {
  background: transparent;
  color: var(--success);
  border-color: rgba(109, 191, 140, 0.35);
}
.btn-mini {
  background: var(--bg-2);
  border-color: var(--border-strong);
  color: var(--text);
}

.filter-chip,
.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--pill-h);
  min-height: var(--pill-h);
  padding: 0 var(--pill-px);
  font-size: var(--pill-fs);
  line-height: 1;
  white-space: nowrap;
  border-radius: 999px;
  box-sizing: border-box;
}
.filter-chip {
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
  cursor: pointer;
}
.filter-chip.active {
  background: var(--gradient-primary);
  border-color: transparent;
  color: var(--on-primary);
  font-weight: 500;
}
.share-btn {
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text);
  gap: 8px;
}

.lottery-cta .cost {
  height: var(--pill-h);
  min-height: var(--pill-h);
  max-height: var(--pill-h);
  padding: 0 var(--pill-px);
  font-size: var(--pill-fs);
  line-height: 1;
  display: inline-flex;
  align-items: center;
  font-family: "JetBrains Mono", monospace;
  font-weight: 500;
  background: rgba(0, 0, 0, 0.18);
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
  margin: 24px 0;
}

.kbd {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* Trust footer strip */
.trust-strip {
  margin-top: 32px;
  padding: var(--page-gutter-y) var(--page-gutter-x);
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent, var(--tiff-soft));
}
.trust-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  align-items: center;
  width: 100%;
  max-width: none;
}
.trust-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-dim);
}
.trust-cell svg {
  width: 22px; height: 22px;
  color: var(--tiff-muted);
  flex-shrink: 0;
}
.trust-cell strong {
  display: block;
  color: var(--text);
  font-weight: 500;
  font-size: 12.5px;
}
.trust-cell span {
  font-size: 10.5px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* Tier ring */
.tier-ring {
  --pct: 64;
  --size: 120px;
  width: var(--size); height: var(--size);
  border-radius: 50%;
  background:
    conic-gradient(var(--gold) calc(var(--pct) * 1%), var(--bg-3) 0);
  display: grid; place-items: center;
  position: relative;
}
.tier-ring::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: var(--bg-1);
}
.tier-ring > * { position: relative; z-index: 1; text-align: center; }

/* Tag chips */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.chip.gold { background: var(--gold-soft); border-color: var(--gold-line); color: var(--gold-bright); }

/* Table-ish */
.row {
  display: grid;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  align-items: center;
  font-size: 13px;
}
.row:last-child { border-bottom: 0; }
.row:hover { background: rgba(255,255,255,0.015); }

/* Floating contact FABs */
.fab-stack {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
}

.fab-stack > * {
  pointer-events: auto;
}

.chat-fab {
  position: static;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px 12px 14px;
  background: var(--gradient-primary);
  color: var(--on-primary);
  border: 0;
  border-radius: 999px;
  font-weight: 500;
  font-size: 13px;
  box-shadow: var(--shadow-primary-hover);
}

.line-fab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px 12px 14px;
  background: linear-gradient(135deg, #1fd66a, #06c755);
  color: #fff;
  border: 0;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13px;
  box-shadow: 0 14px 40px rgba(6, 199, 85, 0.35);
  text-decoration: none;
}

.line-fab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 22px;
  padding: 0 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.95);
  color: #06c755;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.line-fab-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  line-height: 1.2;
}

.line-fab-followers {
  font-size: 10px;
  font-weight: 500;
  opacity: 0.92;
}

.chat-fab .ping {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #1a1815;
  position: relative;
  flex-shrink: 0;
}
.chat-fab .ping::after {
  content: "";
  position: absolute;
  inset: -3px;
  border: 1.5px solid #1a1815;
  border-radius: 50%;
  animation: ping 1.6s ease-out infinite;
  opacity: 0.5;
}

.chat-fab-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  line-height: 1.2;
}

.chat-fab-members {
  font-size: 10px;
  font-weight: 500;
  opacity: 0.88;
}
@keyframes ping {
  0% { transform: scale(0.6); opacity: 0.7; }
  100% { transform: scale(1.8); opacity: 0; }
}

/* Progress bar */
.progress {
  height: 6px;
  background: var(--bg-3);
  border-radius: 999px;
  overflow: hidden;
}
.progress > div {
  height: 100%;
  background: linear-gradient(90deg, var(--tiff-deep), var(--tiff-primary));
  border-radius: 999px;
}

/* Image placeholders */
.ph {
  background:
    repeating-linear-gradient(45deg, var(--tiff-soft) 0 6px, transparent 6px 12px),
    var(--bg-2);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  display: grid; place-items: center;
  color: var(--text-muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Hamburger + mobile brand (hidden on desktop) */
.hamburger {
  display: none;
  width: 38px; height: 38px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  align-items: center;
  justify-content: center;
  padding: 0;
}
.hamburger svg { width: 20px; height: 20px; }
.brand-mini {
  display: none;
  align-items: center;
  gap: 8px;
  font-family: "Kanit", serif;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.18em;
}
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 49;
}

/* ──────────────────────────────────────────────────────────
   Responsive — tablet (≤1100px) + mobile (≤700px)
   ────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .app { grid-template-columns: 1fr; }

  .sidebar {
    position: fixed;
    top: 0; left: 0;
    width: 280px;
    height: 100vh;
    z-index: 50;
    transform: translateX(-100%);
    transition: transform 220ms ease;
  }
  body.drawer-open { overflow: hidden; }
  body.drawer-open .sidebar { transform: translateX(0); box-shadow: var(--shadow-elev); animation: none; }
  body.drawer-open .sidebar-backdrop { display: block; }

  .hamburger { display: inline-flex; }
  .brand-mini { display: flex; }

  .topbar { padding: 0 var(--labet-gutter-x, var(--page-gutter-x)); gap: 10px; }
  .search { max-width: none; }
  .search .kbd { display: none; }

  .points-pill .pp-text .lbl { display: none; }
  .points-pill { padding: 6px 12px 6px 6px; }

  .settings-btn { display: none; }

  .trust-row { grid-template-columns: repeat(3, 1fr); gap: 18px; }
}

@media (max-width: 700px) {
  body { font-size: 15px; }

  .page-head .btn { width: auto; max-width: 100%; }
  .hero-actions .btn { flex: 1 1 auto; min-width: 0; justify-content: center; }
  .filter-chip {
    min-height: var(--pill-h);
    height: var(--pill-h);
    padding: 0 var(--pill-px);
    font-size: var(--pill-fs);
  }
  .mc .foot {
    flex-wrap: wrap;
    gap: 8px;
  }
  .mc .foot .foot-actions,
  .mc .foot .ch-action {
    flex: 0 0 auto;
    margin-left: auto;
  }

  .topbar { height: 58px; padding: 0 var(--labet-gutter-x-sm, 6px); gap: 8px; }
  .topbar .brand-mini span { display: none; }
  .search { height: 36px; padding: 0 10px; }
  .search input { font-size: 13px; }
  .points-pill .coin { width: 20px; height: 20px; font-size: 10px; }
  .points-pill .val,
  .points-pill .pts { font-size: 11px; }
  .points-pill { padding: 5px 8px 5px 5px; gap: 5px; }
  .tb-actions { gap: 5px; }
  .icon-btn { width: 34px; height: 34px; }
  .avatar { width: 34px; height: 34px; font-size: 12px; }

  h1.page-title { font-size: 28px; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .page-sub { font-size: 13px; }

  .card {
    padding: var(--labet-card-pad-sm, 14px);
    border-radius: var(--radius);
  }

  .trust-row { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .trust-cell { font-size: 11.5px; }
  .trust-cell strong { font-size: 12px; }

  .fab-stack { right: 14px; bottom: 14px; gap: 8px; }
  .chat-fab,
  .line-fab { padding: 10px 14px 10px 12px; font-size: 12px; min-height: 38px; }
}

@media (max-width: 520px) {
  .topbar .search { display: none; }
  .tb-actions { gap: 4px; max-width: min(58vw, 220px); }
  .points-pill .pp-text .lbl { display: none; }
  .points-pill .pp-text {
    display: block;
    min-width: 0;
  }
  .points-pill .val,
  .points-pill .pts {
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1.1;
    white-space: nowrap;
  }
  .points-pill {
    padding: 4px 6px 4px 4px;
    gap: 3px;
    min-width: 0;
    flex-shrink: 1;
  }
  .points-pill .coin {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    font-size: 9px;
  }
  .points-pill.diamonds-pill .coin { font-size: 10px; }
  .topbar .avatar { width: 32px; height: 32px; font-size: 11px; flex-shrink: 0; }
  .trust-row { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 380px) {
  .points-pill .val,
  .points-pill .pts { font-size: 9.5px; }
  .points-pill { padding: 3px 5px 3px 3px; }
  .points-pill .coin { width: 16px; height: 16px; }
}

/* ──────────────────────────────────────────────────────────
   Dashboard responsive
   ────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .hero { grid-template-columns: 1fr !important; }
  .two-col { grid-template-columns: 1fr !important; }
  .quick-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .reward-strip { grid-template-columns: repeat(2, 1fr) !important; }
  .testi-row { grid-template-columns: 1fr !important; }
  .partners { grid-template-columns: repeat(4, 1fr) !important; }
  .home-missions { grid-template-columns: 1fr !important; }
}
@media (max-width: 700px) {
  .hero-main { padding: var(--labet-card-pad-sm) !important; }
  .hero-balance { font-size: clamp(2.5rem, 14vw, 3.25rem) !important; }
  body.guest-hero .hero-balance { font-size: clamp(1.75rem, 8vw, 2.5rem) !important; }
  .hero-stats { grid-template-columns: 1fr 1fr !important; }
  .quick-grid { grid-template-columns: 1fr !important; }
  .reward-strip { grid-template-columns: 1fr !important; }
  .partners { grid-template-columns: repeat(3, 1fr) !important; padding: 14px !important; }
  .hero-actions { flex-wrap: wrap; }
  .activity .act-row { padding: 12px 16px !important; gap: 10px !important; }
  .tg-head { flex-wrap: wrap; padding: 14px 16px !important;}
  .tg-head .frac-big { font-size: 24px !important;}
  :root {
    --pill-h: 24px;
    --pill-fs: 10px;
    --pill-px: 7px;
  }
  .tg-row,
  .channel-row {
    padding: 3px 8px !important;
    gap: 3px 5px !important;
  }
  .tg-trail,
  .ch-trail {
    gap: 4px !important;
  }
  .tg-row .mark,
  .channel-row .ch-mark {
    width: 16px !important;
    height: 16px !important;
    font-size: 9px !important;
  }
  .tg-row .nm,
  .channel-row .ch-name {
    font-size: 12px !important;
  }
  .tg-row .nm .members,
  .channel-row .ch-name .sm {
    display: none;
  }
  .ref-input { flex-direction: column; align-items: stretch; gap: 8px; padding: 10px;}
  .ref-input .url {
    font-size: 11px !important;
    text-align: left;
    width: 100%;
    white-space: normal !important;
    word-break: break-all;
    overflow-wrap: anywhere;
  }
  .ref-input .btn { width: 100%; }
  .ref-strip .stats { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important;}
  .lottery-cta {
    font-size: 13px !important;
    padding: 12px 16px !important;
    flex-wrap: wrap;
    border-radius: 14px !important;
  }
  .ref-link {
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-areas: none !important;
    gap: 8px !important;
    align-items: stretch !important;
    padding: 10px !important;
  }
  .ref-link > .dim { width: 100%; }
  .ref-link .url {
    width: 100% !important;
    max-width: 100% !important;
    font-size: 11px !important;
    line-height: 1.45 !important;
    white-space: normal !important;
    word-break: break-all !important;
    overflow-wrap: anywhere !important;
    text-overflow: unset !important;
    padding: 8px 10px !important;
    background: rgba(0, 0, 0, 0.28) !important;
    border-radius: 8px !important;
  }
  .ref-link .url {
    grid-column: 1 !important;
    grid-row: auto !important;
  }
  .ref-link .btn,
  .ref-link .btn:nth-of-type(1),
  .ref-link .btn:nth-of-type(2) {
    grid-column: 1 !important;
    grid-row: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: var(--pill-h, 38px) !important;
    justify-self: stretch !important;
  }
  .copy-btn { font-size: 10px !important; padding: 2px 6px !important; }
}

/* ──────────────────────────────────────────────────────────
   Rewards page responsive
   ────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .reward-grid { grid-template-columns: repeat(3, 1fr) !important; }
  .promo-banner { grid-template-columns: 1fr !important; }
  .promo-banner .right.ph { display: none !important; }
}
@media (max-width: 700px) {
  .reward-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
  .reward-card .body { padding: 12px !important; }
  .reward-card .ttl { font-size: 12.5px !important; min-height: 0 !important; }
  .reward-card .price { font-size: 17px !important; }
  .filter-chip { padding: 0 var(--pill-px) !important; font-size: var(--pill-fs) !important; }
}
@media (max-width: 480px) {
  .reward-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 8px !important; }
  .reward-card .body { padding: 10px !important; }
  .reward-card .ttl { font-size: 12px !important; }
  .reward-card .price { font-size: 15px !important; }
}

/* ──────────────────────────────────────────────────────────
   VIP page responsive
   ────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .tier-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .concierge { grid-template-columns: 1fr !important; }
  .vip-hero h1 { font-size: 40px !important; }
  .vip-hero .stats { flex-wrap: wrap; gap: 22px !important; }
}
@media (max-width: 700px) {
  .tier-grid { grid-template-columns: 1fr !important; }
  .vip-hero { padding: var(--labet-gutter-y-sm) var(--labet-gutter-x-sm) !important; }
  .vip-hero h1 { font-size: 30px !important; }
  .vip-hero::after { font-size: 160px !important; }
  .compare table { font-size: 11.5px !important; }
  .compare th, .compare td { padding: 10px 8px !important; }
}

/* ──────────────────────────────────────────────────────────
   Wallet page responsive
   ────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .wallet-grid { grid-template-columns: 1fr !important; }
}
@media (max-width: 900px) {
  .tx-header { display: none !important; }
  .tx-row {
    grid-template-columns: 40px 1fr auto !important;
    grid-template-areas:
      "ic info pts"
      "ic meta status" !important;
    gap: 8px 12px !important;
    padding: 14px 16px !important;
  }
  .tx-row > div:nth-child(1) { grid-area: ic; }
  .tx-row > div:nth-child(2) { grid-area: info; }
  .tx-row > div:nth-child(3),
  .tx-row > div:nth-child(4) { grid-area: meta; font-size: 11px !important; color: var(--text-muted) !important; display: inline; }
  .tx-row > div:nth-child(3)::after { content: " · "; }
  .tx-row > div:nth-child(5) { grid-area: pts; }
  .tx-row > div:nth-child(6) { grid-area: status; }
}
@media (max-width: 700px) {
  .balance-card .big { font-size: 52px !important; }
  .balance-card .actions { flex-wrap: wrap; }
  .balance-card .breakdown { grid-template-columns: 1fr !important; gap: 10px !important; }
}

/* ──────────────────────────────────────────────────────────
   Profile page responsive
   ────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .profile-grid { grid-template-columns: 1fr !important; }
}
@media (max-width: 700px) {
  .form-grid { grid-template-columns: 1fr !important; }
  .form-grid .field[style*="span 2"] { grid-column: auto !important; }
  .tab-strip { overflow-x: auto; white-space: nowrap; }
  .tab-strip button { flex-shrink: 0; padding: 12px 14px !important; font-size: 12.5px !important; }
}

/* ──────────────────────────────────────────────────────────
   Support page responsive
   ────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .channels { grid-template-columns: repeat(2, 1fr) !important; }
  .faq-grid { grid-template-columns: 1fr !important; }
}
@media (max-width: 700px) {
  .channels { grid-template-columns: 1fr !important; }
  .support-hero { padding: var(--labet-gutter-y-sm) var(--labet-gutter-x-sm) !important; }
  .support-hero h1 { font-size: 30px !important; }
  .big-search { height: 48px !important; padding: 0 6px 0 16px !important; }
  .big-search .btn { height: 36px !important; padding: 0 14px !important; font-size: 12px !important; }
  .trust-card { grid-template-columns: 1fr !important; padding: var(--labet-card-pad-sm) !important; }
  .badges-row { flex-wrap: wrap; gap: 8px !important; }
}

/* ──────────────────────────────────────────────────────────
   Spin Wheel responsive
   ────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .spin-grid { grid-template-columns: 1fr !important; }
  .streak-grid { grid-template-columns: 1fr !important; }
}
@media (max-width: 700px) {
  .wheel-card { padding: var(--labet-card-pad-sm) !important; }
  .wheel-wrap { width: 280px !important; height: 280px !important; }
  .wheel-segments .seg-inner { --seg-font: 12px; }
  .wheel-segments .seg--has-img .seg-img { width: var(--seg-img-size, 48px) !important; height: var(--seg-img-size, 48px) !important; }
  .hub { width: 80px !important; height: 80px !important; }
  .wheel-meta .countdown { font-size: 26px !important; }
  .streak-row { gap: 4px !important; }
  .streak-day { font-size: 10px !important; padding: 4px; }
  .streak-day .pts { font-size: 10px !important; }
}

/* ──────────────────────────────────────────────────────────
   Codes responsive
   ────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .code-hero { grid-template-columns: 1fr !important; }
  .code-hero .right { display: none !important; }
  .active-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 900px) {
  .hist-h { display: none !important; }
  .hist-row {
    grid-template-columns: 1fr auto !important;
    grid-template-areas:
      "code val"
      "type date"
      "status status" !important;
    gap: 4px 12px !important;
    padding: 14px 16px !important;
  }
  .hist-row > div:nth-child(1) { grid-area: code; }
  .hist-row > div:nth-child(2) { grid-area: type; font-size: 11px !important; }
  .hist-row > div:nth-child(3) { grid-area: val; text-align: right; }
  .hist-row > div:nth-child(4) { grid-area: date; font-size: 11px !important; text-align: right; }
  .hist-row > div:nth-child(5) { grid-area: status; }
  .hist-row > div:nth-child(5) .stx { margin-left: 0 !important; }
}
@media (max-width: 700px) {
  .code-hero { padding: var(--labet-gutter-y-sm) var(--labet-gutter-x-sm) !important; }
  .code-hero h1 { font-size: 28px !important; }
  .active-grid { grid-template-columns: 1fr !important; }
  .redeem-form { flex-direction: column; gap: 8px; padding: 10px; }
  .redeem-form input { font-size: 14px !important; padding: 10px; text-align: center; }
  .redeem-form .btn { width: 100%; }
}

/* ──────────────────────────────────────────────────────────
   Referral link box (reward referrals + share mission)
   ────────────────────────────────────────────────────────── */
.ref-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-rows: auto auto;
  gap: 8px 10px;
  align-items: center;
}
.ref-link > .dim {
  grid-column: 1 / -1;
}
.ref-link .url {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  color: var(--gold-bright);
  letter-spacing: 0.04em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ref-link .btn {
  grid-row: 2;
  align-self: center;
}
.ref-link .btn:nth-of-type(1) { grid-column: 2; }
.ref-link .btn:nth-of-type(2) { grid-column: 3; }
.ref-link .btn:only-of-type { grid-column: 2; }

/* ──────────────────────────────────────────────────────────
   Referrals responsive
   ────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .ref-hero { grid-template-columns: 1fr !important; }
  .how-row { grid-template-columns: 1fr !important; }
  .lb-grid { grid-template-columns: 1fr !important; }
  .tier-reward-row { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 700px) {
  .ref-hero { padding: var(--labet-gutter-y-sm) var(--labet-gutter-x-sm) !important; margin-bottom: 12px !important; gap: 14px !important; }
  .ref-hero h1 { font-size: 28px !important; }
  .ref-hero .reward-line { margin-bottom: 12px !important; }
  .ref-hero .right-stats { grid-template-columns: 1fr 1fr !important; padding: 12px !important; }
  .rs-cell .v { font-size: 26px !important; }
  .ref-tier-cards { gap: 10px !important; margin-bottom: 14px !important; }
  .share-row { gap: 6px !important; }
  .share-row .share-btn { flex: 1 1 calc(50% - 6px); min-width: 0; justify-content: center; }
  .share-btn { padding: 8px 10px !important; font-size: 11px !important; }
  .lb-row { grid-template-columns: 30px 32px 1fr auto !important; padding: 12px 16px !important; }
  .team-row { padding: 12px 16px !important; }
  .team-row .badge-tier { display: none; }
}

/* ──────────────────────────────────────────────────────────
   Missions responsive
   ────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .miss-hero { grid-template-columns: 1fr !important; }
  .how-strip { grid-template-columns: repeat(2, 1fr) !important; }
  .mc-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .miss-stats { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 700px) {
  .miss-hero { padding: var(--labet-gutter-y-sm) var(--labet-gutter-x-sm) !important; }
  .miss-hero h1 { font-size: 28px !important; }
  .gem-balance .v { font-size: 48px !important; }
  .how-strip { grid-template-columns: 1fr !important; padding: 14px 16px !important; }
  .mc-grid { grid-template-columns: 1fr !important; }
  .bundle-head { flex-wrap: wrap; padding: 14px 16px !important; gap: 10px !important;}
  .bundle-head .reward { border-left: 0 !important; padding-left: 0 !important;}
  .channel-row .ch-name {
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .daily-row { grid-template-columns: 36px 1fr !important; gap: 10px; padding: 12px 0 !important;}
  .daily-row .reward-pill { grid-column: 2; justify-self: start; }
  .daily-row .ch-action { grid-column: 2; justify-self: start; }
  .redeem-bar { flex-direction: column; align-items: flex-start; padding: 18px !important;}
  .redeem-bar .btn { width: 100%; justify-content: center;}
  .miss-tabs-wrap { max-width: 100%; }
  .miss-tabs {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    width: 100%;
    max-width: 100%;
  }
  .miss-tabs button { flex-shrink: 0; }
}

/* ──────────────────────────────────────────────────────────
   Events responsive
   ────────────────────────────────────────────────────────── */
@media (max-width: 1280px) {
  .events-grid { grid-template-columns: 240px 1fr !important; }
  .events-grid .detail { grid-column: 1 / -1 !important; margin-top: 14px;}
}
@media (max-width: 1100px) {
  .live-strip { grid-template-columns: 1fr !important; }
  .events-grid { grid-template-columns: 1fr !important; }
  .events-grid .cat-rail { display: none !important; }
  .detail-banner { font-size: 16px !important; aspect-ratio: 16/7 !important; }
}
@media (max-width: 700px) {
  .detail-head { padding: 18px !important; }
  .detail-head .subj { font-size: 22px !important; }
  .detail-banner { margin: 14px 18px !important; }
  .detail-body { padding: 6px 18px 20px !important; }
  .msg-item { padding: 12px 14px !important; }
  .msg-item.active { padding-left: 12px !important; }
}
