:root {
  --bg: #060806;
  --panel: #0c110d;
  --panel-2: #111812;
  --line: rgba(232, 188, 75, .2);
  --line-soft: rgba(255, 255, 255, .075);
  --gold: #edc75d;
  --gold-light: #ffe9a1;
  --gold-deep: #a96e18;
  --green: #25d67a;
  --text: #f7f6ef;
  --muted: #9ba69e;
  --danger: #ff746d;
  --shadow: 0 24px 70px rgba(0, 0, 0, .38);
  --radius: 22px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 50% -8%, rgba(232, 188, 75, .105), transparent 26rem),
    radial-gradient(circle at 8% 42%, rgba(32, 147, 83, .055), transparent 24rem),
    linear-gradient(180deg, #080b08 0%, #050705 100%);
  font-family: "Noto Sans Thai", "Leelawadee UI", Tahoma, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
[hidden] { display: none !important; }

.ambient {
  position: fixed;
  z-index: -1;
  width: 30rem;
  height: 30rem;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .09;
  pointer-events: none;
}

.ambient-one { top: 15%; left: -18rem; background: #b58222; }
.ambient-two { right: -20rem; bottom: 8%; background: #21a85d; }

.site-shell {
  width: min(100% - 32px, 820px);
  margin: 0 auto;
  padding: 52px 0 44px;
}

.hero { text-align: center; }

.hero-kicker,
.section-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  color: var(--gold);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .08em;
}

.hero-kicker i {
  width: 30px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(237, 199, 93, .7));
}

.hero-kicker i:last-child { transform: scaleX(-1); }

.status-pill {
  width: max-content;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 18px auto 0;
  padding: 8px 13px;
  border: 1px solid rgba(37, 214, 122, .22);
  border-radius: 999px;
  color: #70e5a6;
  background: rgba(37, 214, 122, .065);
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}

.status-pill b { min-width: 0; }

.status-pill span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(37, 214, 122, .09), 0 0 15px rgba(37, 214, 122, .7);
  animation: statusPulse 1.9s ease-in-out infinite;
}

.status-pill.status-closed,
.status-pill.status-draft,
.status-pill.status-scheduled { color: #f0d278; border-color: var(--line); background: rgba(232, 188, 75, .065); }
.status-pill.status-closed span,
.status-pill.status-draft span,
.status-pill.status-scheduled span { background: #d8ae46; box-shadow: 0 0 0 4px rgba(216, 174, 70, .08); animation: none; }

.hero h1 {
  margin: 17px 0 0;
  font-size: clamp(27px, 5vw, 43px);
  line-height: 1.2;
  letter-spacing: -.035em;
}

.prize-block {
  position: relative;
  width: max-content;
  max-width: 100%;
  margin: 20px auto 0;
  padding: 0 18px;
}

.prize-block > span {
  display: block;
  margin-bottom: -1px;
  color: #c4aa61;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .05em;
}

.prize-shimmer {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 7px;
  overflow: hidden;
  color: transparent;
  background: linear-gradient(105deg, #a96d17 0%, #ffe6a8 24%, #dba635 44%, #fff6c7 54%, #b6791a 74%, #f5d674 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 5px 22px rgba(235, 187, 69, .2));
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(58px, 11vw, 94px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.065em;
  animation: prizeShimmer 3.6s linear infinite;
}

.prize-shimmer small {
  font-size: .46em;
  letter-spacing: -.04em;
}

.prize-shimmer em {
  font-family: "Noto Sans Thai", "Leelawadee UI", Tahoma, sans-serif;
  font-size: .24em;
  font-style: normal;
  letter-spacing: 0;
}

.round-label {
  width: max-content;
  max-width: 100%;
  margin: 13px auto 0;
  padding: 8px 15px;
  border-radius: 999px;
  color: #d2c38d;
  background: rgba(255, 255, 255, .035);
  font-size: 14px;
  font-weight: 800;
}

.question-card,
.entry-card,
.recent-section {
  position: relative;
  margin-top: 35px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 2px);
  background: linear-gradient(145deg, rgba(237, 199, 93, .055), transparent 25%), var(--panel);
  box-shadow: var(--shadow);
}

.question-card::before,
.entry-card::before,
.recent-section::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(120deg, rgba(255, 229, 144, .25), transparent 22%, transparent 75%, rgba(177, 117, 25, .13));
}

.section-label {
  min-height: 49px;
  font-size: 15px;
  letter-spacing: .035em;
}

.section-label span { font-size: 11px; opacity: .8; }

.question-media {
  position: relative;
  overflow: hidden;
  min-height: 0;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(237, 199, 93, .2);
  border-radius: 17px;
  background: #040604;
}

.question-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.media-sheen {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 235, 176, .07) 46%, transparent 61%);
  transform: translateX(-120%);
  animation: mediaSheen 6s ease-in-out infinite;
  pointer-events: none;
}

