:root {
  color-scheme: light;
  font-family: "Kanit", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.5;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #2e49d5;
}

body {
  min-width: 280px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: #e0e0e0;
  background-color: #2e49d5;
  background-image: url("images/cjwbg-top.jpg");
  background-position: top center;
  background-repeat: no-repeat;
  user-select: none;
}

a {
  color: #1e73be;
}

.skip-link {
  position: fixed;
  z-index: 2000;
  top: 8px;
  left: 8px;
  padding: 10px 16px;
  color: #13256f;
  font-weight: 600;
  text-decoration: none;
  background: #fff;
  border-radius: 6px;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Header and navigation */
.site-header {
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(180deg, #3f38be 8.36%, #47b2e7 94.85%);
  box-shadow: 0 0 7px rgb(0 0 0 / 14%);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 1050px);
  min-height: 74px;
  margin: 0 auto;
  padding: 10px 30px 7px;
}

.site-logo img {
  width: auto;
  max-height: 47px;
}

.menu-toggle {
  position: absolute;
  z-index: 10;
  right: 24px;
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 8px;
  color: #fff;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.hamburger-icon {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 25px;
}

.hamburger-icon span {
  display: block;
  width: 100%;
  height: 3px;
  background: #fff;
  border-radius: 2px;
  box-shadow: 0 1px 2px rgb(0 0 0 / 20%);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle[aria-expanded="true"] .hamburger-icon span:first-child {
  transform: translateY(8px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .hamburger-icon span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] .hamburger-icon span:last-child {
  transform: translateY(-8px) rotate(-45deg);
}

.primary-navigation {
  display: none;
  padding: 10px 20px 20px;
  background: rgb(33 48 151 / 96%);
}

.primary-navigation ul {
  max-width: 990px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
  text-align: center;
}

.primary-navigation a {
  display: block;
  padding: 10px 15px;
  color: #fff;
  text-decoration: none;
}

.primary-navigation a:hover,
.primary-navigation a:focus-visible,
.primary-navigation a[aria-current="page"] {
  color: #dedede;
  background: rgb(255 255 255 / 8%);
}

/* Main page geometry */
.site-main {
  width: min(100%, 1050px);
  margin: 0 auto;
  padding: 116px 30px 0;
}

.homepage-heading {
  margin-bottom: 15px;
  padding: 18px 22px;
  color: #fff;
  text-align: center;
  background: rgb(20 36 108 / 34%);
  border: 1px solid rgb(255 255 255 / 20%);
  border-radius: 10px;
  box-shadow: 0 0 7px rgb(0 0 0 / 7%);
  backdrop-filter: blur(10px);
}

.homepage-eyebrow {
  margin: 0 0 4px;
  color: #dce9ff;
  font-size: 0.88rem;
}

.homepage-heading h1 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2.15rem);
  font-weight: 600;
  line-height: 1.35;
}

.homepage-summary {
  max-width: 780px;
  margin: 8px auto 0;
  color: #edf5ff;
  font-size: 0.95rem;
}

.notice-bar {
  display: flex;
  align-items: center;
  width: 100%;
  height: 48px;
  padding: 9px 20px;
  overflow: hidden;
  background: linear-gradient(199deg, #47b1e6 1.32%, #781ccd 99.58%);
  border-radius: 10px;
  box-shadow: 0 0 7px rgb(0 0 0 / 9%);
}

.notice-icon {
  flex: 0 0 35px;
}

.notice-icon img {
  width: 30px;
  opacity: 0.9;
  filter: brightness(0) invert(1);
}

.notice-viewport {
  max-width: calc(100% - 35px);
  overflow: hidden;
}

.notice-text {
  margin: 0;
  color: #fff;
  white-space: nowrap;
  animation: notice-scroll 15s linear infinite;
}

@keyframes notice-scroll {
  from { transform: translateX(100%); }
  to { transform: translateX(-100%); }
}

/* Hero, member ranking, and bonus ticker */
.hero-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "hero hero"
    "ranking bonus";
  gap: 15px 16px;
  margin: 15px auto 0;
}

.hero-banner {
  grid-area: hero;
  overflow: hidden;
  background: #222;
  border-radius: 10px;
}

.hero-banner img {
  width: 100%;
}

.ranking-card,
.bonus-card {
  height: 408px;
  overflow: hidden;
  border-radius: 10px;
}

.ranking-card {
  grid-area: ranking;
  padding: 20px;
  background-color: transparent;
  background-image: url("images/highest-bet.jpg");
  background-position: top center;
  background-repeat: no-repeat;
  background-size: 100% auto;
}

.ranking-window {
  --row-height: 56px;
  height: 260px;
  margin-top: 25%;
  overflow: hidden;
  color: #222;
  font: 600 18px/1.3 "Segoe UI", "Noto Sans Thai", sans-serif;
  border-radius: 5px;
}

.ranking-list,
.bonus-list {
  margin: 0;
  padding: 0;
  list-style: none;
  will-change: transform;
}

.ranking-list {
  animation: ranking-scroll 80s linear infinite alternate;
}

.ranking-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--row-height);
  padding: 8px 28px;
  margin-bottom: 1px;
  overflow: hidden;
  white-space: nowrap;
  background: rgb(255 255 255 / 90%);
  border-radius: 8px;
  box-shadow: 0 2px 4px rgb(0 0 0 / 6%);
}

