html { scroll-behavior: smooth; }

:root {
  --dark-coffee: #2b160c;
  --premium-brown: #3b2a1f;
  --coffee-brown: #6b3f1d;
  --caramel: #a76b2a;
  --gold: #c79a3b;
  --soft-gold: #d9a441;
  --cream: #f6f0e6;
  --light-cream: #fff7e8;
  --card-cream: #fffaf0;
  --ink: #2b160c;
}

body {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans Thai", "Tahoma", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(217, 164, 65, 0.25), transparent 28rem),
    radial-gradient(circle at 92% 8%, rgba(107, 63, 29, 0.18), transparent 20rem),
    linear-gradient(135deg, #fffaf0 0%, #f6f0e6 48%, #ead7b6 100%);
}

button, input, select, a { min-height: 44px; }
summary { list-style-position: inside; }
img { max-width: 100%; }
.min-w-0 { min-width: 0; }
.overflow-x-auto { overflow-x: auto; }

.premium-header {
  min-height: 70px;
  background:
    linear-gradient(90deg, rgba(43, 22, 12, 0.96), rgba(59, 42, 31, 0.98)),
    radial-gradient(circle at right, rgba(199, 154, 59, 0.28), transparent 18rem);
  box-shadow: 0 12px 36px rgba(43, 22, 12, 0.22);
}

.premium-logo {
  max-height: 50px;
  width: auto;
  object-fit: contain;
}

.premium-card {
  min-width: 0;
  border: 1px solid rgba(199, 154, 59, 0.34);
  background:
    linear-gradient(145deg, rgba(255, 250, 240, 0.96), rgba(255, 247, 232, 0.9)),
    radial-gradient(circle at top right, rgba(217, 164, 65, 0.16), transparent 14rem);
  border-radius: 22px;
  box-shadow: 0 20px 50px rgba(77, 43, 17, 0.13), inset 0 1px 0 rgba(255,255,255,0.75);
}

.treasure-card {
  background:
    linear-gradient(145deg, rgba(59, 42, 31, 0.98), rgba(107, 63, 29, 0.96)),
    radial-gradient(circle at 25% 20%, rgba(217, 164, 65, 0.36), transparent 12rem);
  color: var(--light-cream);
  border-radius: 22px;
  box-shadow: 0 20px 55px rgba(43, 22, 12, 0.28);
}

.gold-text {
  background: linear-gradient(180deg, #f4cc68 0%, #c77e00 88%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 8px 28px rgba(199, 154, 59, 0.18);
}

.btn-premium {
  background: linear-gradient(135deg, var(--coffee-brown), #3b1e0e 55%, var(--gold));
  color: white;
  border-radius: 14px;
  box-shadow: 0 12px 24px rgba(107, 63, 29, 0.24);
  transition: transform .18s ease, box-shadow .18s ease;
}

.btn-premium:hover { transform: translateY(-1px); box-shadow: 0 16px 30px rgba(107, 63, 29, 0.28); }

.btn-gold {
  background: linear-gradient(135deg, #f0c765, var(--gold), #9a632c);
  color: #2b160c;
  border-radius: 14px;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(199, 154, 59, 0.3);
}

.success-box {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(22, 163, 74, 0.22);
  background: linear-gradient(135deg, #effdf4, #dcfce7);
  border-radius: 20px;
  box-shadow: 0 18px 40px rgba(22, 101, 52, 0.12);
}

.success-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: #16a34a;
  color: white;
  font-weight: 900;
}

.progress-track {
  height: 16px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(107, 63, 29, 0.14);
  box-shadow: inset 0 1px 4px rgba(43, 22, 12, 0.18);
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #f4cc68, #c79a3b, #8d570d);
  box-shadow: 0 0 18px rgba(217, 164, 65, 0.48);
}

.stamp-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(48px, 1fr));
  gap: .7rem;
  min-width: 620px;
}

.stamp-dot {
  position: relative;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 2px dashed rgba(107, 63, 29, .35);
  background: rgba(255, 255, 255, .48);
  color: rgba(43, 22, 12, .72);
  font-weight: 900;
  line-height: 1;
}

.stamp-dot.is-earned {
  border: 0;
  background: radial-gradient(circle at 32% 26%, #fff3ad, #d9a441 52%, #9d620d 100%);
  color: white;
  box-shadow: 0 10px 20px rgba(199, 154, 59, .26);
}

.stamp-dot .stamp-check {
  position: absolute;
  bottom: -10px;
  font-size: .75rem;
  color: #15803d;
  background: #ecfdf5;
  border-radius: 999px;
  padding: 1px 6px;
}

.stamp-badge {
  position: absolute;
  top: -9px;
  right: -9px;
  border-radius: 999px;
  background: #7a271a;
  color: white;
  padding: 2px 6px;
  font-size: .68rem;
  box-shadow: 0 6px 12px rgba(122, 39, 26, .18);
}

.reward-card {
  border-radius: 20px;
  border: 1px solid rgba(199, 154, 59, .28);
  background: linear-gradient(145deg, rgba(255, 250, 240, .98), rgba(255, 247, 232, .86));
  box-shadow: 0 14px 34px rgba(77, 43, 17, .1);
}

.reward-art {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: radial-gradient(circle at 30% 20%, #fff4b5, #d9a441 70%);
  font-size: 1.65rem;
}

.coin-stage { pointer-events: none; position: absolute; inset: 0; overflow: hidden; }
.floating-star {
  position: absolute;
  left: var(--x);
  bottom: 8%;
  animation: floatUp 1.35s ease-out forwards;
  color: var(--gold);
  font-size: var(--s);
  filter: drop-shadow(0 8px 10px rgba(199, 154, 59, .34));
}
.star-burst { animation: popScale .55s ease-out both, sparkle 1.25s ease-in-out infinite; }

@keyframes floatUp {
  from { transform: translateY(22px) scale(.7) rotate(0deg); opacity: 0; }
  20% { opacity: 1; }
  to { transform: translateY(-140px) scale(1.1) rotate(22deg); opacity: 0; }
}

@keyframes popScale {
  0% { transform: scale(.72); opacity: .2; }
  70% { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes sparkle {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(217, 164, 65, 0)); }
  50% { filter: drop-shadow(0 0 20px rgba(217, 164, 65, .68)); }
}

@media (max-width: 640px) {
  .premium-header { min-height: 62px; }
  .premium-logo { max-height: 42px; }
  .stamp-grid { min-width: 520px; gap: .55rem; grid-template-columns: repeat(10, 42px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
