:root {
  --bg: #050505;
  --surface: #050505;
  --footer: #050505;
  --line: #00e5ff;
  --text: #f6f3ea;
  --muted: #b7c3d6;
  --gold: #f0c14b;
  --neon: #00e5ff;
  --red: #ff2d2d;
  --red-hover: #ff5555;
  --ink: #140606;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(900px 380px at 50% -8%, rgba(0, 229, 255, .10), transparent 62%),
    var(--bg);
  color: var(--text);
  font: 17px/1.8 "Noto Sans Thai", "Noto Sans", "Leelawadee UI", "Segoe UI", Tahoma, sans-serif;
}

img { max-width: 100%; }

a { color: var(--gold); }

a, button { touch-action: manipulation; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px;
}

header.site {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(0, 229, 255, .08);
}

header.site .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.logo {
  flex: none;
  position: relative;
  overflow: hidden;
  line-height: 0;
}

.logo img {
  display: block;
  height: 56px;
  width: auto;
}

.login-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, .55) 50%, transparent 58%);
  transform: translateX(-120%);
  animation: brand-shine 7s ease-in-out infinite;
  pointer-events: none;
  animation-delay: 2.4s;
}

@keyframes brand-shine {
  0%, 68% { transform: translateX(-120%); }
  84%, 100% { transform: translateX(120%); }
}

@media (prefers-reduced-motion: reduce) {
  .login-btn::after { animation: none; opacity: 0; }
  html { scroll-behavior: auto; }
}

.nav { flex: 1; min-width: 0; }

.nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: .92rem;
  line-height: 1.6;
}

.nav a {
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.nav a:hover,
.nav a[aria-current="page"] { color: var(--gold); }

.login-btn {
  position: relative;
  overflow: hidden;
  flex: none;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  border-radius: 10px;
  background: var(--red);
  color: #fff;
  box-shadow: 0 0 18px rgba(255, 45, 45, .35);
  font-weight: 700;
  font-size: .92rem;
  line-height: 1.2;
  letter-spacing: .03em;
  text-decoration: none;
}

.login-btn:hover,
.login-btn:focus-visible {
  background: var(--red-hover);
  color: #fff;
}

main { display: block; }

.crumbs {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: .9rem;
}

.crumbs a { color: var(--muted); }

h1 {
  font-size: 1.75rem;
  line-height: 1.35;
  margin: 12px 0 16px;
  color: var(--gold);
}

h2 {
  font-size: 1.35rem;
  line-height: 1.4;
  margin: 44px 0 12px;
  color: var(--neon);
  text-shadow: 0 0 16px rgba(0, 229, 255, .28);
}

h1 + h2 { margin-top: 0; }

h3 {
  font-size: 1.15rem;
  line-height: 1.4;
  margin: 28px 0 8px;
  color: var(--neon);
}

p { margin: 0 0 16px; }

strong { color: var(--gold); }

ul, ol { margin: 0 0 16px; padding-left: 1.35rem; }

li { margin-bottom: 6px; }

.home h1 {
  color: #f7f4ee;
  font-size: 2rem;
  font-weight: 700;
  margin-top: 28px;
}

.home h1 .brand-en { color: var(--neon); }

.home h2,
.home h3 { color: var(--neon); }

.banner-slider {
  position: relative;
  overflow: hidden;
  background: #000;
  border-radius: 16px;
  margin: 4px 0 28px;
}

.banner-track {
  display: flex;
  transition: transform .6s ease;
}

.banner-track img {
  flex: 0 0 100%;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  display: block;
}

.banner-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(13, 12, 16, .72);
  color: var(--gold);
  font: 700 22px/1 Tahoma, sans-serif;
  cursor: pointer;
}

.banner-arrow:hover { background: rgba(13, 12, 16, .9); }

.banner-prev { left: 10px; }

.banner-next { right: 10px; }

.banner-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.banner-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(248, 244, 232, .45);
  cursor: pointer;
}

.banner-dots button[aria-current="true"] { background: var(--gold); }

@media (prefers-reduced-motion: reduce) {
  .banner-track { transition: none; }
}