.rank-number {
  display: flex;
  flex: 0 0 52px;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  color: #d4a93d;
  font-size: 20px;
  font-weight: 700;
  background-image: url("images/cjw-ranking-laurel.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.rank-user {
  flex: 1;
  overflow: hidden;
  color: #333;
  font-weight: 500;
  text-align: right;
  text-overflow: ellipsis;
}

.rank-vip {
  margin-left: 7px;
  color: #cd7f32;
}

@keyframes ranking-scroll {
  from { transform: translateY(0); }
  to { transform: translateY(calc(-10 * var(--row-height) + 260px)); }
}

.bonus-card {
  grid-area: bonus;
  padding: 5px 20px 20px;
  text-align: center;
  background: rgb(20 36 108 / 34%);
  box-shadow: 0 0 7px rgb(0 0 0 / 7%);
  backdrop-filter: blur(10px);
}

.bonus-heading {
  margin: 10px auto;
}

.bonus-heading img {
  width: 100%;
}

.bonus-window {
  --row-height: 42px;
  height: 260px;
  margin: 0 auto;
  padding: 20px;
  overflow: hidden;
  color: #444;
  font: 600 16px/1.2 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Thai", sans-serif;
  background: rgb(255 255 255 / 95%);
  border-radius: 10px;
}

.bonus-list {
  animation: bonus-scroll 60s linear infinite alternate;
}

.bonus-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--row-height);
  padding: 10px 6px;
  white-space: nowrap;
  border-bottom: 1px solid rgb(0 0 0 / 6%);
}

@keyframes bonus-scroll {
  from { transform: translateY(0); }
  to { transform: translateY(calc(-30 * var(--row-height) + 260px)); }
}

/* Promotion sliders */
.promo-slider {
  width: 100%;
  max-width: 100%;
  max-height: 381px;
  margin: 15px 0 25px;
  overflow: hidden;
  border-radius: 10px;
}

.promo-slider .swiper-slide {
  background: transparent;
}

.promo-slider img {
  width: 100%;
  object-fit: cover;
}

.promo-slider-mobile {
  display: none;
}

/* Main calls to action */
.service-grid {
  display: flex;
  flex-flow: row nowrap;
  justify-content: space-between;
  gap: 5px;
  margin: 15px 0;
  padding: 8px 8px 8px;
  overflow-x: auto;
  background: rgb(255 255 255 / 44%);
  border: 1px solid rgb(255 255 255 / 34%);
  border-radius: 10px;
  box-shadow: 0 0 7px rgb(0 0 0 / 7%);
  backdrop-filter: blur(10px);
}

.service-card {
  display: flex;
  flex: 0 0 calc(25% - 6px);
  align-items: center;
  justify-content: center;
}

.service-card img {
  width: 100%;
  border-radius: 20px;
  box-shadow: 0 0 7px rgb(0 0 0 / 14%);
}

.cta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 15px 0;
}