.image-placeholder {
  min-height: 310px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  color: #746b4c;
  background: radial-gradient(circle, rgba(237, 199, 93, .07), transparent 45%);
}

.image-placeholder span {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(237, 199, 93, .25);
  border-radius: 20px;
  color: var(--gold);
  background: rgba(237, 199, 93, .055);
  font: 700 38px Georgia, serif;
}

.question-copy { padding: 24px 22px 22px; text-align: center; }
.question-copy h2 { margin: 0; font-size: clamp(22px, 4vw, 30px); line-height: 1.35; }
.question-copy p { margin: 10px auto 0; color: #c1c9c3; font-size: 16px; }
.question-copy p strong { color: var(--gold); }

.banner-slider {
  position: relative;
  margin-top: 24px;
}

.banner-viewport {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 1;
  min-height: 125px;
  border: 1px solid var(--line-soft);
  border-radius: 19px;
  background: #080b08;
  box-shadow: var(--shadow);
}

.banner-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transform: translateX(4%) scale(.985);
  transition: opacity .75s ease, transform .85s cubic-bezier(.2,.8,.2,1);
  pointer-events: none;
}

.banner-slider[data-direction="right"] .banner-slide { transform: translateX(-4%) scale(.985); }
.banner-slide.is-active { z-index: 1; opacity: 1; transform: translateX(0) scale(1) !important; pointer-events: auto; }
.banner-slide img { width: 100%; height: 100%; display: block; object-fit: cover; }

.banner-dots {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 11px;
  display: flex;
  gap: 7px;
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 999px;
  background: rgba(4, 6, 4, .72);
  backdrop-filter: blur(10px);
  transform: translateX(-50%);
}

.banner-dots button {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .35);
  cursor: pointer;
  transition: .25s ease;
}

.banner-dots button.is-active { width: 22px; background: var(--gold); box-shadow: 0 0 11px rgba(237, 199, 93, .65); }

.entry-card { padding: 27px; }

.section-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
}

.section-heading > span { color: var(--gold); font-size: 11px; }
.section-heading p { margin: 0; color: var(--gold); font-size: 13px; font-weight: 900; letter-spacing: .08em; }
.section-heading h2 { margin: 2px 0 0; font-size: 28px; line-height: 1.25; }
.form-subtitle { margin: 9px 0 23px; color: var(--muted); font-size: 15px; text-align: center; }

.opening-notice {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: -7px 0 21px;
  padding: 10px 14px;
  border: 1px solid rgba(237, 199, 93, .22);
  border-radius: 13px;
  color: #f1d57d;
  background: rgba(237, 199, 93, .055);
  font-size: 15px;
  text-align: center;
}

.opening-notice span { font-size: 19px; }
.entry-form.is-locked .form-field > div { opacity: .56; }
.entry-form.is-locked .form-field input { cursor: not-allowed; }

.entry-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
}

.form-field { display: block; }
.form-field-answer,
.form-notice,
.submit-button { grid-column: 1 / -1; }

.form-field > span {
  display: block;
  margin: 0 0 8px;
  color: #e5e7e3;
  font-size: 14px;
  font-weight: 800;
}

.form-field > span b { margin-left: 4px; color: var(--gold); }

