:root {
  --ink: #0c1016;
  --card: #171e28;
  --line: rgba(228, 176, 122, 0.28);
  --copper: #e4b07a;
  --text: #f4efe6;
  --mute: #9aa6b5;
}

body {
  background:
    radial-gradient(900px 420px at 90% -10%, rgba(228, 176, 122, 0.16), transparent 60%),
    radial-gradient(700px 380px at -10% 20%, rgba(70, 96, 140, 0.22), transparent 55%),
    var(--ink);
  letter-spacing: 0.01em;
}

.night-glow {
  position: fixed;
  inset: auto 8% 12% auto;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: rgba(228, 176, 122, 0.08);
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
}

.site-header,
.site-main {
  position: relative;
  z-index: 1;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 10px 12px 6px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
}

.brand img {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
  background: transparent;
  box-shadow: 0 0 0 2px rgba(228, 176, 122, 0.45);
}

.brand strong {
  display: block;
  font-family: "Sora", sans-serif;
  font-size: 13px;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
}

.header-date {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--text);
  background: rgba(18, 24, 32, 0.7);
  font-size: 11px;
  white-space: nowrap;
}

.site-main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 8px 20px 96px;
}

.hero {
  padding: 18px 0 8px;
}

.eyebrow {
  color: var(--copper);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.hero h1,
.join h2 {
  font-family: "Sora", sans-serif;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.hero h1 {
  margin-top: 8px;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 0.95;
}

.lede,
.join p {
  max-width: 38rem;
  margin-top: 12px;
  color: var(--mute);
  font-size: 15px;
  line-height: 1.55;
}

.social-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 16px;
}

.social-tile {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 0;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  color: var(--text);
  text-decoration: none;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.social-tile:hover {
  transform: translateY(-2px);
  border-color: var(--line);
}

.social-tile i {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 12px;
}

.social-tile span {
  min-width: 0;
}

.social-tile strong,
.social-tile small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.social-tile strong {
  font-size: 12px;
  line-height: 1.2;
}

.social-tile small {
  color: var(--mute);
  font-size: 10px;
}

.social-wa i {
  background: rgba(37, 211, 102, 0.16);
  color: #3ddc84;
}

.social-fb i {
  background: rgba(66, 133, 244, 0.16);
  color: #7aa7ff;
}

.toolbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin: 22px 0 16px;
}

.toolbar .tabs {
  grid-column: 2;
  justify-self: center;
}

.toolbar .refresh {
  grid-column: 3;
  justify-self: end;
}

.tabs {
  display: flex;
  gap: 8px;
  padding: 4px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.tab,
.refresh {
  border: 0;
  cursor: pointer;
  font-weight: 800;
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 132px;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 12px;
  background: transparent;
  color: var(--mute);
  font-size: 13px;
}

.tab.is-active {
  background: var(--copper);
  color: #1a120b;
}

.tab.is-idle:hover {
  color: var(--text);
}

.count {
  min-width: 18px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.12);
  font-size: 10px;
}

.tab.is-idle .count {
  background: rgba(255, 255, 255, 0.08);
}

.refresh {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font-size: 13px;
}

.refresh:hover {
  background: rgba(228, 176, 122, 0.12);
}

@media (max-width: 640px) {
  .toolbar {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .toolbar .tabs,
  .toolbar .refresh {
    grid-column: 1;
    justify-self: center;
  }
}

.hot-slot {
  max-width: 720px;
  margin: 8px auto 16px;
}

.coupons-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.15rem;
  max-width: 720px;
  margin: 0 auto;
}

.coupons-grid + .coupons-grid:not(:empty) {
  margin-top: 1.25rem;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 48px 16px;
  text-align: center;
  color: var(--mute);
  font-family: "Sora", sans-serif;
}

.empty-state i {
  display: block;
  margin-bottom: 10px;
  font-size: 28px;
  color: var(--copper);
}

.coupon-fade-in {
  animation: fadeIn 0.3s ease-out forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.coupon-card {
  position: relative;
  background: #1a1a1b;
  border-radius: 20px;
  padding: 1.1rem 1rem 1.15rem;
}

.coupon-logo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #ffe600;
  border: 2px solid #2d3277;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  align-self: center;
}

.coupon-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.coupon-logo-amazon {
  background: #fff;
  border: none;
  color: #111;
  padding: 8px;
}

.coupon-footer {
  display: flex;
  align-items: center;
  width: 100%;
  margin-top: 12px;
}

.coupon-footer-split {
  justify-content: space-between;
  align-items: stretch;
  gap: 8px;
}

.coupon-footer-split .coupon-btn {
  width: auto;
  flex: 1;
  min-width: 0;
  height: 40px;
  font-size: 9px;
  padding: 0 8px;
  border-radius: 10px;
  gap: 4px;
  white-space: nowrap;
}

.coupon-footer-split .coupon-btn span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.coupon-bank-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 122px;
  height: 40px;
  background: #fff;
  border-radius: 10px;
  padding: 4px 6px;
  overflow: hidden;
  line-height: 0;
  box-sizing: border-box;
}

.coupon-bank-chip img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.coupon-bank-chip-wide {
  width: 136px;
}

.coupon-bank-chip-amazon {
  padding: 0 2px;
}

.coupon-bank-chip-amazon img {
  object-fit: contain;
  object-position: center;
  transform: scale(1.12);
}

