@font-face {
  font-family: Kanit;
  src: url("../assets/Kanit-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Kanit;
  src: url("../assets/Kanit-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700 900;
  font-display: swap;
}

:root {
  --page: #100e0c;
  --page-deep: #090807;
  --card: #15120f;
  --panel: #1d1914;
  --panel-soft: #242018;
  --gold: #ba995d;
  --gold-line: #cbb37d;
  --gold-light: #e7d39d;
  --gold-deep: #8b6e3d;
  --paper: #f7f1e4;
  --muted: #c9bea9;
  --muted-deep: #a99d89;
  --line: rgba(203, 179, 125, .34);
  --soft-line: rgba(203, 179, 125, .16);
  --danger: #f28b82;
  --font-thai: Kanit, "Leelawadee UI", Tahoma, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--page-deep); scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--paper);
  background:
    radial-gradient(circle at 50% -8%, rgba(203, 179, 125, .19), transparent 29%),
    radial-gradient(circle at 6% 38%, rgba(186, 153, 93, .09), transparent 25%),
    repeating-linear-gradient(125deg, transparent 0 46px, rgba(231, 211, 157, .025) 47px 48px),
    linear-gradient(160deg, #15120f, #090807 58%, #14100b);
  font: 400 16px/1.75 var(--font-thai);
}
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
svg { display: block; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }

.page-shell {
  min-height: 100vh;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 28px;
  padding: 8px 8px 46px;
}
.portal-card, .article-card { width: 100%; min-width: 0; }
.portal-card {
  position: relative;
  max-width: 470px;
  padding: 20px 16px 18px;
  overflow: hidden;
  border: 1px solid var(--gold-deep);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(231, 211, 157, .09), transparent 18%),
    linear-gradient(180deg, #17130f, #0e0c0a 67%, #14110d);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .54), inset 0 0 0 4px rgba(203, 179, 125, .035);
}
.portal-card::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(203, 179, 125, .15);
  border-radius: 18px;
  pointer-events: none;
}
.corner { position: absolute; z-index: 3; top: 0; width: 68px; height: 4px; background: linear-gradient(90deg, transparent, var(--gold-light)); }
.corner::after { content: ""; position: absolute; top: 0; width: 4px; height: 52px; background: linear-gradient(180deg, var(--gold-light), transparent); }
.corner-left { left: 0; transform: rotate(0); }
.corner-left::after { left: 0; }
.corner-right { right: 0; transform: scaleX(-1); }
.corner-right::after { left: 0; }

.brand-header { position: relative; z-index: 1; text-align: center; }
.brand {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  min-height: 54px;
  font-size: clamp(43px, 13vw, 58px);
  font-weight: 900;
  font-style: italic;
  letter-spacing: -3px;
  line-height: 1;
  filter: drop-shadow(0 7px 17px rgba(186, 153, 93, .24));
}
.brand span:first-child { color: var(--paper); text-shadow: 0 2px 0 #6f6451; }
.brand span:last-child { color: var(--gold-light); text-shadow: 0 2px 0 #72582c; }
.brand-kicker { margin: 5px 0 1px; color: var(--gold); font-size: 9px; font-weight: 700; letter-spacing: 2.5px; }
h1 { margin: 0 auto 13px; color: var(--paper); font-size: 16px; font-weight: 700; line-height: 1.5; white-space: nowrap; }

.hero-media {
  position: relative;
  aspect-ratio: 1 / 1;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--gold-line);
  border-radius: 18px 18px 8px 8px;
  background: #17120c;
  box-shadow: 0 18px 42px rgba(0, 0, 0, .52), 0 0 28px rgba(186, 153, 93, .11);
}
.hero-media::before, .hero-media::after {
  content: "";
  position: absolute;
  z-index: 4;
  top: 0;
  width: 54px;
  height: 54px;
  border-top: 3px solid var(--gold-light);
}
.hero-media::before { left: 0; border-left: 3px solid var(--gold-light); }
.hero-media::after { right: 0; border-right: 3px solid var(--gold-light); }
.hero-photo { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center center; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12, 9, 6, .05), transparent 43%, rgba(11, 8, 5, .44) 63%, rgba(9, 7, 5, .94)); }
.hero-code { position: absolute; right: 13px; bottom: 7px; color: rgba(231, 211, 157, .09); font-size: 68px; font-weight: 900; letter-spacing: -6px; line-height: 1; }
.hero-media figcaption {
  position: absolute;
  z-index: 3;
  left: 18px;
  right: 18px;
  bottom: 17px;
  display: grid;
  justify-items: center;
  color: var(--paper);
  font-size: clamp(19px, 5.7vw, 25px);
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  text-shadow: 0 3px 13px #090704;
}
.hero-media figcaption::before { content: ""; width: 42px; height: 2px; margin-bottom: 6px; background: var(--gold-light); box-shadow: 0 0 12px rgba(231, 211, 157, .65); }
.hero-media figcaption strong { color: var(--gold-light); font-size: 1.18em; }