.toc {
  margin: 8px 0 36px;
  padding: 16px 22px 8px;
  border: 1px solid rgba(0, 229, 255, .35);
  border-radius: 16px;
  background: #0c0c10;
  box-shadow: inset 0 0 24px rgba(0, 229, 255, .05);
}

.toc p {
  margin: 0;
  font-weight: 700;
  color: var(--gold);
}

.toc ol { margin: 10px 0 12px; }

.toc a { color: var(--neon); }

.card-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  margin: 4px 0 18px;
  padding: 10px 0 14px;
  list-style: none;
}

.card-row li {
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
}

.card-row a {
  display: block;
  border-radius: 10px;
  line-height: 0;
  transform: translateY(0) scale(1);
  transition: transform .22s ease, box-shadow .22s ease;
}

.card-row a:hover,
.card-row a:focus-visible {
  position: relative;
  z-index: 2;
  transform: translateY(-8px) scale(1.06);
  box-shadow: 0 12px 24px rgba(0, 0, 0, .5), 0 0 0 2px var(--gold);
}

.card-row img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.contact-box {
  margin: 8px 0 20px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 45, 45, .45);
  border-radius: 16px;
  background: #0c0c10;
}

.contact-box p:last-child { margin-bottom: 0; }

.contact-form {
  margin: 8px 0 20px;
  padding: 18px 18px 8px;
  border: 1px solid rgba(0, 229, 255, .45);
  border-radius: 16px;
  background: #0c0c10;
}

.contact-form label {
  display: block;
  margin: 0 0 14px;
  color: var(--gold);
  font-weight: 600;
}

.contact-form input,
.contact-form textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid #2c2c34;
  border-radius: 10px;
  background: #050505;
  color: var(--text);
  font: inherit;
  line-height: 1.5;
}

.contact-form textarea {
  min-height: 140px;
  resize: vertical;
}

.contact-form input:focus-visible,
.contact-form textarea:focus-visible {
  outline: 2px solid var(--neon);
  outline-offset: 2px;
  border-color: var(--neon);
}

.contact-form button {
  display: inline-flex;
  align-items: center;
  margin: 2px 0 12px;
  padding: 10px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.contact-form button:hover { background: var(--red-hover); }

.article-list {
  margin: 8px 0 28px;
  padding: 0;
  list-style: none;
}

.article-list li { margin: 0 0 14px; }

.article-list a {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid #2c2c34;
  border-radius: 14px;
  background: #17171d;
  text-decoration: none;
}

.article-list img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 10px;
}

.article-list a:hover {
  border-color: var(--gold);
}

.article-list strong {
  display: block;
  font-size: 1.05rem;
  line-height: 1.4;
  margin-bottom: 6px;
  color: var(--gold);
}

.article-list span {
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.55;
}

.article-hero {
  display: grid;
  grid-template-columns: 46% minmax(0, 1fr);
  gap: 16px 18px;
  align-items: start;
  margin-top: 18px;
}

.article-hero img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(0, 229, 255, .35);
  border-radius: 16px;
}

.article-hero h1 {
  margin: 0 0 8px;
  font-size: 1.28rem;
  line-height: 1.3;
}

.article-hero h2 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  line-height: 1.35;
}

.article-hero p {
  margin: 0 0 8px;
  font-size: 14.5px;
  line-height: 1.45;
}

.article-hero p:last-child { margin-bottom: 0; }

.article-body { margin-top: 8px; }