.form-field > div {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 15px;
  border: 1px solid #29322b;
  border-radius: 13px;
  background: #080d09;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}

.form-field > div:focus-within {
  border-color: rgba(237, 199, 93, .65);
  box-shadow: 0 0 0 4px rgba(237, 199, 93, .07);
  transform: translateY(-1px);
}

.form-field i {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 8px;
  color: var(--gold);
  background: rgba(237, 199, 93, .07);
  font-style: normal;
  font-weight: 900;
}

.form-field input {
  width: 100%;
  height: 52px;
  padding: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: 16px;
}

.form-field input::placeholder { color: #657068; opacity: 1; }

.form-notice {
  padding: 11px 13px;
  border: 1px solid rgba(255, 116, 109, .2);
  border-radius: 11px;
  color: #ffaaa5;
  background: rgba(255, 116, 109, .065);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.form-notice.is-success { color: #70e6a7; border-color: rgba(37, 214, 122, .2); background: rgba(37, 214, 122, .06); }

.submit-button {
  position: relative;
  overflow: hidden;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  margin-top: 2px;
  padding: 0 22px;
  border: 0;
  border-radius: 14px;
  color: #211605;
  background: linear-gradient(105deg, #b77619, #f8d977 42%, #d39a2d 78%, #ffdf7e);
  background-size: 200% 100%;
  box-shadow: 0 13px 35px rgba(211, 154, 45, .18);
  font-size: 18px;
  font-weight: 950;
  cursor: pointer;
  transition: transform .2s, filter .2s, opacity .2s;
  animation: buttonGlow 4s ease-in-out infinite;
}

.submit-button::before {
  content: "";
  position: absolute;
  inset: -80% auto -80% -25%;
  width: 22%;
  background: rgba(255, 255, 255, .43);
  filter: blur(6px);
  transform: rotate(17deg);
  animation: buttonSheen 3.7s ease-in-out infinite;
}

.submit-button:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-2px); }
.submit-button:active:not(:disabled) { transform: translateY(0); }
.submit-button:disabled { color: #8a8f8b; background: #252b27; box-shadow: none; cursor: not-allowed; animation: none; }
.submit-button i { font-style: normal; font-size: 22px; }

.rules-box {
  margin-top: 21px;
  padding: 16px 17px;
  border: 1px solid rgba(237, 199, 93, .14);
  border-radius: 14px;
  background: rgba(237, 199, 93, .032);
}

.rules-box > strong { display: flex; align-items: center; gap: 9px; color: var(--gold); font-size: 14px; }
.rules-box > strong span { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 50%; color: #171005; background: var(--gold); }
.rules-box ul { display: grid; gap: 7px; margin: 12px 0 0; padding: 0 0 0 21px; color: #b8c0ba; font-size: 14px; }
.rules-box li::marker { color: var(--gold); }

.success-panel { padding: 27px 16px 10px; text-align: center; animation: successIn .45s cubic-bezier(.2,.9,.2,1) both; }
.success-icon { width: 70px; height: 70px; display: grid; place-items: center; margin: 0 auto 16px; border: 1px solid rgba(37, 214, 122, .28); border-radius: 50%; color: #072315; background: linear-gradient(135deg, #83efb4, #25c96f); box-shadow: 0 0 34px rgba(37, 214, 122, .18); font-size: 32px; font-weight: 950; }
.success-panel p { margin: 0; color: #65de9d; font-size: 13px; font-weight: 900; letter-spacing: .08em; }
.success-panel h2 { margin: 5px 0; font-size: 29px; }
.success-panel > span { display: block; color: #bac3bd; font-size: 16px; }
.success-panel button { min-height: 45px; margin-top: 20px; padding: 0 20px; border: 1px solid var(--line); border-radius: 11px; color: var(--gold); background: rgba(237, 199, 93, .055); font-size: 15px; font-weight: 900; cursor: pointer; }

.recent-section { padding: 23px 0; overflow: hidden; }

.recent-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: 0 24px 17px;
}

.recent-heading p { margin: 0; color: var(--gold); font-size: 12px; font-weight: 900; letter-spacing: .08em; }
.recent-heading h2 { margin: 2px 0 0; font-size: 25px; }

.participant-count {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid rgba(37, 214, 122, .15);
  border-radius: 999px;
  color: #74e3a7;
  background: rgba(37, 214, 122, .045);
  font-size: 12px;
}

.participant-count i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px rgba(37, 214, 122, .7); }
.participant-count strong { font-size: 14px; }

.recent-viewport {
  overflow: hidden;
  padding: 2px 0;
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}

.recent-track {
  width: max-content;
  display: flex;
  gap: 11px;
  padding-right: 11px;
  will-change: transform;
  animation: recentLeft var(--recent-duration, 36000ms) linear infinite;
}

.recent-section[data-direction="right"] .recent-track { animation-name: recentRight; }
.recent-viewport:hover .recent-track { animation-play-state: paused; }

.response-card {
  width: 238px;
  min-height: 72px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 23px;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #273029;
  border-radius: 14px;
  background: #090e0a;
}

.response-card > i { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid rgba(237, 199, 93, .17); border-radius: 12px; color: var(--gold); background: rgba(237, 199, 93, .07); font-style: normal; font-size: 15px; font-weight: 950; }
.response-card div { min-width: 0; }
.response-card strong,
.response-card span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.response-card strong { font-size: 14px; }
.response-card span { margin-top: 2px; color: #8f9992; font-size: 12px; }
.response-card > b { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; color: #0c2518; background: #4ade91; font-size: 11px; }

.recent-empty { margin: 0 22px; padding: 24px; border: 1px dashed #2a322d; border-radius: 14px; color: #7e8981; background: #090d0a; font-size: 14px; text-align: center; }

.quick-links { margin-top: 34px; }

.quick-links > h2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  margin: 0 0 15px;
  color: #d4b759;
  font-size: 14px;
  letter-spacing: .06em;
}

.quick-links > h2 span { width: 46px; height: 1px; background: linear-gradient(90deg, transparent, rgba(237, 199, 93, .4)); }
.quick-links > h2 span:last-child { transform: scaleX(-1); }

.quick-link-grid {
  max-width: 720px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
  margin: 0 auto;
}

.quick-button {
  position: relative;
  overflow: hidden;
  min-height: 76px;
  display: grid;
  grid-template-columns: 45px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 16px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, .2);
  transition: transform .22s ease, filter .22s ease, box-shadow .22s ease;
}

.quick-button::after { content: ""; position: absolute; inset: -80% auto -80% -20%; width: 16%; background: rgba(255, 255, 255, .24); filter: blur(8px); transform: rotate(18deg); animation: quickSheen 5s ease-in-out infinite; }
.quick-button:hover { transform: translateY(-3px); filter: brightness(1.08); }
.quick-button > i { width: 45px; height: 45px; display: grid; place-items: center; border-radius: 13px; font-style: normal; font-weight: 950; }
.quick-button > span { min-width: 0; text-align: center; }
.quick-button strong,
.quick-button small { display: block; }
.quick-button strong { font-size: 16px; }
.quick-button small { margin-top: 2px; opacity: .75; font-size: 12px; }
.quick-button > b { font-size: 24px; font-weight: 400; text-align: right; }

.signup-button { color: #faefff; background: linear-gradient(120deg, #43205c, #713498); }
.signup-button > i { color: #f3d9ff; background: rgba(255, 255, 255, .1); }
.line-button { color: #052c17; background: linear-gradient(120deg, #21d777, #46e895); }
.line-button > i { color: #fff; background: #06a94f; font-size: 11px; letter-spacing: -.04em; }

.site-footer { margin-top: 30px; text-align: center; }
.site-footer p { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0; color: #89948c; font-size: 13px; }
.site-footer p span { color: var(--green); font-size: 8px; }
.site-footer small { display: block; margin-top: 8px; color: #5d665f; font-size: 12px; }

.reveal { animation: revealUp .7s cubic-bezier(.2,.8,.2,1) both; }
.question-card { animation-delay: .08s; }
.banner-slider { animation-delay: .14s; }
.entry-card { animation-delay: .18s; }
.recent-section { animation-delay: .24s; }
.quick-links { animation-delay: .28s; }

@keyframes statusPulse { 50% { opacity: .6; transform: scale(.82); } }
@keyframes prizeShimmer { to { background-position: -220% 0; } }
@keyframes mediaSheen { 0%, 58% { transform: translateX(-120%); } 78%, 100% { transform: translateX(120%); } }
@keyframes buttonSheen { 0%, 55% { left: -25%; } 75%, 100% { left: 125%; } }
@keyframes buttonGlow { 0%, 100% { background-position: 0 0; } 50% { background-position: 100% 0; } }
@keyframes quickSheen { 0%, 60% { left: -20%; } 78%, 100% { left: 125%; } }
@keyframes recentLeft { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes recentRight { from { transform: translateX(-50%); } to { transform: translateX(0); } }
@keyframes revealUp { from { opacity: 0; transform: translateY(17px); } to { opacity: 1; transform: translateY(0); } }
@keyframes successIn { from { opacity: 0; transform: scale(.96) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } }

@media (max-width: 680px) {
  .site-shell { width: min(100% - 22px, 820px); padding-top: 34px; }
  .question-card,
  .entry-card,
  .recent-section { margin-top: 25px; border-radius: 19px; }
  .question-media { min-height: 0; border-radius: 14px; }
  .image-placeholder { min-height: 220px; }
  .question-copy { padding: 20px 14px 19px; }
  .entry-card { padding: 21px 15px; }
  .entry-form { grid-template-columns: 1fr; gap: 14px; }
  .form-field-answer,
  .form-notice,
  .submit-button { grid-column: auto; }
  .quick-link-grid { grid-template-columns: 1fr; }
  .quick-button { min-height: 72px; }
}

@media (max-width: 420px) {
  .site-shell { width: min(100% - 16px, 820px); }
  .hero-kicker { font-size: 13px; }
  .hero-kicker i { width: 18px; }
  .prize-block { padding: 0 8px; }
  .prize-shimmer { gap: 5px; font-size: clamp(52px, 18vw, 72px); }
  .question-media { min-height: 0; }
  .image-placeholder { min-height: 185px; }
  .section-heading { gap: 9px; }
  .section-heading h2 { font-size: 25px; }
  .recent-heading { align-items: flex-start; flex-direction: column; gap: 10px; padding-inline: 18px; }
  .response-card { width: 218px; }
}

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