.cta-grid img {
  width: 100%;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 0 7px rgb(0 0 0 / 14%);
}

.intro-panel {
  overflow: hidden;
  background: rgb(20 36 108 / 24%);
  border-radius: 10px;
  box-shadow: 0 0 7px rgb(0 0 0 / 7%);
  backdrop-filter: blur(10px);
}

.responsible-notice-near-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 15px;
  margin-bottom: 15px;
  padding: 12px 16px;
  color: #fff;
  background: rgb(17 34 115 / 72%);
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 10px;
}

.responsible-notice-near-cta p {
  margin: 0;
}

.responsible-notice-near-cta a,
.guide-links-panel a,
.faq-panel a {
  color: #ffe49b;
  text-underline-offset: 3px;
}

.age-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: #fff;
  font-weight: 600;
  background: #d52f4b;
  border: 2px solid rgb(255 255 255 / 82%);
  border-radius: 50%;
}

.intro-content {
  min-height: 200px;
  padding: 15px 40px 0 410px;
  background-image: url("images/logo-middle-intro.png");
  background-position: 10px -77px;
  background-repeat: no-repeat;
  background-size: 388px auto;
}

.intro-content h2 {
  margin: 0 0 20px;
  color: #fff;
  font-size: 25px;
  font-weight: 400;
  line-height: 1.5;
}

.intro-content p {
  margin: 0 0 1.5em;
  color: #fff;
}

.intro-content a {
  color: #ffb819;
}

.steps-panel,
.line-banner,
.banking-panel,
.guide-links-panel,
.product-section,
.vip-panel,
.support-banner,
.seo-copy,
.faq-panel {
  margin-top: 15px;
}

.guide-links-panel,
.faq-panel {
  padding: 24px;
  color: #fff;
  background: rgb(20 36 108 / 42%);
  border: 1px solid rgb(255 255 255 / 16%);
  border-radius: 10px;
  box-shadow: 0 0 7px rgb(0 0 0 / 9%);
  backdrop-filter: blur(10px);
}

.section-heading {
  margin-bottom: 18px;
  text-align: center;
}

.section-heading p {
  margin: 0 0 3px;
  color: #cfe5ff;
  font-size: 0.88rem;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 500;
}

.guide-links-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.guide-links-grid a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  color: #fff;
  text-decoration: none;
  background: rgb(255 255 255 / 9%);
  border: 1px solid rgb(255 255 255 / 16%);
  border-radius: 10px;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.guide-links-grid a:hover,
.guide-links-grid a:focus-visible {
  color: #fff;
  background: rgb(255 255 255 / 15%);
  transform: translateY(-2px);
}

.guide-links-grid strong {
  color: #ffe49b;
  font-size: 1.05rem;
  font-weight: 500;
}

.guide-links-grid span {
  color: #e5edff;
  font-size: 0.92rem;
}

.steps-panel img,
.banking-panel img,
.support-banner img {
  width: 100%;
}

.steps-mobile {
  display: none;
}

.line-banner img {
  width: 100%;
  margin-top: 15px;
  overflow: hidden;
  border-radius: 10px;
}