footer.site {
  margin-top: 56px;
  padding: 24px 0 32px;
  background: var(--footer);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .9rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.footer-nav a {
  color: var(--text);
  text-decoration: none;
}

.footer-nav a:hover { color: var(--gold); }

.trust-title {
  margin: 0 0 12px;
  color: var(--text);
  font-weight: 600;
}

.trust {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px 40px;
}

.trust p {
  margin: 0 0 6px;
  font-size: .8rem;
}

.trust img {
  display: block;
  width: auto;
  max-width: 100%;
  height: 72px;
}

.footer-bottom {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.age {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 36px;
  height: 36px;
  border: 2px solid var(--red);
  border-radius: 50%;
  color: var(--red);
  font-size: .8rem;
  font-weight: 700;
}

.entry-popup {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(5, 5, 5, .82);
  animation: popup-backdrop .25s ease-out;
}

@keyframes popup-backdrop {
  from { background-color: rgba(5, 5, 5, 0); }
  to { background-color: rgba(5, 5, 5, .82); }
}

@keyframes popup-pop {
  0% {
    opacity: 0;
    transform: scale(.45);
  }
  62% {
    opacity: 1;
    transform: scale(1.06);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.entry-popup[hidden] { display: none; }

.entry-popup-card {
  position: relative;
  width: min(340px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow: hidden;
  padding: 18px 12px 12px;
  border: 2px solid var(--neon);
  border-radius: 22px;
  background: #0c0c10;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .6), 0 0 24px rgba(0, 229, 255, .12);
  transform-origin: center;
  animation: popup-pop .42s cubic-bezier(.16, 1.25, .32, 1);
}

.entry-popup-title {
  margin: 0 30px 10px;
  color: var(--gold);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}

.entry-popup-card img {
  display: block;
  width: 100%;
  height: min(420px, calc(100dvh - 210px));
  object-fit: cover;
  object-position: center center;
  border-radius: 14px;
  background: #050505;
}

.entry-popup-go {
  display: block;
  margin-top: 10px;
  padding: 13px 16px;
  border: 0;
  border-radius: 12px;
  background: var(--neon);
  color: #041016;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.entry-popup-go:hover { color: #041016; background: #66f0ff; }

.entry-popup-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--neon);
  border-radius: 50%;
  background: #050505;
  color: #fff;
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
}

body.entry-lock { overflow: hidden; }

@media (max-width: 720px) {
  body { font-size: 16px; line-height: 1.7; }

  .wrap {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }

  header.site .wrap {
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 10px;
    padding-top: 10px;
    padding-bottom: 4px;
  }

  .logo {
    order: 1;
    flex: 0 1 auto;
    min-width: 0;
    max-width: calc(100% - 124px);
  }

  .logo img {
    height: auto;
    width: auto;
    max-width: 100%;
    max-height: 46px;
  }

  .login-btn {
    order: 2;
    margin-left: auto;
    min-height: 44px;
    padding: 10px 14px;
  }

  .nav { order: 3; flex: 1 1 100%; }

  .nav ul { gap: 0 14px; }

  .nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  h1 { font-size: 1.45rem; }

  .home h1 {
    font-size: 1.35rem;
    margin-top: 16px;
  }

  h2 {
    font-size: 1.2rem;
    margin-top: 32px;
  }

  h3 { font-size: 1.05rem; }

  .banner-arrow {
    width: 44px;
    height: 44px;
  }

  .banner-dots {
    bottom: 2px;
    gap: 0;
  }

  .banner-dots button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
  }

  .banner-dots button::after {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(248, 244, 232, .55);
  }

  .banner-dots button[aria-current="true"] { background: transparent; }

  .banner-dots button[aria-current="true"]::after { background: var(--gold); }

  .toc { padding: 12px 14px 8px; }

  .toc li { margin: 0; }

  .toc a {
    display: inline-block;
    padding: 7px 0;
  }

  .footer-nav {
    gap: 0 16px;
    margin-bottom: 16px;
    padding-bottom: 8px;
  }

  .footer-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  .trust { gap: 16px 24px; }

  .trust > div { max-width: 100%; }

  .trust img {
    height: auto;
    max-height: 64px;
  }

  .entry-popup {
    padding:
      max(12px, env(safe-area-inset-top))
      max(12px, env(safe-area-inset-right))
      max(12px, env(safe-area-inset-bottom))
      max(12px, env(safe-area-inset-left));
  }

  .entry-popup-close {
    width: 40px;
    height: 40px;
  }

  .entry-popup-title {
    margin-left: 44px;
    margin-right: 44px;
  }

  .article-hero { grid-template-columns: 1fr; }

  .article-hero h1 { font-size: 1.3rem; }

  .article-list a { grid-template-columns: 76px minmax(0, 1fr); }

  .article-list img {
    width: 76px;
    height: 76px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card-row a { transition: none; }
  .card-row a:hover,
  .card-row a:focus-visible { transform: none; }
  .entry-popup,
  .entry-popup-card { animation: none; }
}