.coupon-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 14ch;
  line-height: 1.05;
  font-size: clamp(15px, 6.2vw, 34px);
}

.coupon-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 1px auto;
  column-gap: 8px;
  align-items: center;
}

.coupon-divider {
  width: 1px;
  height: 70%;
  min-height: 44px;
  background: #9a9a9a;
  border-radius: 1px;
  align-self: center;
}

.coupon-info {
  min-width: 0;
}

.coupon-meta {
  font-size: clamp(11px, 3.3vw, 15px);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 22ch;
}

.coupon-right {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 4px;
}

.coupon-code {
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  font-size: clamp(16px, 5vw, 26px);
  text-align: center;
}

.coupon-expires {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  max-width: 100%;
  overflow: hidden;
  color: #ef4444;
  font-weight: 800;
  white-space: nowrap;
  font-size: clamp(10px, 2.9vw, 14px);
}

.coupon-expires span {
  white-space: nowrap;
}

.date-field::-webkit-calendar-picker-indicator {
  filter: invert(1);
  opacity: 1;
  cursor: pointer;
}

.coupon-btn {
  width: 100%;
  border: 0;
  background: #1a4fd8;
  color: #fff;
  font-weight: 800;
  font-size: clamp(8px, 2.4vw, 12px);
  letter-spacing: 0.01em;
  padding: 7px 8px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: normal;
  text-align: center;
  line-height: 1.15;
  cursor: pointer;
}

.coupon-btn span {
  white-space: normal;
}

.coupon-card-expired {
  opacity: 0.72;
  pointer-events: none;
}

.coupon-btn-used {
  background: rgba(80, 80, 80, 0.45);
  color: #d4d4d4;
  cursor: default;
}

.coupon-card-hot {
  border: 1px solid rgba(239, 68, 68, 0.45);
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.12), 0 10px 30px rgba(0, 0, 0, 0.35);
}

.coupon-hot-badge {
  background: #ef4444;
  color: #fff;
}

@media (min-width: 640px) {
  .coupon-card {
    padding: 1.25rem 1.25rem 1.3rem;
  }

  .coupon-logo {
    width: 60px;
    height: 60px;
  }

  .coupon-bank-chip {
    width: 130px;
    height: 44px;
    padding: 5px 7px;
  }

  .coupon-bank-chip-wide {
    width: 144px;
    height: 44px;
  }

  .coupon-footer-split .coupon-btn {
    height: 44px;
  }

  .coupon-main {
    column-gap: 10px;
  }
}

.coupon-banner {
  position: relative;
  margin: 18px 0 4px;
}

.banner-viewport {
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y;
  border-radius: 18px;
}

.banner-viewport.is-dragging {
  cursor: grabbing;
}

.banner-track {
  display: flex;
  gap: 12px;
  transition: transform 0.4s ease;
}

.coupon-banner.banner-one .banner-track {
  justify-content: center;
}

.coupon-banner.banner-one .banner-slide {
  flex: 0 1 640px;
  width: min(100%, 640px);
}

.banner-slide {
  flex: 0 0 100%;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.banner-slide-img {
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  border-radius: 16px;
  user-select: none;
  pointer-events: none;
}

.banner-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(12, 16, 22, 0.72);
  color: var(--text);
}

.banner-prev { left: 8px; }
.banner-next { right: 8px; }

.banner-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}

.banner-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(244, 239, 230, 0.28);
  border: 0;
  padding: 0;
}

.banner-dot.is-active {
  width: 18px;
  background: var(--copper);
}

.join {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(228, 176, 122, 0.12), rgba(23, 30, 40, 0.4));
}

.join h2 {
  margin-top: 6px;
  font-size: clamp(22px, 3vw, 32px);
  max-width: 16ch;
}

.join-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  background: #25d366;
  color: #06210f;
  font-weight: 800;
  text-decoration: none;
}

.wa-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: #25d366;
  color: #06210f;
  font-size: 28px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 88px;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--text);
  color: #1a120b;
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.toast i {
  color: #1f8a4c;
}

::selection {
  background: var(--copper);
  color: #1a120b;
}

@media (min-width: 720px) {
  .site-header {
    gap: 16px;
    padding: 18px 20px 8px;
  }

  .brand {
    gap: 12px;
  }

  .brand img {
    width: 56px;
    height: 56px;
  }

  .brand strong {
    font-size: 18px;
  }

  .header-date {
    gap: 8px;
    padding: 8px 12px;
    font-size: 13px;
  }

  .social-tile {
    gap: 10px;
    padding: 10px 14px;
  }

  .social-tile i {
    width: 26px;
    height: 26px;
    font-size: 14px;
  }

  .social-tile strong {
    font-size: 14px;
  }

  .social-tile small {
    font-size: 12px;
  }

  .banner-slide {
    flex-basis: calc((100% - 12px) / 2);
    height: 200px;
  }

  .coupon-banner.banner-one .banner-slide {
    flex: 0 1 520px;
    width: min(100%, 520px);
    flex-basis: auto;
  }
}

@media (min-width: 900px) {
  .coupons-grid {
    grid-template-columns: 1fr 1fr;
    max-width: 1200px;
    gap: 1.25rem;
  }

  .coupon-title {
    max-width: 16ch;
    font-size: clamp(18px, 2vw, 28px);
  }
}