.banking-panel {
  display: flex;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(175.01deg, #00a9f2 1.32%, #172d9d 99.58%);
  border-radius: 10px 10px 0 0;
  box-shadow: 0 0 7px rgb(0 0 0 / 7%);
  backdrop-filter: blur(10px);
}

.banking-panel img {
  width: auto;
}

.why-us-panel {
  display: grid;
  grid-template-columns: 44% 1fr;
  overflow: hidden;
  background: rgb(13 28 96 / 54%);
  border-top: 1px solid #246091;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 0 7px rgb(0 0 0 / 7%);
  backdrop-filter: blur(10px);
}

.support-phone {
  align-self: end;
}

.why-us-content {
  padding: 15px;
}

.why-us-heading {
  margin: 5px auto 0;
}

.why-us-content ul {
  margin: 0 0 1.5em 1.5em;
  padding: 0;
}

.why-us-content li {
  color: #efefef;
}

/* Lottery products */
.product-heading-image {
  width: min(100%, 502px);
  margin: 0 auto;
}

.lottery-heading {
  width: 100%;
  margin: 12px 0;
  padding: 7px;
  color: #fff;
  font-size: 1.15rem;
  font-weight: 400;
  text-align: center;
  background: rgb(20 36 108 / 24%);
  border-radius: 10px;
  box-shadow: 0 0 7px rgb(0 0 0 / 7%);
  backdrop-filter: blur(10px);
}

.product-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.product-card {
  display: flex;
  flex: 1 1 20%;
  justify-content: center;
  width: 100%;
  max-width: 245px;
  max-height: 79px;
  margin: 5px;
  overflow: hidden;
  background: transparent;
  border: 1px solid rgb(255 255 255 / 22%);
  border-radius: 10px;
  box-shadow: 0 0 7px rgb(0 0 0 / 10%);
}

.product-card img {
  width: 100%;
}

.product-card-wide {
  flex: 1 1 45%;
  max-width: 500px;
  max-height: 150px;
}

.product-card-full {
  flex-basis: 100%;
  max-width: 100%;
  max-height: 220px;
}

/* VIP table, support, and footer content */
.vip-panel {
  padding: 5px 20px 20px;
  overflow: hidden;
  text-align: center;
  background: rgb(20 36 108 / 34%);
  border-radius: 10px;
  box-shadow: 0 0 7px rgb(0 0 0 / 7%);
  backdrop-filter: blur(10px);
}

.vip-heading {
  width: min(100%, 340px);
  margin: 0 auto;
}

.vip-tables {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  padding-top: 20px;
  color: #222;
  background: rgb(255 255 255 / 95%);
  border-radius: 10px;
}

.vip-table-wrap {
  flex-basis: calc(50% - 20px);
  padding: 0 20px;
}

.vip-table {
  width: 100%;
  border: 0;
  border-collapse: collapse;
}

.vip-table th,
.vip-table td {
  padding: 2px;
  color: #222;
  font-size: 14px;
  font-weight: 400;
  text-align: center;
  border: 0;
}

.vip-table th {
  padding-bottom: 10px;
  font-size: 17px;
}

.support-banner {
  display: flex;
  justify-content: center;
  max-height: 248px;
  overflow: hidden;
  background: linear-gradient(175.01deg, rgb(242 0 78) 1.32%, rgb(157 23 23) 99.58%);
  border-radius: 20px;
  box-shadow: 0 0 7px rgb(0 0 0 / 7%);
  backdrop-filter: blur(10px);
}

.support-banner img {
  width: auto;
}

.support-banner a {
  display: flex;
  justify-content: center;
}

.support-link-panel {
  padding: 24px;
  color: #fff;
  text-align: center;
}

.support-link-panel h2,
.support-link-panel p {
  margin-top: 0;
}

.support-link-panel a {
  display: inline-block;
  padding: 9px 18px;
  color: #8a1822;
  font-weight: 600;
  text-decoration: none;
  background: #fff;
  border-radius: 999px;
}

.seo-copy {
  padding: 24px;
  color: #eef3ff;
  text-align: center;
  background: rgb(20 36 108 / 34%);
  border-radius: 10px;
  box-shadow: 0 0 7px rgb(0 0 0 / 7%);
  backdrop-filter: blur(10px);
}

.seo-copy h2 {
  margin: 0 0 10px;
  color: #fff;
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 500;
}

.seo-copy a {
  color: #ffe18b;
}

.seo-copy-heading {
  width: min(100%, 446px);
  margin: 0 auto;
}

.seo-copy p {
  max-width: 900px;
  margin: 0 auto 1em;
  line-height: 1.75;
}

.seo-copy p:last-child {
  margin-bottom: 0;
}

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-list details {
  overflow: hidden;
  background: rgb(255 255 255 / 9%);
  border: 1px solid rgb(255 255 255 / 16%);
  border-radius: 10px;
}

.faq-list summary {
  position: relative;
  padding: 14px 46px 14px 16px;
  color: #fff;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  position: absolute;
  top: 50%;
  right: 18px;
  content: "+";
  color: #ffe49b;
  font-size: 1.35rem;
  transform: translateY(-50%);
}

.faq-list details[open] summary::after {
  content: "−";
}

.faq-list details[open] summary {
  border-bottom: 1px solid rgb(255 255 255 / 12%);
}

.faq-list p {
  margin: 0;
  padding: 14px 16px 16px;
  color: #e5edff;
  line-height: 1.7;
}

.site-footer {
  padding: 20px;
  color: #bbc3ff;
  text-align: center;
}

.footer-inner {
  width: min(100%, 990px);
  margin: 0 auto;
}

.footer-navigation {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  margin-bottom: 10px;
}

.footer-navigation a {
  color: #f0f3ff;
  text-underline-offset: 3px;
}

.footer-navigation a:hover,
.footer-navigation a:focus-visible {
  color: #ffe49b;
}

.footer-inner p {
  margin: 0;
}

.bottom-menu {
  position: fixed;
  z-index: 1100;
  bottom: 0;
  left: 0;
  display: none;
  width: 100%;
  height: 55px;
  background-color: #0e3e92;
  background-image: url("images/fixed-bottom-menu.png");
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

.bottom-menu a {
  width: 20%;
  height: 100%;
}

@media (max-width: 940px) {
  .intro-content {
    min-height: 0;
    padding: 20px 40px 0;
    background-image: none;
  }
}

@media (max-width: 860px) {
  .support-phone {
    display: none;
  }

  .why-us-panel {
    display: block;
  }

  .why-us-content {
    max-width: 540px;
    margin: 0 auto;
  }

  .product-card {
    flex-basis: 33%;
  }
}

@media (max-width: 768px) {
  .header-inner {
    min-height: 65px;
    padding-top: 8px;
    padding-bottom: 5px;
  }

  .menu-toggle {
    display: flex;
  }

  .primary-navigation.is-open {
    display: block;
  }

  .site-main {
    padding-top: 106px;
  }

  .cta-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
  }

  .cta-grid a:last-child {
    display: none;
  }
}

@media (max-width: 640px) {
  .hero-stats-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "hero"
      "ranking"
      "bonus";
  }

  .vip-table-wrap {
    flex-basis: 100%;
  }

  .guide-links-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 540px) {
  .product-card {
    flex: 1 1 45%;
    max-width: 47%;
    border: 0;
  }

  .product-card-wide {
    flex-basis: 45%;
  }

  .product-card-full {
    flex-basis: 100%;
    max-width: 100%;
  }
}