.entry-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  min-height: 37px;
  margin: 9px 0;
  color: var(--muted);
  border-block: 1px solid var(--soft-line);
  background: linear-gradient(90deg, transparent, rgba(186, 153, 93, .08), transparent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  white-space: nowrap;
}
.entry-strip i { width: 5px; height: 5px; transform: rotate(45deg); background: var(--gold-light); box-shadow: 0 0 8px rgba(231, 211, 157, .55); }

.action-stack { display: grid; gap: 8px; }
.action {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 52px;
  padding: 10px 16px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 8px 16px 8px 16px;
  font-size: 17px;
  font-weight: 900;
  text-align: center;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.action::after { content: ""; position: absolute; top: -40%; left: -30%; width: 28%; height: 180%; transform: rotate(20deg); background: rgba(255,255,255,.16); transition: left .35s ease; }
.action:hover::after { left: 110%; }
.action:hover { transform: translateY(-2px); }
.action:active { transform: translateY(0); }
.action svg { width: 20px; flex: 0 0 20px; }
.action-primary { color: #22190d; background: linear-gradient(125deg, #f0dfb2, #cbb37d 48%, #a47f43); box-shadow: 0 11px 28px rgba(186, 153, 93, .22), inset 0 1px rgba(255,255,255,.45); }
.action-secondary { color: var(--gold-light); border-color: var(--gold); background: linear-gradient(110deg, rgba(186, 153, 93, .14), rgba(16, 14, 12, .75)); }
.action-secondary:hover { border-color: var(--gold-light); }
.action:focus-visible, .support-link:focus-visible, .brand:focus-visible, summary:focus-visible { outline: 3px solid var(--gold-light); outline-offset: 3px; }
.link-notice { min-height: 20px; margin: 4px 0 0; color: var(--muted-deep); font-size: 11px; line-height: 1.6; text-align: center; }
.link-notice.is-active { color: var(--gold-light); }

.access-deck { margin-top: 13px; overflow: hidden; border: 1px solid var(--line); border-radius: 17px 7px 17px 7px; background: linear-gradient(150deg, #242018, #14110e 65%); }
.access-deck-head { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 9px; padding: 12px; border-bottom: 1px solid var(--soft-line); }
.deck-seal { display: grid; place-items: center; width: 34px; height: 34px; color: var(--gold-light); border: 1px solid var(--gold); transform: rotate(45deg); }
.deck-seal svg { width: 18px; transform: rotate(-45deg); }
.access-deck-head div { display: grid; }
.access-deck-head small { color: var(--gold); font-size: 9px; font-weight: 700; letter-spacing: 1.4px; }
.access-deck-head strong { color: var(--paper); font-size: 16px; line-height: 1.35; }
.deck-number { color: rgba(231, 211, 157, .32); font-size: 25px; font-weight: 900; letter-spacing: -2px; }
.access-points { display: grid; grid-template-columns: repeat(3, 1fr); }
.access-points div { min-width: 0; padding: 11px 8px 13px; text-align: center; border-right: 1px solid var(--soft-line); }
.access-points div:last-child { border-right: 0; }
.access-points span { display: block; color: var(--gold); font-size: 10px; font-weight: 700; }
.access-points strong, .access-points small { display: block; overflow-wrap: anywhere; line-height: 1.4; }
.access-points strong { margin-top: 3px; color: var(--paper); font-size: 13px; }
.access-points small { margin-top: 3px; color: var(--muted-deep); font-size: 10px; }

.support-link { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 48px; margin-top: 7px; color: var(--muted); font-size: 16px; font-weight: 700; }
.support-link svg { width: 18px; }
.support-link:hover { color: var(--gold-light); }
.card-foot { display: flex; align-items: center; gap: 9px; padding-top: 11px; border-top: 1px solid var(--soft-line); color: var(--muted-deep); font-size: 11px; }
.age { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; color: var(--gold-light); border: 1px solid var(--gold); border-radius: 50%; font-size: 10px; font-weight: 900; }

.article-card { max-width: 780px; padding: 26px 20px 22px; border: 1px solid var(--line); border-radius: 24px 8px 24px 8px; background: linear-gradient(155deg, #201b15, #11100d 26%, #0d0c0a); box-shadow: 0 24px 66px rgba(0,0,0,.36); }
.article-eyebrow { display: inline-block; margin-bottom: 9px; padding: 5px 9px; color: var(--gold-light); border-left: 3px solid var(--gold); background: rgba(186, 153, 93, .08); font-size: 11px; font-weight: 700; letter-spacing: 1px; }
.article-card h2, .article-card h3 { color: var(--paper); font-weight: 700; line-height: 1.48; }
.article-card h2 { margin: 0 0 14px; font-size: clamp(23px, 6vw, 31px); }
.article-card h3 { position: relative; margin: 22px 0 9px; padding-left: 19px; font-size: 19px; }
.article-card h3::before { content: ""; position: absolute; left: 0; top: .55em; width: 9px; height: 9px; transform: rotate(45deg); border: 1px solid var(--gold-light); }
.article-card p { margin: 0 0 15px; color: var(--muted); font-size: 16px; line-height: 1.82; }
.article-head p:last-child, .article-section > p:last-child { margin-bottom: 0; }
.article-section { position: relative; margin-top: 28px; padding: 23px 0 0 12px; border-top: 1px solid var(--soft-line); border-left: 1px solid var(--soft-line); }
.section-index { position: absolute; top: -14px; left: -1px; min-width: 45px; padding: 3px 8px; color: #21180c; background: linear-gradient(120deg, var(--gold-light), var(--gold)); font-size: 11px; font-weight: 900; letter-spacing: 1px; text-align: center; }
.route-map { display: grid; grid-template-columns: 1fr 16px 1fr 16px 1fr; align-items: center; margin-top: 21px; padding: 12px 9px; border: 1px solid var(--soft-line); background: rgba(203, 179, 125, .055); }
.route-map span { color: var(--gold-light); font-size: 12px; font-weight: 700; line-height: 1.4; text-align: center; }
.route-map i { position: relative; height: 1px; background: var(--gold-deep); }
.route-map i::after { content: ""; position: absolute; top: -3px; right: 0; width: 6px; height: 6px; transform: rotate(45deg); border-top: 1px solid var(--gold-deep); border-right: 1px solid var(--gold-deep); }
.signal-grid { display: grid; gap: 8px; }
.signal-grid p { margin: 0; padding: 12px; border: 1px solid var(--soft-line); background: linear-gradient(100deg, rgba(186, 153, 93, .09), transparent); }
.signal-grid strong, .signal-grid span { display: block; }
.signal-grid strong { color: var(--gold-light); }
.signal-grid span { margin-top: 2px; color: var(--muted); }
.member-note { display: grid; grid-template-columns: auto 1fr; gap: 11px; align-items: center; margin-top: 19px; padding: 13px; border: 1px solid var(--gold-deep); background: rgba(186, 153, 93, .08); }
.member-note > span { padding: 7px 9px; color: #20170b; background: var(--gold-light); font-size: 10px; font-weight: 900; letter-spacing: .7px; }
.member-note p { margin: 0; font-size: 14px; line-height: 1.6; }
.faq details { border-bottom: 1px solid var(--soft-line); }
.faq details:last-of-type { border-bottom: 0; }
.faq summary { position: relative; min-height: 54px; display: flex; align-items: center; padding: 10px 29px 10px 2px; color: var(--paper); font-size: 16px; font-weight: 700; cursor: pointer; }
.faq summary::after { content: "+"; position: absolute; right: 5px; color: var(--gold-light); font-size: 22px; font-weight: 400; }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 2px 15px; }
.article-foot { margin-top: 26px; padding: 15px 0 0 12px; border-top: 1px solid var(--soft-line); color: var(--muted-deep); font-size: 13px; line-height: 1.65; }

@media (max-width: 360px) {
  .portal-card { padding-inline: 12px; }
  .brand-kicker { letter-spacing: 1.8px; }
  .entry-strip { gap: 7px; font-size: 9px; }
  .access-points strong { font-size: 12px; }
  .access-points small { font-size: 9px; }
  .article-card { padding-inline: 17px; }
  .article-section { padding-left: 10px; }
}
@media (min-width: 700px) {
  .page-shell { gap: 38px; padding: 32px 24px 64px; }
  .portal-card { padding: 29px 22px 23px; border-radius: 30px; }
  .portal-card::before { border-radius: 24px; }
  .hero-media { border-radius: 22px 22px 10px 10px; }
  .article-card { padding: 36px 42px; }
  .signal-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
