/* ประกาศความเป็นส่วนตัว — ธีมคืนลอยกระทง */
:root {
  --ink: #2b2350;
  --muted: #6f6890;
  --card: rgba(255, 251, 244, 0.95);
  --orange: #ff8f6b;
  --font: "Noto Sans Thai", "Noto Sans Thai UI", "Leelawadee UI", "Thonburi", "Sukhumvit Set", Tahoma, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { background: #141a44; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font: 16px/1.7 var(--font);
  background:
    radial-gradient(1.5px 1.5px at 12% 8%, #fff8e6 50%, transparent 51%),
    radial-gradient(1px 1px at 28% 18%, #fff8e6 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 45% 6%, #fff8e6 50%, transparent 51%),
    radial-gradient(1px 1px at 62% 14%, #fff8e6 50%, transparent 51%),
    radial-gradient(2px 2px at 88% 22%, #fff8e6 50%, transparent 51%),
    radial-gradient(1px 1px at 8% 32%, #fff8e6 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 92% 40%, #fff8e6 50%, transparent 51%),
    radial-gradient(1px 1px at 20% 52%, #fff8e6 50%, transparent 51%),
    linear-gradient(180deg, #0e1240 0%, #262b74 45%, #3b3f8e 75%, #1c2a68 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

.sky { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.moon {
  position: absolute;
  top: 4%;
  right: 8%;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 38%, #fffdf0, #ffe7a6 70%);
  box-shadow: 0 0 40px 14px rgba(255, 236, 170, .35), 0 0 120px 40px rgba(255, 236, 170, .15);
}
.ff {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #eaff7a;
  box-shadow: 0 0 10px 4px rgba(225, 255, 140, .55);
  animation: glow 3.2s ease-in-out infinite;
}
.f1 { top: 22%; left: 8%; }
.f2 { top: 38%; right: 6%; animation-delay: .8s; }
.f3 { top: 62%; left: 5%; animation-delay: 1.6s; }
.f4 { top: 74%; right: 10%; animation-delay: 2.2s; }
.f5 { top: 50%; left: 50%; animation-delay: 1.1s; opacity: .6; }
@keyframes glow {
  0%, 100% { opacity: .25; transform: translate(0, 0); }
  50% { opacity: 1; transform: translate(6px, -10px); }
}

main {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 16px 140px;
}

.hero { text-align: center; color: #fff; padding: 8px 0 6px; }
.kratong {
  width: 150px;
  height: auto;
  animation: bob 3s ease-in-out infinite;
  filter: drop-shadow(0 6px 16px rgba(255, 190, 110, .35));
}
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-6px) rotate(2deg); }
}
.hero h1 {
  margin: 4px 0 2px;
  font-size: 1.75rem;
  line-height: 1.3;
  text-shadow: 0 3px 0 rgba(40, 24, 80, .6);
}
.lead { margin: 0 0 8px; color: #ffe9b0; font-weight: 600; }

.card {
  background: var(--card);
  border-radius: 22px;
  padding: 16px 18px;
  margin: 14px 0;
  box-shadow: 0 10px 30px rgba(10, 8, 40, .35);
}
.card h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
  font-size: 1.15rem;
  line-height: 1.35;
}
.card p { margin: 6px 0; }
.badge {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .95rem;
  color: #fff;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .15);
}
.b-gold { background: #f2a541; }
.b-pink { background: #ff7fa8; }
.b-green { background: #5fb37a; }
.b-blue { background: #4fb0c6; }
.b-purple { background: #8c6fd6; }
.b-orange { background: var(--orange); }

.chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
.chips li {
  background: #fff6e4;
  border: 2px solid #ffe2b0;
  border-radius: 16px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  line-height: 1.4;
}
.chips .ico { font-size: 1.4rem; }
.chips small { color: var(--muted); font-size: .85rem; margin-top: 2px; }

.nots {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.nots li {
  background: #fdeef2;
  color: #a1445e;
  border-radius: 999px;
  padding: 5px 14px 5px 10px;
  font-weight: 600;
  font-size: .95rem;
}
.nots li::before { content: "✕"; margin-right: 6px; font-weight: 800; }
.note {
  background: rgba(102, 184, 90, .14);
  color: #2d6a33;
  border-radius: 14px;
  padding: 8px 12px;
  margin-top: 12px !important;
}
.contact {
  background: rgba(124, 140, 255, .12);
  border-radius: 14px;
  padding: 8px 12px;
  font-weight: 700;
}

.back {
  display: block;
  margin: 22px auto 0;
  max-width: 320px;
  text-align: center;
  padding: 14px 18px;
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  font-weight: 700;
  font-size: 1.08rem;
  text-decoration: none;
  box-shadow: inset 0 -4px 0 #e2694a, 0 8px 20px rgba(255, 143, 107, .35);
}
.back:active { transform: translateY(2px); }
.back:focus-visible { outline: 3px solid #ffd36b; outline-offset: 3px; }

.river {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 70px;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(40px 6px at 20% 30px, rgba(160, 190, 255, .35), transparent),
    radial-gradient(50px 6px at 70% 45px, rgba(160, 190, 255, .3), transparent),
    linear-gradient(180deg, rgba(31, 46, 110, .0), #152256 35%, #101b4a);
}
.mini-kratong {
  position: absolute;
  bottom: 18px;
  left: -40px;
  width: 34px;
  height: 14px;
  border-radius: 50%;
  background: #6dbb57;
  box-shadow: 0 0 18px 6px rgba(255, 200, 120, .35);
  animation: drift 26s linear infinite;
}
.mini-kratong::before {
  content: "";
  position: absolute;
  left: 12px;
  top: -10px;
  width: 10px;
  height: 14px;
  border-radius: 50% 50% 40% 40%;
  background: #f59bc1;
}
.mini-kratong::after {
  content: "";
  position: absolute;
  left: 22px;
  top: -14px;
  width: 4px;
  height: 7px;
  border-radius: 50%;
  background: #ffd36b;
  box-shadow: 0 0 8px 3px rgba(255, 210, 120, .7);
}
@keyframes drift {
  from { transform: translateX(0) translateY(0); }
  to { transform: translateX(calc(100vw + 80px)) translateY(-4px); }
}

@media (prefers-reduced-motion: reduce) {
  .kratong, .ff, .mini-kratong { animation: none; }
}

/* เลย์เอาต์การ์ด: มือถือ 1 คอลัมน์ / แท็บเล็ต 2 / เดสก์ท็อปเต็มความกว้าง เลื่อนน้อยที่สุด */
.grid { display: grid; gap: 14px; margin-top: 10px; }
.grid .card { margin: 0; }

@media (min-width: 720px) {
  main { max-width: 920px; padding-left: 24px; padding-right: 24px; }
  .hero { display: flex; align-items: center; justify-content: center; gap: 18px; text-align: left; }
  .kratong { width: 120px; flex: 0 0 auto; }
  .hero h1 { font-size: 2rem; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .c-collect, .c-note { grid-column: 1 / -1; }
  .chips { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1100px) {
  main { max-width: min(1280px, 94vw); padding-bottom: 96px; }
  .moon { width: 110px; height: 110px; right: 5%; }
  .grid { grid-template-columns: repeat(12, 1fr); gap: 16px; }
  .c-collect { grid-column: span 8; }
  .c-not { grid-column: span 4; }
  .c-why, .c-keep, .c-local { grid-column: span 4; }
  .c-note { grid-column: 1 / -1; }
  .card { padding: 18px 20px; }
  .back { margin-top: 20px; }
}

/* จอเตี้ย (แล็ปท็อป 768px) — บีบส่วนหัวให้เนื้อหาพอดีจอ */
@media (min-width: 1100px) and (max-height: 820px) {
  .kratong { width: 96px; }
  .hero h1 { font-size: 1.75rem; }
  .hero { padding: 0; }
  .card { padding: 14px 18px; }
  .chips li { padding: 8px 12px; }
}

.credit { text-align: center; margin: 12px 0 0; font-size: .8rem; color: rgba(255, 244, 214, .7); }

/* ไม่ให้มีแถบสีขึ้นตอนแตะปุ่ม/ลิงก์บนมือถือ */
html, body, a, button { -webkit-tap-highlight-color: transparent; }