@media (max-width: 500px) {
  body {
    padding-bottom: 73px;
  }

  .site-main {
    padding-right: 30px;
    padding-left: 30px;
  }

  .site-logo img {
    max-height: 47px;
  }

  .menu-toggle {
    right: 8px;
    width: 36px;
    opacity: 0.88;
  }

  .homepage-heading,
  .guide-links-panel,
  .seo-copy,
  .faq-panel {
    padding: 18px;
  }

  .homepage-summary {
    font-size: 0.9rem;
  }

  .responsible-notice-near-cta {
    align-items: flex-start;
    font-size: 0.9rem;
  }

  .promo-slider-desktop {
    display: none;
  }

  .promo-slider-mobile {
    display: block;
    max-height: none;
    box-shadow: 0 0 7px rgb(0 0 0 / 24%);
  }

  .steps-desktop {
    display: none;
  }

  .steps-mobile {
    display: block;
  }

  .intro-content {
    padding: 20px 20px 0;
  }

  .intro-content h2 {
    font-size: 20px;
  }

  .bottom-menu {
    display: flex;
    height: 73px;
  }
}

@media (max-width: 450px) {
  body { padding-bottom: 65px; }
  .bottom-menu { height: 65px; }
}

@media (max-width: 400px) {
  body { padding-bottom: 59px; }
  .bottom-menu { height: 59px; }
}

@media (max-width: 375px) {
  .product-card { max-width: 46%; }
}

@media (max-width: 350px) {
  body { padding-bottom: 51px; }
  .bottom-menu { height: 51px; }
}

@media (max-width: 300px) {
  body { padding-bottom: 45px; }
  .bottom-menu { height: 45px; }
}

@media (prefers-reduced-motion: reduce) {
  .notice-text,
  .ranking-list,
  .bonus-list {
    animation: none;
  }
}