/*
Theme Name: TEA Theme
Description: ธีมเว็บไซต์สมาคมเอ็นโดดอนติกส์ไทย — ดีไซน์ตามแบบที่ 22 (ม่วงลึก #340075 + ส้ม #FE932C + พื้นลาเวนเดอร์) Hero Slider, President Welcome, marquee, การ์ดพลิก 3D, carousel, sticky CTA
Author: ภูวสิษฏ์ ยอดกันทา
Version: 4.0.0
Text Domain: tea-theme
*/

/* ================= Design tokens ================= */
:root {
  /* Design 22 palette — deep purple / orange / lavender surfaces */
  --black: #f9f9ff;
  --panel: #ffffff;
  --panel-2: #f0f3ff;
  --line: #dce2f3;
  --line-soft: #e7eefe;
  --neon: #fe932c;
  --neon-2: #ffb77d;
  --neon-soft: rgba(254, 147, 44, 0.16);
  --silver: #151c27;
  --muted: #4a4452;
  --dim: #7b7483;
  --primary: #340075;
  --primary-2: #4c1d95;
  --primary-soft: #ebdcff;
  --on-primary: #ffffff;
  --gold: #f5b942;
  --gold-deep: #8a6d2f;
  --f-display: 'Noto Sans Thai', 'Leelawadee UI', sans-serif;
  --f-en: 'Newsreader', Georgia, serif;
  --f-oswald: 'Manrope', 'Noto Sans Thai', sans-serif;
  --f-mono: 'JetBrains Mono', monospace;
  --shadow-neon: 0 0 0 1px rgba(254, 147, 44, 0.35), 0 18px 44px rgba(52, 0, 117, 0.16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--black);
  color: var(--silver);
  font-family: var(--f-display);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

body.tea-contrast {
  --black: #000; --panel: #060606; --panel-2: #0d0d0d;
  --silver: #fff; --muted: #cfcfcf; --neon: #ffb77d;
}

a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
img { display: block; max-width: 100%; }

::selection { background: var(--neon); color: #000; }

.shell { width: min(1240px, calc(100% - 48px)); margin: 0 auto; }

/* ป้ายกำกับเทคนิคสไตล์ mono */
.mono-label {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--neon);
}

/* คำอังกฤษตัวใหญ่ประกอบ */
.display-en {
  font-family: var(--f-en);
  letter-spacing: 0.04em;
  line-height: 0.92;
}

/* ================= Grain overlay ================= */
#tea-grain {
  position: fixed;
  inset: -60px;
  z-index: 90;
  pointer-events: none;
  opacity: 0.14;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

/* ================= Top strip ================= */
.top-strip {
  background: #020202;
  border-bottom: 1px solid var(--line-soft);
  color: var(--muted);
  font-family: var(--f-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}

.top-strip-inner { min-height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.top-contact { display: flex; align-items: center; gap: 14px; }
.top-contact a:hover { color: var(--neon); }
.utility-separator { opacity: 0.35; }

.accessibility-tools { display: flex; align-items: center; gap: 5px; }

.accessibility-tools button {
  min-width: 28px;
  height: 26px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-family: var(--f-mono);
  font-size: 0.68rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 160ms, color 160ms;
}

.accessibility-tools button:hover, .accessibility-tools button:focus-visible { border-color: var(--neon); color: var(--neon); }

.lang-switch { display: flex; gap: 5px; list-style: none; margin: 0; padding: 0; }
.lang-switch li { list-style: none; }
.lang-switch a {
  min-width: 28px; height: 26px; padding: 0 8px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 4px;
  color: var(--muted); font-family: var(--f-mono); font-size: 0.68rem;
}
.lang-switch .current-lang a, .lang-switch a:hover { border-color: var(--neon); color: var(--neon); }

/* ================= Header ================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5, 5, 5, 0.9);
  border-bottom: 1px solid var(--line-soft);
  backdrop-filter: blur(14px);
}

.nav-wrap { min-height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: inline-flex; align-items: center; gap: 14px; }

.brand-mark {
  width: 46px; height: 46px;
  display: inline-grid; place-items: center; flex: 0 0 auto;
  border: 1px solid var(--neon);
  color: var(--neon);
  font-family: var(--f-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  box-shadow: 0 0 24px rgba(254, 147, 44, 0.25);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.brand strong { display: block; color: var(--silver); font-size: 1.02rem; font-weight: 600; }
.brand small { display: block; margin-top: 2px; color: var(--dim); font-family: var(--f-mono); font-size: 0.62rem; letter-spacing: 0.22em; text-transform: uppercase; }

.main-nav ul { display: flex; gap: clamp(18px, 2.4vw, 34px); list-style: none; margin: 0; padding: 0; }

.main-nav a {
  position: relative;
  padding: 8px 2px;
  color: var(--muted);
  font-family: var(--f-oswald);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 160ms;
}

.main-nav a::after {
  content: "";
  position: absolute; left: 0; right: 100%; bottom: 2px; height: 2px;
  background: var(--neon);
  transition: right 220ms cubic-bezier(0.2, 0.72, 0.24, 1);
}

.main-nav a:hover, .main-nav a:focus-visible, .main-nav .current-menu-item a { color: var(--silver); }
.main-nav a:hover::after, .main-nav .current-menu-item a::after { right: 0; }

.menu-button { display: none; width: 44px; height: 44px; border: 1px solid var(--line); background: transparent; padding: 12px; }
.menu-button span:not(.sr-only) { display: block; height: 2px; margin: 4px 0; background: var(--silver); }

/* ================= Search panel ================= */
.search-panel { border-bottom: 1px solid var(--line-soft); background: var(--panel); padding: 28px 0; }
.search-panel-inner > label { display: block; margin-bottom: 12px; font-family: var(--f-mono); font-size: 0.68rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--neon); }

.search-box { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.search-box input { min-height: 54px; padding: 0 18px; border: 1px solid var(--line); border-radius: 0; background: var(--black); color: var(--silver); font: inherit; outline: none; }
.search-box input:focus { border-color: var(--neon); box-shadow: 0 0 0 3px var(--neon-soft); }
.search-box button { min-height: 54px; padding: 0 26px; border: 0; background: var(--neon); color: #000; font-family: var(--f-oswald); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; cursor: pointer; }

.search-suggestions { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--dim); font-family: var(--f-mono); font-size: 0.68rem; }
.search-suggestions a { color: var(--muted); border-bottom: 1px dotted var(--dim); }
.search-suggestions a:hover { color: var(--neon); }

/* ================= Hero reel ================= */
.hero { position: relative; }

.reel {
  position: relative;
  min-height: 92vh;
  display: grid;
  overflow: hidden;
  background: var(--black);
  border-bottom: 1px solid var(--line-soft);
}

.reel-progress { position: absolute; left: 0; right: 0; top: 0; z-index: 12; height: 3px; background: rgba(255, 255, 255, 0.08); }
.reel-progress i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--neon), var(--neon-2)); transform-origin: left; transform: scaleX(0); }

.reel-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 700ms ease, visibility 0s 700ms; }
.reel-slide.is-active { opacity: 1; visibility: visible; transition: opacity 700ms ease; z-index: 2; }

.reel-slide img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.12) brightness(0.62);
}

.reel-slide.is-active img { animation: ken-burns 7s ease-out forwards; }
@keyframes ken-burns { from { transform: scale(1); } to { transform: scale(1.09); } }

.reel-slide::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 5, 5, 0.92) 0%, rgba(5, 5, 5, 0.45) 46%, rgba(5, 5, 5, 0.18) 100%),
    linear-gradient(0deg, rgba(5, 5, 5, 0.9) 0%, transparent 36%);
}

.reel-slide .reel-word {
  position: absolute;
  right: -0.04em; bottom: 6%;
  z-index: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(232, 232, 236, 0.16);
  font-family: var(--f-en);
  font-size: clamp(4rem, 11vw, 11rem);
  line-height: 0.86;
  pointer-events: none;
  user-select: none;
}

.reel-copy {
  position: relative; z-index: 4;
  display: grid;
  align-content: center;
  min-height: 92vh;
  padding: 120px 0 150px;
}

.reel-copy .mono-label { margin: 0 0 20px; }

.reel-copy h1 {
  margin: 0;
  max-width: 15ch;
  color: #fff;
  font-size: clamp(2.5rem, 5.6vw, 4.9rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.reel-copy h1 .accent { color: var(--neon); }
.reel-lead { max-width: 54ch; margin: 22px 0 0; color: var(--muted); font-size: 1.06rem; font-weight: 300; }

.reel-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

/* ปุ่ม */
.button {
  min-height: 52px; padding: 0 28px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--f-oswald);
  font-size: 0.92rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, color 180ms ease;
}

.button.primary { position: relative; background: var(--neon); color: #000; box-shadow: var(--shadow-neon); }
.button.primary::before {
  content: "";
  position: absolute; inset: -7px;
  border: 1px solid rgba(254, 147, 44, 0.4);
  border-radius: inherit;
  animation: pulse-ring 2.4s ease-out infinite;
  pointer-events: none;
}
@keyframes pulse-ring { 0% { transform: scale(0.96); opacity: 0.9; } 70% { transform: scale(1.06); opacity: 0; } 100% { opacity: 0; } }
.button.primary:hover { transform: translateY(-2px); background: var(--neon-2); }

.button.ghost { border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); color: var(--silver); }
.button.ghost:hover { border-color: var(--neon); color: var(--neon); }

.button.warm { background: var(--silver); color: #000; }
.button.warm:hover { background: #fff; transform: translateY(-2px); }

/* ตัวควบคุม reel */
.reel-hud {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  padding: 0 0 26px;
}

.reel-chapter { font-family: var(--f-mono); font-size: 0.74rem; letter-spacing: 0.28em; color: var(--muted); }
.reel-chapter b { color: var(--neon); font-weight: 700; }

.reel-dots { display: flex; gap: 8px; }
.reel-dots button { position: relative; width: 44px; height: 3px; border: 0; padding: 8px 0; background: transparent; cursor: pointer; }
.reel-dots button i { display: block; height: 3px; background: rgba(255, 255, 255, 0.22); }
.reel-dots button.is-active i { background: var(--neon); box-shadow: 0 0 12px rgba(254, 147, 44, 0.6); }

.reel-sound { display: flex; align-items: flex-end; gap: 3px; padding: 10px; border: 1px solid var(--line); background: transparent; cursor: pointer; }
.reel-sound span { width: 3px; background: var(--muted); height: 8px; }
.reel.has-sound .reel-sound span { background: var(--neon); animation: eq 0.9s ease-in-out infinite alternate; }
.reel-sound span:nth-child(2) { height: 16px; animation-delay: 0.15s; }
.reel-sound span:nth-child(3) { height: 10px; animation-delay: 0.3s; }
.reel-sound span:nth-child(4) { height: 14px; animation-delay: 0.45s; }
@keyframes eq { from { transform: scaleY(0.5); } to { transform: scaleY(1.3); } }

.reel-arrow {
  position: absolute; top: 50%; z-index: 11;
  width: 52px; height: 52px;
  border: 1px solid var(--line);
  background: rgba(5, 5, 5, 0.6);
  color: var(--silver);
  font-size: 1.6rem; line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(6px);
  transition: border-color 160ms, color 160ms;
}
.reel-arrow:hover { border-color: var(--neon); color: var(--neon); }
.reel-arrow.prev { left: 18px; }
.reel-arrow.next { right: 18px; }

/* ================= Marquee ticker ================= */
.marquee { overflow: hidden; background: var(--neon); color: #000; border-bottom: 1px solid #000; }
.marquee-track { display: flex; width: max-content; gap: 0; animation: marquee 26s linear infinite; }
.marquee-track span {
  display: inline-flex; align-items: center; gap: 18px;
  padding: 12px 26px;
  font-family: var(--f-oswald);
  font-size: 0.86rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  white-space: nowrap;
}
.marquee-track span::after { content: "◆"; font-size: 0.6rem; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ================= Sections พื้นฐาน ================= */
.section { padding: 110px 0; }
.section-alt { background: var(--panel); border-block: 1px solid var(--line-soft); }

.section-kicker, .eyebrow {
  margin: 0 0 18px;
  font-family: var(--f-mono);
  font-size: 0.68rem; font-weight: 500;
  letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--neon);
}

.section h2 { margin: 0; color: #fff; font-size: clamp(1.9rem, 3.6vw, 3.1rem); font-weight: 700; line-height: 1.18; letter-spacing: -0.02em; text-wrap: balance; }
.section h2 .accent { color: var(--neon); }

.section-heading-row { margin-bottom: 48px; display: flex; align-items: flex-end; justify-content: space-between; gap: 36px; }
.section-heading-row > p { max-width: 38ch; margin: 0 0 10px; color: var(--muted); font-size: 0.98rem; }

/* Reveal */
[data-reveal] { opacity: 0; translate: -42px 0; transition: opacity 700ms cubic-bezier(0.2, 0.72, 0.24, 1), translate 700ms cubic-bezier(0.2, 0.72, 0.24, 1); transition-delay: var(--reveal-delay, 0ms); }
[data-reveal].is-visible { opacity: 1; translate: 0 0; }
@media (prefers-reduced-motion: reduce) { [data-reveal] { opacity: 1; translate: none; transition: none; } }

/* ================= About ================= */
.about-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 72px; align-items: start; }
.about-copy p { margin: 0; color: var(--muted); font-size: 1.05rem; line-height: 1.95; }
.about-stats { margin-top: 34px; display: flex; gap: 44px; }
.about-stats b { display: block; color: var(--neon); font-family: var(--f-en); font-size: 2.6rem; line-height: 1; }
.about-stats span { font-family: var(--f-mono); font-size: 0.66rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--dim); }

.text-link { display: inline-flex; align-items: center; gap: 10px; margin-top: 26px; color: var(--neon); font-family: var(--f-mono); font-size: 0.74rem; letter-spacing: 0.2em; text-transform: uppercase; }
.text-link span { transition: transform 180ms ease; }
.text-link:hover span { transform: translateX(5px); }

/* ================= Flip cards (services) ================= */
.audience-tabs { margin: -10px 0 30px; display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.audience-tabs button {
  min-height: 44px; padding: 0 20px; flex: 0 0 auto;
  border: 1px solid var(--line); border-radius: 999px;
  background: transparent; color: var(--muted);
  font-family: var(--f-oswald); font-size: 0.82rem; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer;
}
.audience-tabs button.is-active { border-color: var(--neon); background: var(--neon); color: #000; }

.service-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; perspective: 1400px; }

.flip-card { position: relative; min-height: 300px; }

.flip-card-inner {
  position: relative; width: 100%; height: 100%; min-height: 300px;
  transform-style: preserve-3d;
  transition: transform 620ms cubic-bezier(0.2, 0.72, 0.24, 1);
}

.flip-card:hover .flip-card-inner, .flip-card.is-flipped .flip-card-inner { transform: rotateY(180deg); }

.flip-face {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  padding: 28px;
  backface-visibility: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--panel-2) 0%, var(--panel) 100%);
}

.flip-front .mono-label { color: var(--dim); }
.flip-front h3 { margin: auto 0 14px; color: #fff; font-size: 1.3rem; font-weight: 600; line-height: 1.3; }
.flip-front .flip-arrow { margin-top: 8px; color: var(--neon); font-size: 1.3rem; }

.flip-back {
  transform: rotateY(180deg);
  border-color: rgba(254, 147, 44, 0.4);
  background:
    radial-gradient(circle at 82% 0%, rgba(254, 147, 44, 0.16), transparent 44%),
    linear-gradient(160deg, #141210 0%, var(--panel) 100%);
  justify-content: center; gap: 14px;
}

.flip-back p { margin: 0; color: var(--muted); font-size: 0.92rem; line-height: 1.8; }
.flip-back a { margin-top: 6px; color: var(--neon); font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; }

/* ================= News carousel ================= */
.news-section { position: relative; }

.carousel { position: relative; }

.carousel-viewport { overflow: hidden; cursor: grab; }
.carousel-viewport:active { cursor: grabbing; }

.carousel-track { display: flex; gap: 24px; will-change: transform; }

.news-card {
  flex: 0 0 calc((100% - 48px) / 3);
  display: flex; flex-direction: column;
  border: 1px solid var(--line);
  background: var(--panel);
  transition: border-color 200ms ease, transform 200ms ease;
}
.news-card:hover { border-color: rgba(254, 147, 44, 0.45); transform: translateY(-4px); }

.news-image { position: relative; display: block; overflow: hidden; aspect-ratio: 4 / 3; background: var(--panel-2); }
.news-image img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.1) brightness(0.7); transition: filter 300ms ease, transform 300ms ease; }
.news-card:hover .news-image img { filter: grayscale(0.35) contrast(1.05) brightness(0.85); transform: scale(1.04); }
.news-image span {
  position: absolute; left: 14px; top: 14px;
  padding: 6px 10px;
  background: var(--black);
  border-left: 2px solid var(--neon);
  color: var(--muted);
  font-family: var(--f-mono); font-size: 0.62rem;
  letter-spacing: 0.18em; text-transform: uppercase;
}

.news-body { padding: 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.news-body time { font-family: var(--f-mono); font-size: 0.66rem; letter-spacing: 0.2em; color: var(--neon); }
.news-body h3 { margin: 0; color: #fff; font-size: 1.16rem; font-weight: 600; line-height: 1.45; }
.news-body p { margin: 0; color: var(--muted); font-size: 0.9rem; flex: 1; }

.carousel-controls { display: flex; align-items: center; justify-content: space-between; margin-top: 26px; }
.carousel-dots { display: flex; gap: 7px; }
.carousel-dots button { width: 26px; height: 3px; padding: 0; border: 0; background: rgba(255, 255, 255, 0.18); cursor: pointer; }
.carousel-dots button.is-active { background: var(--neon); box-shadow: 0 0 10px rgba(254, 147, 44, 0.55); }

.carousel-nav { display: flex; gap: 8px; }
.carousel-nav button {
  width: 46px; height: 46px;
  border: 1px solid var(--line); background: transparent;
  color: var(--silver); font-size: 1.3rem; line-height: 1; cursor: pointer;
  transition: border-color 160ms, color 160ms;
}
.carousel-nav button:hover { border-color: var(--neon); color: var(--neon); }

.content-tabs { margin: -14px 0 30px; display: flex; flex-wrap: wrap; gap: 8px; }
.content-tabs button {
  min-height: 44px; padding: 0 20px;
  border: 1px solid var(--line); border-radius: 999px;
  background: transparent; color: var(--muted);
  font-family: var(--f-oswald); font-size: 0.82rem; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer;
}
.content-tabs button.is-active { border-color: var(--neon); background: var(--neon); color: #000; }

/* ================= Journal ================= */
.journal-section { position: relative; overflow: hidden; background: var(--panel); border-block: 1px solid var(--line-soft); }
.journal-section::after {
  content: "TEJ";
  position: absolute; right: -24px; bottom: -130px;
  color: transparent;
  -webkit-text-stroke: 1px rgba(254, 147, 44, 0.14);
  font-family: var(--f-en);
  font-size: 22rem; line-height: 1;
  pointer-events: none;
}
.journal-grid { position: relative; z-index: 2; display: grid; grid-template-columns: 0.8fr 1.2fr; align-items: center; gap: 72px; }
.journal-cover { overflow: hidden; border: 1px solid var(--line); transform: rotate(-2deg); }
.journal-cover img { filter: grayscale(0.5) contrast(1.08) brightness(0.85); }
.journal-copy p:not(.section-kicker) { max-width: 58ch; margin: 20px 0 0; color: var(--muted); line-height: 1.9; }
.journal-copy .button { margin-top: 30px; }

/* ================= Resources ================= */
.resource-tabs { margin: -14px 0 30px; display: flex; flex-wrap: wrap; gap: 8px; }
.resource-tabs button {
  min-height: 44px; padding: 0 20px;
  border: 1px solid var(--line); border-radius: 999px;
  background: transparent; color: var(--muted);
  font-family: var(--f-oswald); font-size: 0.82rem; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer;
}
.resource-tabs button.is-active { border-color: var(--neon); background: var(--neon); color: #000; }

.resource-panel { overflow: hidden; display: grid; grid-template-columns: 0.34fr 1fr; border: 1px solid var(--line); background: var(--panel); }

.resource-panel-title {
  min-height: 250px; padding: 44px 40px;
  display: flex; flex-direction: column; justify-content: center; gap: 8px;
  background: linear-gradient(150deg, #663500 0%, var(--panel) 100%);
  border-right: 1px solid var(--line);
}
.resource-panel-title span { color: var(--neon); font-family: var(--f-mono); font-size: 0.66rem; letter-spacing: 0.28em; text-transform: uppercase; }
.resource-panel-title strong { color: #fff; font-size: 1.55rem; font-weight: 600; line-height: 1.3; }

.resource-list a {
  min-height: 84px; padding: 20px 26px;
  display: grid; grid-template-columns: auto 1fr auto;
  align-items: center; gap: 20px;
  border-bottom: 1px solid var(--line-soft);
  transition: background 180ms ease, translate 180ms ease;
}
.resource-list a:last-child { border-bottom: 0; }
.resource-list a:hover { background: var(--panel-2); translate: 6px 0; }
.resource-number { color: var(--neon); font-family: var(--f-mono); font-size: 0.72rem; font-weight: 700; }
.resource-list strong { display: block; color: var(--silver); font-size: 0.98rem; font-weight: 500; }
.resource-list small { display: block; margin-top: 4px; color: var(--dim); font-family: var(--f-mono); font-size: 0.64rem; letter-spacing: 0.14em; text-transform: uppercase; }
.resource-arrow { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); color: var(--neon); }

/* ================= Network ================= */
.network-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 64px; align-items: center; }
.network-note { margin-top: 16px; color: var(--dim); font-size: 0.88rem; }

.network-card { padding: 32px; border: 1px solid var(--line); background: var(--panel); position: relative; }
.network-card::before, .network-card::after {
  content: ""; position: absolute; width: 18px; height: 18px;
  border: 2px solid var(--neon);
}
.network-card::before { left: -2px; top: -2px; border-width: 2px 0 0 2px; }
.network-card::after { right: -2px; bottom: -2px; border-width: 0 2px 2px 0; }

.network-source { display: flex; align-items: center; gap: 13px; }
.facebook-mark { width: 42px; height: 42px; display: grid; place-items: center; background: var(--neon); color: #000; font-family: var(--f-en); font-size: 1.5rem; }
.network-source strong { display: block; color: #fff; }
.network-source small { display: block; margin-top: 3px; color: var(--dim); font-family: var(--f-mono); font-size: 0.64rem; }
.network-card h3 { margin: 22px 0 10px; color: #fff; font-size: 1.3rem; }
.network-card p { margin: 0; color: var(--muted); line-height: 1.85; }

/* ================= Quick rail ================= */
.quick-link-rail { background: var(--panel); border-block: 1px solid var(--line-soft); }
.quick-link-grid { display: grid; grid-template-columns: repeat(5, 1fr); }
.quick-link-grid a {
  min-height: 84px; padding: 20px;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  border-right: 1px solid var(--line-soft);
  color: var(--muted);
  font-family: var(--f-oswald); font-size: 0.84rem; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase;
  transition: background 180ms, color 180ms;
}
.quick-link-grid a:hover { background: var(--neon); color: #000; }
.quick-link-grid span { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line); color: var(--neon); font-family: var(--f-mono); font-size: 0.62rem; }
.quick-link-grid a:hover span { border-color: rgba(0, 0, 0, 0.4); color: #000; }

/* ================= Footer ================= */
.site-footer { position: relative; background: #020202; color: var(--muted); padding: 0 0 26px; }

.footer-contact-panel {
  position: relative;
  margin-bottom: 56px; padding: 46px;
  display: grid; grid-template-columns: 0.72fr 1.28fr; gap: 40px;
  border: 1px solid var(--line);
  background: var(--panel);
}
.footer-contact-panel::before, .footer-contact-panel::after {
  content: ""; position: absolute; width: 26px; height: 26px; border: 2px solid var(--neon);
}
.footer-contact-panel::before { left: -2px; top: -2px; border-width: 2px 0 0 2px; }
.footer-contact-panel::after { right: -2px; bottom: -2px; border-width: 0 2px 2px 0; }

.footer-contact-intro > span { font-family: var(--f-mono); font-size: 0.66rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--neon); }
.footer-contact-intro h2 { margin: 12px 0; color: #fff; font-size: clamp(1.5rem, 2.3vw, 2.1rem); font-weight: 700; }
.footer-contact-intro p { margin: 0; color: var(--muted); font-size: 0.92rem; line-height: 1.8; }

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

.contact-channel {
  min-width: 0; padding: 16px;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center; gap: 12px;
  border: 1px solid var(--line);
  background: var(--black);
  transition: border-color 180ms, translate 180ms;
}
.contact-channel:hover { border-color: var(--neon); translate: 0 -3px; }

.channel-icon { width: 44px; height: 44px; display: grid; place-items: center; background: var(--neon); color: #000; font-family: var(--f-en); font-size: 1.1rem; }
.contact-channel.facebook .channel-icon { background: #1877f2; color: #fff; }
.contact-channel.line .channel-icon { background: #06c755; color: #000; }
.contact-channel.instagram .channel-icon { background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045); color: #fff; }
.contact-channel.email .channel-icon { background: var(--silver); }

.contact-channel small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--dim); font-family: var(--f-mono); font-size: 0.56rem; letter-spacing: 0.22em; }
.contact-channel strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; color: var(--silver); font-size: 0.8rem; font-weight: 500; }
.contact-channel b { color: var(--neon); }

.footer-grid { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr 1.25fr; gap: 34px; }
.site-footer h3 { margin: 0 0 18px; color: var(--silver); font-family: var(--f-oswald); font-size: 0.88rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.footer-links a, .footer-links button { display: block; margin: 0 0 11px; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 0.84rem; text-align: left; cursor: pointer; }
.footer-links a:hover, .footer-links button:hover { color: var(--neon); }

.footer-brand h2 { margin: 16px 0 4px; color: #fff; font-size: 1.25rem; font-weight: 600; }
.footer-brand p { margin: 0; color: var(--dim); font-family: var(--f-mono); font-size: 0.64rem; letter-spacing: 0.2em; text-transform: uppercase; }
.site-footer address { font-style: normal; margin: 18px 0; color: var(--muted); font-size: 0.84rem; line-height: 1.9; }
.footer-brand > a { display: block; margin: 0 0 10px; color: var(--silver); font-size: 0.84rem; }

.footer-bottom { margin-top: 54px; padding-top: 22px; display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line-soft); color: var(--dim); font-family: var(--f-mono); font-size: 0.64rem; letter-spacing: 0.12em; }

/* ================= Floating contact + sticky bar ================= */
.floating-contact {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  min-width: 108px; min-height: 52px; padding: 8px 16px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--neon);
  background: var(--black);
  color: var(--neon);
  box-shadow: var(--shadow-neon);
}
.floating-contact span { font-size: 1.1rem; }
.floating-contact small { font-family: var(--f-mono); font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase; }

.sticky-bar {
  position: fixed; left: 50%; bottom: 18px; z-index: 65;
  display: flex; align-items: center; gap: 18px;
  padding: 10px 12px 10px 22px;
  border: 1px solid var(--line);
  background: rgba(8, 8, 8, 0.92);
  backdrop-filter: blur(12px);
  transform: translate(-50%, 120%);
  opacity: 0;
  transition: transform 320ms cubic-bezier(0.2, 0.72, 0.24, 1), opacity 320ms, border-color 320ms;
}
.sticky-bar.is-visible { transform: translate(-50%, 0); opacity: 1; }
.sticky-bar:hover { border-color: rgba(254, 147, 44, 0.5); }
.sticky-bar > span { color: var(--muted); font-family: var(--f-mono); font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; }

/* ================= Toast ================= */
#tea-toast {
  position: fixed; left: 50%; bottom: 84px; z-index: 95;
  padding: 14px 22px;
  border: 1px solid var(--neon);
  border-left: 4px solid var(--neon);
  background: rgba(8, 8, 8, 0.96);
  color: var(--silver);
  box-shadow: var(--shadow-neon);
  transform: translate(-50%, 20px);
  opacity: 0; pointer-events: none;
  transition: transform 280ms cubic-bezier(0.2, 0.72, 0.24, 1), opacity 280ms;
}
#tea-toast.is-visible { transform: translate(-50%, 0); opacity: 1; }

/* ================= Cookie banner (ธีมดำ) ================= */
.cookie-banner {
  position: fixed; left: 50%; bottom: 22px; z-index: 80;
  width: min(880px, calc(100% - 48px));
  padding: 16px 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 28px;
  border: 1px solid var(--line);
  border-top: 2px solid var(--neon);
  background: rgba(8, 8, 8, 0.97);
  color: var(--silver);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.6);
  transform: translateX(-50%);
}
.cookie-copy { max-width: 560px; }
.cookie-banner strong { display: block; margin-bottom: 4px; color: #fff; font-size: 0.95rem; }
.cookie-banner p { margin: 0; color: var(--muted); font-size: 0.78rem; line-height: 1.6; }
.cookie-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.cookie-button { min-height: 40px; padding: 0 18px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-family: var(--f-oswald); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; cursor: pointer; }
.cookie-button.primary { border-color: var(--neon); background: var(--neon); color: #000; }
.cookie-button.secondary:hover { border-color: var(--neon); color: var(--neon); }
.cookie-settings { margin-top: 16px; display: grid; gap: 8px; }
.cookie-settings label { padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border: 1px solid var(--line-soft); background: var(--black); }
.cookie-settings strong { display: block; font-size: 0.76rem; color: var(--silver); }
.cookie-settings small { display: block; margin-top: 2px; color: var(--dim); font-size: 0.64rem; }
.cookie-settings input { width: 18px; height: 18px; accent-color: var(--neon); }

/* ================= Popup modal (ธีมดำ ทับสไตล์ปลั๊กอิน) ================= */
.modal-backdrop { background: rgba(0, 0, 0, 0.82); backdrop-filter: blur(10px); }
.announcement-modal { background: var(--panel); border: 1px solid var(--line); border-radius: 0; }
.modal-image { background: var(--black); }
.modal-image img { filter: grayscale(0.35) contrast(1.08) brightness(0.9); }
.slide-source { background: rgba(5, 5, 5, 0.88); border-left: 2px solid var(--neon); }
.slide-arrow { background: rgba(5, 5, 5, 0.7); }
.slide-count { color: var(--neon); }
.modal-copy h2 { color: #fff; }
.modal-copy > p:not(.section-kicker) { color: var(--muted); }
.modal-copy .section-kicker { color: var(--neon); }
.announcement-modal .button.primary { background: var(--neon); color: #000; box-shadow: var(--shadow-neon); }
.modal-close { background: transparent; color: var(--silver); border: 1px solid var(--line); }
.remember-close { color: var(--dim); }
.slide-dots button { background: rgba(255, 255, 255, 0.25); }
.slide-dots button.is-active { background: var(--neon); }
.memorial-modal { background: #0a0a0a; border-color: rgba(233, 210, 158, 0.28); }
.memorial-modal .modal-copy h2 { color: #fff; }

/* ================= Archive / singular ================= */
.page-header { padding: 72px 0 40px; background: var(--black); border-bottom: 1px solid var(--line-soft); }
.page-title { margin: 0; color: #fff; font-size: clamp(1.8rem, 3.4vw, 2.9rem); font-weight: 700; letter-spacing: -0.02em; }

.archive-list { padding: 48px 0 110px; }

.content-area { background: var(--panel); border: 1px solid var(--line); padding: 44px; margin-bottom: 24px; }
.entry-meta { color: var(--neon); font-family: var(--f-mono); font-size: 0.68rem; letter-spacing: 0.18em; margin-bottom: 14px; }
.entry-content { color: var(--silver); line-height: 1.9; }
.entry-content img { filter: grayscale(0.25) contrast(1.05); }
.doc-link { color: var(--neon); font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; }

.pagination .nav-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 34px; }
.pagination .page-numbers { min-height: 44px; padding: 0 16px; display: inline-flex; align-items: center; border: 1px solid var(--line); background: transparent; color: var(--muted); font-family: var(--f-mono); font-size: 0.78rem; }
.pagination .page-numbers.current { border-color: var(--neon); background: var(--neon); color: #000; }

.search-form-main { max-width: 640px; margin: 0 auto 44px; display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.search-form-main input { min-height: 54px; padding: 0 18px; border: 1px solid var(--line); background: var(--panel); color: var(--silver); font: inherit; outline: none; }
.search-form-main input:focus { border-color: var(--neon); }
.search-form-main button { min-height: 54px; padding: 0 24px; border: 0; background: var(--neon); color: #000; font-family: var(--f-oswald); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; cursor: pointer; }

/* ================= Contact (booking flow) ================= */
.contact-shell { max-width: 980px; margin: 56px auto 110px; padding: 0 24px; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }

.intake-card { position: relative; background: var(--panel); border: 1px solid var(--line); }
.intake-head { padding: 40px 44px 34px; background: linear-gradient(120deg, #663500, var(--panel)); border-bottom: 1px solid var(--line); }
.intake-head h1 { margin: 0; color: #fff; font-size: clamp(1.6rem, 2.8vw, 2.4rem); font-weight: 700; }
.intake-head > span { display: block; margin-top: 10px; color: var(--muted); font-size: 0.9rem; }

.intake-form { padding: 36px 44px 44px; display: grid; gap: 22px; }

.intake-form label > span:first-child { display: block; margin-bottom: 8px; color: var(--silver); font-family: var(--f-oswald); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.intake-form input[type=text], .intake-form input[type=email], .intake-form textarea {
  width: 100%; min-height: 52px; padding: 12px 16px;
  border: 1px solid var(--line); border-radius: 0;
  background: var(--black); color: var(--silver);
  font: inherit; outline: none;
  transition: border-color 160ms, box-shadow 160ms;
}
.intake-form textarea { min-height: 130px; resize: vertical; }
.intake-form input:focus, .intake-form textarea:focus { border-color: var(--neon); box-shadow: 0 0 0 3px var(--neon-soft); }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.pill-group { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-group input { position: absolute; opacity: 0; pointer-events: none; }
.pill-group label {
  min-height: 40px; padding: 0 18px;
  display: inline-flex; align-items: center;
  border: 1px solid var(--line); border-radius: 999px;
  color: var(--muted); font-size: 0.84rem;
  cursor: pointer; user-select: none;
  transition: border-color 160ms, color 160ms, background 160ms;
}
.pill-group input:checked + label { border-color: var(--neon); background: var(--neon); color: #000; }
.pill-group input:focus-visible + label { box-shadow: 0 0 0 3px var(--neon-soft); }

.slot-group { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.slot-group input { position: absolute; opacity: 0; pointer-events: none; }
.slot-group label {
  min-height: 64px; padding: 12px;
  display: flex; flex-direction: column; gap: 4px;
  border: 1px solid var(--line);
  color: var(--muted); cursor: pointer;
  transition: border-color 160ms, background 160ms;
}
.slot-group label b { color: var(--silver); font-weight: 500; }
.slot-group label small { font-family: var(--f-mono); font-size: 0.6rem; letter-spacing: 0.12em; color: var(--dim); }
.slot-group input:checked + label { border-color: var(--neon); background: var(--neon-soft); }
.slot-group input:checked + label b { color: var(--neon); }

.intake-submit { min-width: 260px; min-height: 54px; margin: 6px auto 0; border: 0; background: var(--neon); color: #000; font-family: var(--f-oswald); font-size: 0.92rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; cursor: pointer; box-shadow: var(--shadow-neon); }

.direct-card { padding: 28px; display: grid; gap: 12px; background: var(--panel); border: 1px solid var(--line); align-self: start; position: sticky; top: 110px; }
.direct-card > span { color: var(--neon); font-family: var(--f-mono); font-size: 0.64rem; letter-spacing: 0.26em; text-transform: uppercase; }
.direct-card strong { color: #fff; font-size: 1.4rem; font-weight: 600; }
.direct-card a { overflow-wrap: anywhere; color: var(--muted); font-size: 0.84rem; }
.direct-card a:hover { color: var(--neon); }
.direct-card p { margin: 10px 0 0; padding-top: 16px; border-top: 1px solid var(--line-soft); color: var(--dim); font-size: 0.78rem; }

/* ================= SR / utils ================= */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ================= Responsive ================= */
@media (max-width: 1100px) {
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .news-card { flex-basis: calc((100% - 24px) / 2); }
}

@media (max-width: 1000px) {
  .main-nav { position: absolute; left: 0; right: 0; top: calc(100% + 8px); padding: 14px; display: none; border: 1px solid var(--line); background: var(--black); }
  .main-nav.is-open, .main-nav.toggled { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav a { display: block; padding: 12px 10px; }
  .menu-button { display: block; }

  .hero-grid, .about-grid, .journal-grid, .network-grid, .footer-grid { grid-template-columns: 1fr; gap: 40px; }
  .reel-copy { min-height: 86vh; padding: 90px 0 130px; }
  .footer-contact-panel { grid-template-columns: 1fr; }
  .resource-panel { grid-template-columns: 1fr; }
  .quick-link-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-shell { grid-template-columns: 1fr; }
  .direct-card { position: static; }
}

@media (max-width: 720px) {
  .shell { width: min(100% - 32px, 1240px); }
  .top-strip-inner { justify-content: center; }
  .top-strip-inner > span, .top-contact span, .top-contact > a:last-of-type, .utility-separator { display: none; }
  .accessibility-tools button:nth-child(-n+3) { display: none; }

  .reel-copy h1 { font-size: clamp(2rem, 9vw, 2.8rem); }
  .reel-hud { flex-direction: column; align-items: flex-start; gap: 12px; }
  .reel-arrow { width: 42px; height: 42px; font-size: 1.3rem; }
  .reel-arrow.prev { left: 12px; }
  .reel-arrow.next { right: 12px; }

  .section { padding: 72px 0; }
  .section-heading-row { flex-direction: column; align-items: flex-start; }
  .service-grid { grid-template-columns: 1fr; }
  .news-card { flex-basis: 86%; }
  .slot-group, .field-row { grid-template-columns: 1fr; }
  .intake-form, .intake-head { padding-inline: 24px; }
  .quick-link-grid { grid-template-columns: 1fr; }
  .cookie-banner { flex-direction: column; align-items: stretch; gap: 14px; width: calc(100% - 28px); }
  .floating-contact { right: 14px; bottom: 14px; }
  .sticky-bar { width: calc(100% - 28px); justify-content: space-between; padding-inline: 16px; }
  .announcement-modal { display: block; }
  .modal-image { min-height: 280px; max-height: 330px; }
  .modal-copy { padding: 30px 22px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* =========================================================
   Design 22 Reskin Layer v4 — ม่วงลึก + ส้ม + ลาเวนเดอร์
   (ทับบนธีมเดิมแบบ scoped ไม่แก้โครงสร้างเดิม)
   ========================================================= */

/* ปุ่มส้ม/แท็บส้ม — ตัวหนังสือขาวตามแบบ 22 */
::selection { color: #fff; }
.button.primary,
.button.warm:hover,
.search-box button,
.search-form-main button,
.audience-tabs button.is-active,
.content-tabs button.is-active,
.resource-tabs button.is-active,
.cookie-button.primary,
.pagination .page-numbers.current,
.pill-group input:checked + label,
.channel-icon,
.facebook-mark,
.quick-link-grid a:hover,
.announcement-modal .button.primary { color: #ffffff; }

.marquee { color: #ffffff; border-bottom-color: rgba(52, 0, 117, 0.18); }

/* ---------- Top strip: แถบม่วงแบบ header ของแบบ 22 ---------- */
.top-strip { background: var(--primary); color: #d3bbff; border-bottom: 0; }
.top-strip a { color: #ebdcff; }
.top-strip a:hover { color: #ffffff; }
.accessibility-tools button { color: #d3bbff; }
.accessibility-tools button:hover { border-color: var(--neon); color: #ffffff; }
.top-strip .utility-separator { color: rgba(211, 187, 255, 0.4); }
.lang-switch a { color: #d3bbff; border-color: rgba(211, 187, 255, 0.35); }
.lang-switch .current-lang a, .lang-switch a:hover { border-color: var(--neon); color: #ffffff; }

/* ---------- Header: พื้นขาวลอยน้ำ ---------- */
.site-header { background: rgba(255, 255, 255, 0.92); border-bottom: 1px solid var(--line); box-shadow: 0 6px 24px rgba(52, 0, 117, 0.06); }
.brand-mark { border-color: var(--primary); color: var(--primary); box-shadow: 0 0 24px rgba(52, 0, 117, 0.18); }
.main-nav a:hover, .main-nav .current-menu-item a { color: var(--primary); }

/* ---------- Hero reel: ม่วง cinematic แบบแบบ 22 ---------- */
.reel { background: #260059; }
.reel-slide img { filter: saturate(1.02) contrast(1.05) brightness(0.66); }
.reel-slide::after {
  background:
    linear-gradient(90deg, rgba(26, 0, 58, 0.94) 0%, rgba(26, 0, 58, 0.55) 46%, rgba(26, 0, 58, 0.22) 100%),
    linear-gradient(0deg, rgba(18, 0, 42, 0.92) 0%, transparent 40%),
    radial-gradient(120% 90% at 85% 10%, rgba(254, 147, 44, 0.14), transparent 55%);
}
.reel-slide .reel-word { -webkit-text-stroke: 1px rgba(235, 220, 255, 0.18); }
.reel-copy .reel-lead { color: #e4d9fb; }
.reel-copy h1 .accent { color: var(--neon-2); }
.reel-chapter { color: #b994ff; }
.reel-arrow { background: rgba(18, 0, 42, 0.55); border-color: rgba(235, 220, 255, 0.28); color: #ffffff; }
.reel-arrow:hover { border-color: var(--neon); color: var(--neon-2); }
.reel-sound { border-color: rgba(235, 220, 255, 0.28); }
.reel-sound span { background: #b994ff; }
.reel-dots button i { background: rgba(255, 255, 255, 0.28); }
.hero .button.ghost { border-color: rgba(255, 255, 255, 0.4); color: #ffffff; background: rgba(255, 255, 255, 0.06); }
.hero .button.ghost:hover { border-color: var(--neon); color: var(--neon-2); }

/* ---------- President Welcome (layout จาก design-15) ---------- */
.president-section { position: relative; background: linear-gradient(180deg, #f3efff 0%, #f9f9ff 100%); padding: 84px 0 88px; overflow: hidden; }
.president-section::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 50% at 12% 8%, rgba(52, 0, 117, 0.08), transparent 60%),
              radial-gradient(50% 40% at 92% 90%, rgba(254, 147, 44, 0.10), transparent 55%);
}
.president-card {
  position: relative;
  display: grid; grid-template-columns: minmax(280px, 420px) 1fr; gap: clamp(28px, 4.5vw, 64px);
  align-items: stretch;
  background: #ffffff; border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 24px 70px rgba(38, 0, 89, 0.10);
  padding: clamp(24px, 3.2vw, 44px);
}
.president-photo { position: relative; min-height: 460px; border-radius: 12px; overflow: hidden; background: linear-gradient(160deg, #4c1d95 0%, #340075 55%, #260059 100%); }
.president-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.president-photo .president-fade {
  position: absolute; inset: 0;
  background: linear-gradient(to top, #1e0a45 0%, rgba(30, 10, 69, 0.55) 26%, rgba(30, 10, 69, 0.12) 55%, transparent 100%);
}
.president-photo .president-monogram {
  position: absolute; top: 46%; left: 50%; transform: translate(-50%, -50%);
  font-family: var(--f-en); font-size: clamp(4.4rem, 6vw, 6rem); color: rgba(235, 220, 255, 0.2);
  letter-spacing: 0.06em; pointer-events: none;
}
.president-photo .president-badge {
  position: absolute; left: 18px; bottom: 116px;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--gold); color: #3a2c07;
  font-family: var(--f-oswald); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.22em; text-transform: uppercase;
  padding: 8px 16px; border-radius: 999px; box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
}
.president-photo .president-name { position: absolute; left: 20px; right: 18px; bottom: 56px; color: #ffffff; font-weight: 700; font-size: 1.22rem; line-height: 1.3; }
.president-photo .president-role { position: absolute; left: 20px; bottom: 30px; color: #d3bbff; font-size: 0.86rem; }
.president-photo .president-cred {
  position: absolute; left: 20px; right: 18px; bottom: 12px;
  padding-top: 10px; border-top: 1px solid rgba(211, 187, 255, 0.35);
  color: #fcd34d; font-family: var(--f-oswald); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em;
}
.president-copy { display: flex; flex-direction: column; justify-content: center; }
.president-pills { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.president-pills span {
  display: inline-flex; align-items: center;
  font-family: var(--f-oswald); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  padding: 7px 14px; border-radius: 999px;
}
.president-pills .pill-purple { background: var(--primary); color: #ffffff; }
.president-pills .pill-gold { background: rgba(245, 185, 66, 0.18); color: var(--gold-deep); border: 1px solid rgba(245, 185, 66, 0.5); }
.president-copy h2 { margin: 0 0 18px; color: #151c27; font-size: clamp(1.6rem, 2.6vw, 2.3rem); font-weight: 800; line-height: 1.25; }
.president-quote {
  margin: 0 0 18px; padding-left: 18px; border-left: 4px solid var(--gold);
  color: var(--primary); font-family: var(--f-en); font-style: italic; font-size: clamp(1.05rem, 1.5vw, 1.3rem); line-height: 1.6;
}
.president-copy p.president-body { margin: 0 0 26px; color: var(--muted); line-height: 1.85; }
.president-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.president-note { font-family: var(--f-oswald); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); }

@media (max-width: 900px) {
  .president-card { grid-template-columns: 1fr; }
  .president-photo { min-height: 420px; }
}

/* ---------- Footer: ม่วงเข้ม ---------- */
.site-footer { background: #1c0038; color: #b994ff; }
.site-footer a { color: #d3bbff; }
.site-footer a:hover { color: var(--neon-2); }
.site-footer strong, .site-footer h2, .site-footer h3 { color: #ffffff; }

/* ---------- ป็อปอัพ/แบนเนอร์คุกกี้/toast: พื้นสว่าง ---------- */
.cookie-banner { background: rgba(255, 255, 255, 0.97) !important; color: var(--silver) !important; border: 1px solid var(--line); box-shadow: 0 18px 60px rgba(38, 0, 89, 0.2); }
.cookie-banner .cookie-copy strong { color: var(--silver); }
.cookie-banner .cookie-copy p, .cookie-banner small { color: var(--muted) !important; }
.announcement-modal { background: rgba(255, 255, 255, 0.96) !important; color: var(--silver) !important; border: 1px solid var(--line); }
.slide-source { background: rgba(240, 243, 255, 0.92); }
.slide-arrow { background: rgba(255, 255, 255, 0.8); color: var(--primary); }

/* ---------- Toast ---------- */
.toast { background: #ffffff; color: var(--silver); border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(38, 0, 89, 0.18); }

/* ---------- Floating contact / sticky bar ---------- */
.floating-contact { background: #ffffff; border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(38, 0, 89, 0.16); }
.floating-contact a { color: var(--primary); }

/* ---------- Archive / singular พื้นสว่าง ---------- */
.archive-hero, .page-head { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%); color: #ffffff; }
.archive-hero h1, .page-head h1 { color: #ffffff; }

/* ---------- วารสารสองยุค (TEJ + เอ็นโดสาร) ---------- */
.journal-era-grid { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin-top: 6px; }
.journal-era { position: relative; padding: 32px 30px 26px; border: 1px solid var(--line); background: var(--panel); }
.journal-era::before {
  content: "";
  position: absolute; left: -2px; top: -2px;
  width: 44px; height: 44px;
  border-width: 2px 0 0 2px; border-style: solid; border-color: var(--neon);
}
.journal-era-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.journal-era h3 { margin: 0; color: var(--silver); font-size: 1.42rem; font-weight: 700; line-height: 1.3; }
.journal-era h3 .display-en { margin-left: 6px; color: var(--neon); font-size: 1rem; letter-spacing: 0.14em; }
.journal-era > p { margin: 0 0 16px; color: var(--muted); line-height: 1.85; }
.journal-links { list-style: none; margin: 0; padding: 0; }
.journal-links li + li { border-top: 1px solid var(--line-soft); }
.journal-links a { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 12px 2px; transition: translate 200ms; }
.journal-links a:hover { translate: 6px 0; }
.journal-links a:hover strong { color: var(--neon); }
.journal-links strong { color: var(--silver); font-size: 0.97rem; font-weight: 500; line-height: 1.5; }
.journal-links small { flex: 0 0 auto; color: var(--dim); font-family: var(--f-mono); font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase; }
.journal-note { margin: 12px 0 0; color: var(--dim); font-size: 0.84rem; line-height: 1.7; }
.journal-notices { margin-top: 34px; border: 1px solid var(--line); background: var(--panel-2); }
.journal-notices .resource-panel-title { padding: 20px 26px; border-bottom: 1px solid var(--line); background: var(--panel); }
.journal-notices .resource-list { padding: 4px 10px; }

/* ---------- แกลเลอรีภาพกิจกรรม ---------- */
.gallery-section .section-heading-row { margin-bottom: 30px; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.gallery-item { position: relative; margin: 0; overflow: hidden; border: 1px solid var(--line); background: var(--panel); }
.gallery-item a { display: block; }
.gallery-item img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
  filter: grayscale(0.35) contrast(1.05);
  transition: filter 320ms ease, transform 560ms cubic-bezier(0.2, 0.72, 0.24, 1);
}
.gallery-item:hover img { filter: none; transform: scale(1.045); }
.gallery-item figcaption {
  position: absolute; inset: auto 0 0 0;
  padding: 34px 16px 14px;
  background: linear-gradient(0deg, rgba(26, 0, 58, 0.94) 20%, rgba(26, 0, 58, 0) 100%);
  color: #ffffff; font-size: 0.88rem; font-weight: 500; line-height: 1.5;
}
.gallery-item figcaption small { display: block; margin-top: 3px; color: rgba(255, 255, 255, 0.74); font-family: var(--f-mono); font-size: 0.62rem; letter-spacing: 0.14em; }
.gallery-more { display: inline-flex; margin-top: 26px; }

@media (max-width: 960px) {
  .journal-era-grid, .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .journal-era-grid, .gallery-grid { grid-template-columns: 1fr; }
  .journal-era { padding: 24px 20px 20px; }
}

/* ================================================================
   PASS 4 — สกินตามต้นฉบับ design-22 ให้เต็มรูปแบบ (Material look)
   มุมโค้ง · Manrope ทุกฉลาก · ภาพเต็มสี · การ์ดขาวเงานุ่ม
   ================================================================ */
:root {
  --f-mono: 'Manrope', 'Noto Sans Thai', sans-serif;
  --r-xl: 18px; --r-lg: 14px; --r-md: 10px; --r-sm: 6px;
}

/* ---- โลโก้และแถบบน ---- */
.brand-mark {
  border-radius: var(--r-md); border: 0;
  background: var(--primary); color: #fff;
  clip-path: none; box-shadow: 0 6px 18px rgba(52, 0, 117, 0.28);
  font-family: var(--f-oswald); letter-spacing: 0.08em;
}
.top-strip { background: var(--primary); color: rgba(255, 255, 255, 0.92); border-bottom: 0; }
.top-strip a { color: rgba(255, 255, 255, 0.92); }
.top-strip .utility-separator { color: rgba(255, 255, 255, 0.35); }
.accessibility-tools button, .lang-switch a {
  border-radius: var(--r-sm); border-color: rgba(255, 255, 255, 0.35);
  color: #fff; background: transparent;
}
.accessibility-tools button:hover, .lang-switch a:hover, .lang-switch .current-lang a { background: rgba(255, 255, 255, 0.16); border-color: transparent; }

/* ---- เมนูหลักแบบ pill ---- */
.site-header { background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(14px); box-shadow: 0 1px 10px rgba(21, 28, 39, 0.06); }
.main-nav a {
  border-radius: var(--r-md); padding: 8px 14px; text-transform: none;
  font-size: 0.95rem; letter-spacing: 0.01em; font-weight: 600; color: var(--muted);
  transition: background 160ms, color 160ms;
}
.main-nav a::after { display: none; }
.main-nav a:hover, .main-nav a:focus-visible { background: var(--panel-2); color: var(--primary); }
.main-nav .current-menu-item a { background: var(--panel-2); color: var(--primary); }

/* ---- ฉลาก: เลิก mono ตัวใหญ่ ใช้ Manrope ปกติ ---- */
.mono-label, .section-kicker, .reel-chapter, .resource-panel-title span,
.journal-links small, .resource-list small, .gallery-item figcaption small,
.news-card .news-image span, .slide-source, .search-suggestions {
  font-family: var(--f-oswald); text-transform: none; letter-spacing: 0.06em;
  font-size: 0.78rem; font-weight: 700;
}
.mono-label, .section-kicker { color: var(--primary-2); }
.reel-chapter { color: rgba(255, 255, 255, 0.85); }
.reel-chapter b { color: var(--neon-2); }

/* ---- ปุ่มทุกตัว: โค้ง + ปกติ ---- */
.button, .button.primary, .button.ghost, .button.warm,
.cookie-button, .search-box button, .wp-block-button__link {
  border-radius: var(--r-md); text-transform: none; letter-spacing: 0.02em;
  box-shadow: 0 8px 22px rgba(52, 0, 117, 0.18);
}
.button.primary { background: var(--neon); color: #fff; }
.button.primary::before { display: none; }
.button.primary:hover { background: #f0830f; transform: translateY(-1px); }
.button.ghost { background: transparent; color: var(--primary); }
.button.ghost:hover { border-color: var(--primary); color: var(--primary); background: var(--panel-2); }
.search-box input, .search-box button { border-radius: var(--r-md); }
.search-box button { background: var(--primary); color: #fff; }

/* ---- Hero: ภาพเต็มสี + overlay ม่วง ---- */
.reel-slide img { filter: none; }
.reel-slide::after {
  background:
    linear-gradient(90deg, rgba(26, 0, 58, 0.94) 0%, rgba(38, 0, 89, 0.55) 48%, rgba(38, 0, 89, 0.18) 100%),
    linear-gradient(0deg, rgba(26, 0, 58, 0.85) 0%, rgba(26, 0, 58, 0) 34%);
}
.reel-copy h1 { color: #fff; }
.reel-lead { color: rgba(255, 255, 255, 0.88); }
.reel-arrow { border-radius: 999px; background: rgba(255, 255, 255, 0.85); color: var(--primary); border: 0; }
.reel-arrow:hover { background: var(--neon); color: #fff; }
.reel-progress i { background: linear-gradient(90deg, var(--neon), #ffdcc3); }

/* ---- การ์ดขาว + เงานุ่มทั่วเว็บ ---- */
.news-card, .flip-card, .resource-panel, .network-card, .journal-era,
.journal-notices, .gallery-item, .president-card, .audience-tabs button,
.content-tabs button, .resource-tabs button {
  border-radius: var(--r-lg);
}
.news-card { background: #fff; border: 1px solid var(--line); box-shadow: 0 4px 18px rgba(21, 28, 39, 0.06); overflow: hidden; }
.news-card:hover { box-shadow: 0 14px 34px rgba(52, 0, 117, 0.14); }
.news-card .news-image img { filter: none; }
.news-card .news-image span { background: var(--primary); color: #fff; border-radius: var(--r-sm); }
.resource-panel { box-shadow: 0 4px 18px rgba(21, 28, 39, 0.06); }
.resource-list a { border-radius: var(--r-md); margin: 4px 0; border-bottom: 0; }
.resource-list a:hover { background: var(--panel-2); }
.network-card { box-shadow: 0 4px 18px rgba(21, 28, 39, 0.06); }
.journal-era { box-shadow: 0 4px 18px rgba(21, 28, 39, 0.06); }
.gallery-item { box-shadow: 0 4px 18px rgba(21, 28, 39, 0.06); }
.gallery-item img { filter: none; }

/* ---- แท็บแบบ pill ---- */
.content-tabs button, .resource-tabs button, .audience-tabs button {
  border-radius: 999px; border: 1px solid var(--line); background: #fff;
  color: var(--muted); text-transform: none; font-weight: 600;
  padding: 9px 20px; transition: all 160ms;
}
.content-tabs button:hover, .resource-tabs button:hover, .audience-tabs button:hover { color: var(--primary); border-color: var(--primary-2); }
.content-tabs button.is-active, .resource-tabs button.is-active, .audience-tabs button.is-active {
  background: var(--primary); color: #fff; border-color: var(--primary);
}

/* ---- flip card: หน้าการ์ดโค้งมน ---- */
.flip-card-inner, .flip-face { border-radius: var(--r-lg); }
.flip-face { border: 1px solid var(--line); }
.flip-front { background: #fff; box-shadow: 0 4px 18px rgba(21, 28, 39, 0.06); }
.flip-front h3 { color: var(--primary); }
.flip-back { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%); }
.flip-back a { color: var(--neon-2); }

/* ---- สถิติ / ข้อความ ---- */
.about-stats div { background: var(--panel-2); border-radius: var(--r-md); padding: 16px 18px; }
.about-stats b { color: var(--primary); }
h2 { color: var(--primary); }
.section-alt { background: var(--panel-2); }

/* ---- marquee / sticky bar / floating ---- */
.marquee { background: var(--neon); color: #fff; }
.sticky-bar { background: var(--primary); color: #fff; }
.sticky-bar .button.primary { background: var(--neon); }
.floating-contact { border-radius: 999px; }
.quick-link-grid a { border-radius: var(--r-md); }
.quick-link-grid a:hover { background: var(--panel-2); }
.text-link { color: var(--primary); font-weight: 600; }

/* ---- hero hud / dots ---- */
.reel-dots button i { border-radius: 999px; }
.reel-dots button.is-active i { box-shadow: none; }

/* ---- ฟอร์ม/อินพุต ---- */
input[type="text"], input[type="email"], input[type="tel"], input[type="search"], textarea, select {
  border-radius: var(--r-md);
}

/* ================================================================
   PASS 5 — (ก) แก้คอนทราสต์ hero  (ข) ระบบหน้าในแบบ design-22
   ================================================================ */

/* ---- (ก) hero: overlay เข้มขึ้น + เงาตัวอักษร อ่านออกทุกสไลด์ ---- */
.reel { background: #260059; }
.reel-slide::after {
  background:
    linear-gradient(90deg, rgba(20, 0, 46, 0.96) 0%, rgba(26, 0, 58, 0.82) 42%, rgba(26, 0, 58, 0.5) 72%, rgba(26, 0, 58, 0.32) 100%),
    linear-gradient(0deg, rgba(20, 0, 46, 0.9) 0%, rgba(20, 0, 46, 0.25) 30%, rgba(20, 0, 46, 0) 55%);
}
.reel-copy h1, .reel-copy .mono-label, .reel-chapter {
  text-shadow: 0 2px 18px rgba(15, 0, 35, 0.65), 0 1px 3px rgba(15, 0, 35, 0.55);
}
.reel-lead { text-shadow: 0 1px 12px rgba(15, 0, 35, 0.7); }

/* ---- (ข) Page hero ของหน้าใน: แบนเนอร์ม่วง + breadcrumb ---- */
.page-header { display: none; }
.page-hero {
  background:
    radial-gradient(900px 340px at 85% -60px, rgba(254, 147, 44, 0.22), rgba(0,0,0,0) 60%),
    linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 78%, #5a00c6 100%);
  color: #fff; padding: 54px 0 46px; position: relative; overflow: hidden;
}
.page-hero::after {
  content: ""; position: absolute; right: -80px; bottom: -140px;
  width: 340px; height: 340px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.06); pointer-events: none;
}
.page-hero-compact { padding: 44px 0 38px; }
.page-hero .shell { position: relative; z-index: 2; }
.page-hero h1 {
  margin: 10px 0 0; color: #fff; font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; max-width: 26ch;
}
.page-hero > .shell > p { margin: 10px 0 0; color: rgba(255, 255, 255, 0.82); max-width: 60ch; font-weight: 300; }
.breadcrumb {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.14); backdrop-filter: blur(6px);
  font-size: 0.78rem; font-weight: 600; color: rgba(255, 255, 255, 0.92);
}
.breadcrumb a { color: #fff; }
.breadcrumb a:hover { text-decoration: underline; }
.page-hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.hero-chip {
  padding: 5px 13px; border-radius: 999px; background: rgba(254, 147, 44, 0.92);
  color: #fff; font-size: 0.78rem; font-weight: 700;
}
.hero-chip.ghost-chip { background: rgba(255, 255, 255, 0.16); }

/* ---- คอนเทนเนอร์หน้าใน ---- */
.archive-wrap, .singular-wrap { padding: 42px 0 70px; }
.singular-wrap { display: grid; justify-items: center; }
.content-card {
  width: min(880px, 100%); background: #fff;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: 0 10px 34px rgba(21, 28, 39, 0.08);
  padding: clamp(24px, 4vw, 44px);
}
.content-card.empty-state { text-align: center; padding: 60px 30px; }
.content-card.empty-state h2 { color: var(--primary); margin: 0 0 8px; }
.content-card.empty-state p { color: var(--muted); margin: 0 0 22px; }
.content-thumb { margin: -8px 0 24px; border-radius: var(--r-md); overflow: hidden; }
.content-thumb img { width: 100%; height: auto; }

/* ---- พิมพ์อักษรเนื้อหา: ระยะอ่านสบาย มาตรฐาน ---- */
.entry-content { color: #262b36; font-size: 1.02rem; line-height: 1.95; }
.entry-content p { margin: 0 0 1.15em; }
.entry-content h2, .entry-content h3, .entry-content h4 { color: var(--primary); line-height: 1.4; margin: 1.6em 0 0.6em; }
.entry-content h2 { font-size: 1.5rem; }
.entry-content h3 { font-size: 1.22rem; }
.entry-content a { color: var(--primary-2); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; margin: 0 0 1.15em; }
.entry-content li { margin-bottom: 0.5em; }
.entry-content li::marker { color: var(--neon); font-weight: 700; }
.entry-content img { border-radius: var(--r-md); }
.entry-content > *:last-child { margin-bottom: 0; }
.doc-link { margin-bottom: 20px; display: inline-flex; }
.entry-footer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line-soft);
  color: var(--dim); font-size: 0.84rem;
}

/* ---- กริดการ์ดหน้ารวม ---- */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.news-grid .news-card.featured { grid-column: span 2; }
.archive-wrap .news-card { display: flex; flex-direction: column; }
.archive-wrap .news-body { display: flex; flex-direction: column; flex: 1; padding: 18px 20px 16px; }
.archive-wrap .news-body h3 { margin: 6px 0 8px; font-size: 1.05rem; line-height: 1.45; }
.archive-wrap .news-body h3 a { color: var(--silver); }
.archive-wrap .news-body h3 a:hover { color: var(--primary); }
.archive-wrap .news-body p { margin: 0 0 14px; color: var(--muted); font-size: 0.9rem; flex: 1; }
.archive-wrap .news-body time { color: var(--dim); font-size: 0.76rem; font-family: var(--f-oswald); font-weight: 600; }
.archive-wrap .text-link { margin-top: auto; }
.news-card .news-image { aspect-ratio: 16 / 9; overflow: hidden; }
.news-card .news-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 500ms cubic-bezier(0.2, 0.72, 0.24, 1); }
.news-card:hover .news-image img { transform: scale(1.05); }

/* ---- ฟอร์มค้นหาหน้ารวม ---- */
.search-form-main {
  display: grid; grid-template-columns: 1fr auto; gap: 10px;
  max-width: 620px; margin: 0 auto 34px;
}
.search-form-main input {
  min-height: 52px; padding: 0 20px; border: 1px solid var(--line);
  border-radius: var(--r-md); background: #fff; color: var(--silver);
  font: inherit; outline: none; box-shadow: 0 3px 12px rgba(21, 28, 39, 0.05);
}
.search-form-main input:focus { border-color: var(--primary-2); box-shadow: 0 0 0 3px rgba(76, 29, 149, 0.12); }
.search-form-main button {
  min-height: 52px; padding: 0 26px; border: 0; border-radius: var(--r-md);
  background: var(--primary); color: #fff; font-weight: 700; cursor: pointer;
}

/* ---- เพจเนชันแบบ pill ---- */
.pagination { display: flex; justify-content: center; margin-top: 40px; }
.pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; margin: 0 4px; padding: 0 12px;
  border-radius: 999px; border: 1px solid var(--line); background: #fff;
  color: var(--muted); font-weight: 600; font-size: 0.9rem;
}
.pagination .page-numbers:hover { border-color: var(--primary-2); color: var(--primary); }
.pagination .page-numbers.current { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination .page-numbers.dots { border: 0; background: transparent; }

/* ---- ไอคอนช่องทางติดต่อ footer ---- */
.channel-icon {
  width: 46px; height: 46px; border-radius: var(--r-md);
  display: inline-grid; place-items: center; flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.12); color: #fff;
}
.contact-channel.facebook .channel-icon { background: #1877f2; }
.contact-channel.line .channel-icon { background: #06c755; color: #fff; }
.contact-channel.instagram .channel-icon { background: linear-gradient(45deg, #f09433, #e6683c 30%, #dc2743 55%, #cc2366 80%, #bc1888); }
.contact-channel.email .channel-icon { background: var(--primary-2); }

/* ---- โลโก้ footer ---- */
.footer-brand .brand-mark {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  font-family: var(--f-en), serif; font-weight: 600; box-shadow: none;
}

/* ---- มือถือ ---- */
@media (max-width: 900px) {
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .news-grid .news-card.featured { grid-column: span 2; }
}
@media (max-width: 620px) {
  .news-grid { grid-template-columns: 1fr; }
  .news-grid .news-card.featured { grid-column: span 1; }
  .search-form-main { grid-template-columns: 1fr; }
}

/* ---------- โลโก้สมาคมจริง ---------- */
.brand-logo {
  width: 46px; height: 46px; flex: 0 0 auto;
  border-radius: 999px; background: #fff;
  object-fit: contain; padding: 2px;
  box-shadow: 0 2px 10px rgba(52, 0, 117, 0.18);
}
.footer-logo {
  width: 64px; height: 64px; border-radius: 999px; background: #fff;
  object-fit: contain; padding: 3px; margin-bottom: 12px;
}

/* ================= PASS 6 (2026-09-13): เมนูบรรทัดเดียว + cookie แถบบาง ================= */
/* เมนูหลัก: ห้ามตัดคำเป็นสองบรรทัด */
.site-header { position: relative; }
.main-nav ul { gap: clamp(8px, 1.1vw, 16px); }
.main-nav ul li { flex: 0 0 auto; }
.main-nav a { white-space: nowrap; font-size: 0.9rem; padding: 8px 10px; }
.brand { gap: 10px; }
.brand strong { font-size: 0.98rem; }
@media (max-width: 1120px) {
  .main-nav { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 60; padding: 14px; display: none; border: 1px solid var(--line); background: #fff; box-shadow: 0 18px 50px rgba(21, 28, 39, 0.14); }
  .main-nav.is-open, .main-nav.toggled { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav a { display: block; padding: 12px 12px; }
  .menu-button { display: block; }
}

/* cookie: แถบบางเต็มความกว้าง แทนกล่อง 880px */
.cookie-banner { left: 16px; right: 16px; bottom: 16px; width: auto; transform: none; align-items: center; gap: 18px; padding: 12px 18px; }
.cookie-copy { max-width: none; flex: 1; min-width: 0; }
.cookie-copy strong { margin-bottom: 2px; font-size: 0.85rem; }
.cookie-copy p { font-size: 0.75rem; }
.cookie-actions { flex: 0 0 auto; flex-wrap: nowrap; gap: 8px; }
.cookie-button { min-height: 36px; padding: 0 14px; font-size: 0.72rem; }
.cookie-settings { margin-top: 10px; }

/* ปุ่มลอย: ใช้ไอคอน Material Symbols ให้เข้าชุดกับทั้งเว็บ */
.floating-contact span.material-symbols-outlined { font-size: 20px; line-height: 1; }
.floating-contact,
.floating-contact span.material-symbols-outlined,
.floating-contact small { color: #4b1596; }
.floating-contact:hover { border-color: #6d28a8; background: #f7f2ff; }
.cookie-settings[hidden] { display: none; }

/* ---- PASS 6b: การ์ดช่องทางติดต่อ — พื้นสว่างต้องใช้ตัวหนังสือเข้ม (เดิมค้างสีอ่อนของธีมดำ อ่านไม่ออก) ---- */
.contact-channel { border-color: #e4e2f5; background: #f9f9ff; box-shadow: 0 2px 10px rgba(42, 12, 84, 0.05); }
.contact-channel:hover { border-color: #4c1d95; }
.contact-channel small { color: #6b5f82; letter-spacing: 0.16em; }
.contact-channel strong { color: #2b1b4d; font-weight: 700; }
.contact-channel b { color: #4c1d95; }

/* ================= PASS 7 (2026-09-13): popup กลางจอจริง + อ่านออก + การ์ดเท่ากัน ================= */
/* Popup ประกาศ: เป็น modal กลางจอจริง (เดิมไร้ CSS ตำแหน่ง โผล่ท้ายหน้า + หัวข้อขาวบนขาว) */
.modal-backdrop { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; overflow-y: auto; }
.modal-backdrop[hidden] { display: none; }
.announcement-modal {
  position: relative; display: grid; grid-template-columns: 1.15fr 1fr;
  width: min(780px, 94vw); max-height: min(88vh, 720px); overflow: hidden;
  border-radius: 14px; box-shadow: 0 30px 90px rgba(26, 0, 60, 0.5);
}
.announcement-modal .modal-close {
  position: absolute; top: 10px; right: 10px; z-index: 6;
  width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 50%; background: rgba(255, 255, 255, 0.92); color: #4c1d95;
  border: 0; font-size: 20px; line-height: 1; cursor: pointer;
}
.modal-image { position: relative; min-height: 280px; }
.modal-image img { width: 100%; height: 100%; object-fit: cover; display: block; filter: none; }
.slide-source { position: absolute; left: 10px; bottom: 10px; padding: 4px 10px; border-radius: 999px; border-left: 0; font-size: 11px; color: #2b1b4d; }
.slide-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: #4c1d95; font-size: 18px; border: 0; cursor: pointer; }
.slide-arrow.previous { left: 10px; } .slide-arrow.next { right: 10px; }
.modal-copy { padding: 26px 24px 22px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; }
.modal-copy h2 { color: #340075; font-size: 1.3rem; line-height: 1.4; }
.modal-copy > p:not(.section-kicker) { color: #3f3a4d; font-size: 0.92rem; line-height: 1.75; }
.modal-copy .section-kicker { color: #b45309; font-weight: 800; font-size: 0.72rem; letter-spacing: 0.14em; }
.slide-count { color: #7a6f93; font-size: 11px; letter-spacing: 0.12em; }
.modal-actions { margin-top: 10px; }
.announcement-modal .button.primary { background: #fe932c; color: #331a00; box-shadow: none; font-weight: 700; border-radius: 10px; }
.remember-close { margin-top: 4px; align-self: flex-start; background: none; border: 0; padding: 4px 0; color: #7a6f93; font-size: 0.75rem; text-decoration: underline; cursor: pointer; }
.slide-dots { display: flex; gap: 6px; margin-top: 10px; }
@media (max-width: 720px) {
  .announcement-modal { grid-template-columns: 1fr; max-height: 90vh; }
  .modal-image { min-height: 190px; max-height: 250px; }
}

/* การ์ดคู่ทุนวิจัย+TEJ: ยืดเต็มความสูงเท่ากัน ไม่เหลือช่องว่างโล่ง */
.d22-duo { align-items: stretch; }
.d22-duo .d22-card { height: 100%; }
.d22-duo .d22-card > .d22-actions { margin-top: auto; }

/* ปุ่มส้ม: ตัวหนังสือเข้ม อ่านออกบนพื้นส้ม (เดิมขาวบนส้ม contrast 2.1:1) */
.d22-btn-orange, .announcement-modal .button.primary, .d22-actions .d22-btn-orange { color: #331a00; font-weight: 700; }

/* kicker แถบม่วง TEJ กับ subtitle การ์ดรอง: เข้มขึ้น อ่านชัดขึ้น */
.d22-tej-banner .kicker { color: #fff; font-size: 12px; }
.d22-companion p, .d22-companion small { color: #ffe9d6; }

/* ================= PASS 8: คอมโพเนนต์เนื้อหาบรรณาธิการ (.tp-*) ================= */
.tp-lead { margin: 0 0 22px; font-size: 1.08rem; line-height: 1.9; color: #2b2340; }
.tp-lead::first-letter { font-weight: 800; color: var(--primary); }
.tp-info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin: 0 0 24px; }
.tp-info { padding: 14px 16px; border: 1px solid rgba(76, 29, 149, 0.14); border-radius: 12px; background: #f9f9ff; }
.tp-info .k { display: flex; align-items: center; gap: 7px; margin-bottom: 6px; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #7a6f93; }
.tp-info .k .material-symbols-outlined { font-size: 17px; color: #e07800; }
.tp-info .v { font-size: 0.95rem; font-weight: 700; color: #241a3e; line-height: 1.5; }
.tp-info .v small { display: block; margin-top: 2px; font-weight: 500; color: #6b5f82; font-size: 0.8rem; }
.entry-content .tp-figure { margin: 26px 0; padding: 14px; border: 1px solid rgba(76, 29, 149, 0.14); border-radius: 14px; background: #f9f9ff; text-align: center; }
.entry-content .tp-figure img { max-width: 460px; width: 100%; height: auto; border-radius: 10px; box-shadow: 0 10px 30px rgba(42, 12, 84, 0.18); }
.entry-content .tp-figure figcaption { margin-top: 10px; font-size: 0.8rem; color: #6b5f82; }
.tp-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 26px 0 6px; padding: 18px 20px; border-radius: 14px; background: linear-gradient(100deg, #340075, #4c1d95); color: #fff; }
.tp-cta .msg { flex: 1; min-width: 220px; font-size: 0.95rem; font-weight: 700; line-height: 1.55; }
.tp-cta .msg small { display: block; margin-top: 2px; font-weight: 500; font-size: 0.78rem; color: rgba(255, 255, 255, 0.75); }
.tp-cta a { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 10px; background: #fe932c; color: #331a00; font-size: 0.88rem; font-weight: 800; text-decoration: none; }
.tp-cta a:hover { background: #f5841a; }
.tp-cta a.ghost { background: rgba(255, 255, 255, 0.12); color: #fff; border: 1px solid rgba(255, 255, 255, 0.45); }
.tp-cta .material-symbols-outlined { font-size: 18px; }
.entry-content h2 { margin: 30px 0 12px; font-size: 1.25rem; font-weight: 800; color: var(--primary); }
.entry-content ul.tp-list { margin: 0 0 20px; padding: 0; list-style: none; }
.entry-content ul.tp-list li { position: relative; padding: 6px 0 6px 26px; font-size: 0.95rem; line-height: 1.75; color: #2b2340; }
.entry-content ul.tp-list li::before { content: "check_circle"; position: absolute; left: 0; top: 8px; font-family: 'Material Symbols Outlined'; font-size: 17px; color: #e07800; }
.tp-registration { overflow: hidden; margin: 0 0 26px; border: 1px solid rgba(76, 29, 149, .16); border-radius: 14px; background: #fff; box-shadow: 0 10px 28px rgba(46, 16, 90, .08); }
.tp-fee-head, .tp-fee-row { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(108px, .8fr) minmax(108px, .8fr); gap: 12px; align-items: center; padding: 14px 18px; }
.tp-fee-head { background: linear-gradient(100deg, #270052, #54219e); color: #fff; font-size: .78rem; font-weight: 800; letter-spacing: .035em; }
.tp-fee-row { border-top: 1px solid rgba(76, 29, 149, .1); color: #312447; font-size: .94rem; line-height: 1.45; }
.tp-fee-row b { color: #7c2cc4; font-size: 1rem; white-space: nowrap; }
@media (max-width: 640px) { .tp-fee-head, .tp-fee-row { grid-template-columns: 1fr 1fr; gap: 7px 12px; padding: 13px 14px; } .tp-fee-head span, .tp-fee-row span { grid-column: 1 / -1; } .tp-fee-head b { font-size: .68rem; } .tp-fee-row b { font-size: .9rem; } }
@media (max-width: 640px) { .tp-cta { flex-direction: column; align-items: stretch; } .tp-cta a { justify-content: center; } }

/* ================= PASS 9: footer ติดต่อ — แถวกะทัดรัดแทนการ์ดใหญ่ ================= */
.footer-contact-panel { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 34px 0 22px; }
.footer-contact-intro span { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: #ffcf9e; }
.footer-contact-intro h2 { margin: 4px 0 0; font-size: 1.25rem; font-weight: 800; color: #fff; }
.footer-contact-intro p { display: none; }
.footer-contact-panel .contact-channel-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); flex: 1 1 480px; max-width: 640px; }
.contact-channel { padding: 10px 12px; grid-template-columns: auto minmax(0, 1fr); border-radius: 12px; }
.contact-channel b { display: none !important; }
.channel-icon { width: 34px; height: 34px; border-radius: 9px; }
.channel-icon svg { width: 17px; height: 17px; }
.contact-channel small { font-size: 0.62rem; letter-spacing: 0.1em; }
.contact-channel strong { font-size: 0.74rem; }
@media (max-width: 900px) {
  .footer-contact-panel .contact-channel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.contact-channel strong { font-size: 0.82rem; }
.contact-channel small { font-size: 0.64rem; }

/* ---- ปุ่มส้มเข้มตัวขาว (แทนส้มสว่างตัวดำ) ใช้ร่วมกันทั้งเว็บ ---- */
.tp-cta a { background: #b45309; color: #fff; }
.tp-cta a:hover { background: #9a4406; }
.announcement-modal .button.primary { background: #b45309; color: #fff; }
.cookie-button.primary { background: #b45309; color: #fff; }

/* ================= PASS 10: footer อ่านง่าย — สีสว่างขึ้น ไม่มีบรรทัดล้น ================= */
.footer-links a, .footer-links button { color: #e9e2f7 !important; }
.footer-links a:hover, .footer-links button:hover { color: #fff !important; }
.footer-brand p { color: #cfc7dc !important; letter-spacing: 0.06em; }
.footer-bottom span { color: #cfc7dc !important; }
.footer-bottom { letter-spacing: 0.06em; }
.contact-channel small { color: #5d5570 !important; }
.footer-grid { grid-template-columns: 1fr 1fr 1fr 1fr 1.6fr; gap: 30px; }
.footer-brand small, .footer-brand p { word-break: break-word; overflow-wrap: anywhere; white-space: normal; }
.site-footer h3 { color: #fff !important; letter-spacing: 0.08em; }
.contact-channel { min-width: 0; }
.contact-channel strong { white-space: normal; overflow-wrap: anywhere; word-break: break-word; line-height: 1.35; }
.footer-contact-panel .contact-channel-grid { max-width: 600px; }
@media (max-width: 1080px) { .footer-contact-panel .contact-channel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.contact-channel small { letter-spacing: 0.04em; white-space: normal; }

/* ---- footer-brand อ่านออกจริง (เดิมฟอนต์เล็ก 0.64rem พิมพ์ใหญ่ ระยะห่างกว้าง จนมองไม่เห็น) ---- */
.footer-brand p { font-family: inherit; text-transform: none; letter-spacing: 0.03em; font-size: 0.8rem; color: #e9e2f7; }
.footer-brand address { display: block; margin: 10px 0 0; font-style: normal; font-size: 0.86rem; line-height: 1.8; color: #d6cfe6; }
.footer-brand a[href^="tel"] { display: inline-block; margin-top: 10px; color: #ffd9ae; font-weight: 800; font-size: 0.9rem; text-decoration: none; }
.footer-brand h2 { font-size: 1.2rem; }

/* Logo system: responsive SVG wordmark from the approved association mark. */
.brand { min-width: 0; }
.brand picture { display: block; line-height: 0; }
.brand-logo-horizontal { display: block; width: clamp(220px, 24vw, 310px); height: auto; max-height: 64px; object-fit: contain; object-position: left center; }
.footer-logo { display: block; width: 72px; height: 72px; object-fit: contain; }
@media (max-width: 900px) {
  .brand-logo-horizontal { width: 240px; }
}
@media (max-width: 640px) {
  .brand-logo-horizontal { width: 48px; height: 48px; }
  .brand picture { width: 48px; height: 48px; }
  .brand-logo { width: 48px; height: 48px; }
}
@media (prefers-contrast: more) {
  .brand-logo-horizontal, .footer-logo { filter: contrast(1.15); }
}


/* ---- footer intro: กรอบสวยขนาดพอดี ตัวหนังสือชัด ---- */
.footer-contact-intro {
  flex: 0 1 420px;
  padding: 18px 24px;
  border: 1px solid rgba(255, 217, 174, 0.45);
  border-left: 4px solid #fe932c;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
}
.footer-contact-intro { background: rgba(254, 147, 44, 0.07); }
.footer-contact-intro span { color: #b45309; }
.footer-contact-intro h2 { color: #340075; font-size: 1.18rem; margin: 3px 0 0; }

/* ================= PASS 11: หน้าในทุกหน้า — ภาษาดีไซน์เดียวกับหน้าแรก ================= */
.page-hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(600px 300px at 92% -20%, rgba(254, 147, 44, 0.22), transparent 60%),
    radial-gradient(500px 320px at -6% 120%, rgba(124, 58, 237, 0.35), transparent 62%),
    linear-gradient(103deg, #2a005e 0%, #340075 52%, #4c1d95 100%);
}
.page-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(rgba(255, 255, 255, 0.05) 1.2px, transparent 1.2px) 0 0 / 24px 24px;
}
.page-hero .shell { position: relative; z-index: 2; }
.page-hero h1 { color: #fff; font-size: 2rem; font-weight: 800; letter-spacing: -0.01em; }
.page-hero h1::after {
  content: ""; display: block; width: 58px; height: 5px; margin-top: 12px;
  border-radius: 999px; background: linear-gradient(90deg, #fe932c, #7c3aed);
}
.page-hero .desc { color: rgba(255, 255, 255, 0.85); }
.breadcrumb { background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.22); backdrop-filter: blur(8px); }
.hero-chip { background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.3); color: #fff; border-radius: 999px; padding: 6px 14px; font-weight: 700; }
.hero-chip[style*="--c-accent"], .hero-chip { text-shadow: 0 1px 8px rgba(15, 0, 35, 0.4); }

/* การ์ดข่าว/รายการ */
.news-grid { gap: 20px; }
.news-card {
  border-radius: 14px; background: #fff; border: 1px solid rgba(76, 29, 149, 0.12);
  box-shadow: 0 3px 14px rgba(42, 12, 84, 0.07); overflow: hidden;
  transition: translate 180ms, box-shadow 180ms;
}
.news-card:hover { translate: 0 -4px; box-shadow: 0 16px 36px rgba(42, 12, 84, 0.14); }
.news-card .news-image span { background: #340075; color: #fff; border-radius: 999px; padding: 4px 12px; }
.news-card time { color: #b45309; font-weight: 700; }
.news-card h3 a { color: #241a3e; }
.news-card h3 a:hover { color: #4c1d95; }
.text-link { color: #b45309; font-weight: 700; }

/* การ์ดเนื้อหาบทความ + ปุ่ม + แบ่งหน้า */
.content-card { border-radius: 14px; box-shadow: 0 6px 26px rgba(42, 12, 84, 0.08); }
.button.primary, .search-form-main button, .search-box button {
  background: linear-gradient(135deg, #e07a1f, #b45309); color: #fff; border-radius: 12px; font-weight: 700;
}
.pagination a, .pagination span { border-radius: 999px; }
.pagination .current { background: #340075; color: #fff; }
body { background: #fbfaff; }
.site-footer { background: #2a0a4a; }

/* ---- หน้าติดต่อ: ใส่ hero ภาษาเดียวกับทุกหน้า ---- */
.page-header {
  position: relative; overflow: hidden; padding: 52px 0 44px; color: #fff;
  background:
    radial-gradient(600px 300px at 92% -20%, rgba(254, 147, 44, 0.22), transparent 60%),
    radial-gradient(500px 320px at -6% 120%, rgba(124, 58, 237, 0.35), transparent 62%),
    linear-gradient(103deg, #2a005e 0%, #340075 52%, #4c1d95 100%);
}
.page-header h1, .page-header h2 { color: #fff; font-size: 1.9rem; font-weight: 800; margin: 0 0 6px; }
.page-header h1::after, .page-header h2::after {
  content: ""; display: block; width: 58px; height: 5px; margin-top: 12px;
  border-radius: 999px; background: linear-gradient(90deg, #fe932c, #7c3aed);
}
.page-header p { color: rgba(255, 255, 255, 0.85); margin: 0; }
.contact-shell { background: transparent; }
.contact-form-card, .contact-shell .contact-form, .contact-shell form {
  background: #fff; border: 1px solid rgba(76, 29, 149, 0.12); border-radius: 14px;
  box-shadow: 0 6px 26px rgba(42, 12, 84, 0.08);
}

/* ================= PASS 13: Typography & Spacing Polish ================= */
/* ไทยต้องมีบรรทัดห่าง + คำไทยไม่ตกกรอบ */
body { line-height: 1.65; overflow-wrap: break-word; }
h1, h2, h3, h4 { line-height: 1.35; text-wrap: balance; }
p, li, dd, blockquote, figcaption, label, small { overflow-wrap: break-word; }
.entry-content p, .entry-content li { line-height: 1.9; }
.entry-content { max-width: 72ch; }

/* หัวข้อรายการข่าว: ตัดได้ 2 บรรทัด ไม่ตกกรอบ */
.pea-row b, .pb-item b {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; white-space: normal; line-height: 1.5; word-break: break-word;
}
.pea-row { align-items: flex-start; padding: 13px 6px 15px; }
.pea-row time { margin-top: 2px; }

/* ช่องไฟมาตรฐานในการ์ด */
.pea-sv > div, .pea-evt > div, .contact-channel > span:nth-child(2), .d22-news-card .body { min-width: 0; }
.pea-sec-head { gap: 8px; }
.pea-shell { width: min(100% - 40px, 1240px); }

/* ฟอร์ม: ช่องไฟและบรรทัด */
input[type="text"], input[type="search"], input[type="email"], input[type="url"], input[type="tel"], textarea, select {
  line-height: 1.6; padding: 11px 14px; border-radius: 10px;
}
label { line-height: 1.6; }

/* ปุ่มและ chip: ตัวหนังสือไม่ตก */
.pea-btn, .button, .cookie-button, .d22-btn, .pea-ch b, .pea-meta span { overflow-wrap: anywhere; }
.pea-meta span { min-width: 0; }

/* ================= PASS 14: header ตามแบบ 22 ================= */
.top-strip-inner > span:first-child { letter-spacing: 0.08em; font-weight: 600; }
.strip-note { letter-spacing: 0.05em; }
.member-portal-btn {
  display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto;
  padding: 9px 16px; border-radius: 10px;
  background: #340075; color: #fff !important;
  font-size: 0.82rem; font-weight: 700; text-decoration: none;
  transition: background 160ms, translate 160ms;
}
.member-portal-btn:hover { background: #4c1d95; translate: 0 -1px; }
.member-portal-btn .material-symbols-outlined { font-size: 17px; color: #ffd9ae; }
@media (max-width: 1240px) { .member-portal-btn { display: none; } }


/* ---- ปุ่มสมาชิก: ไม่ตกบรรทัด ซ่อนบนจอแคบ ---- */
.member-portal-btn { white-space: nowrap; flex-shrink: 0; }
@media (max-width: 1320px) { .member-portal-btn { display: none; } }

/* ---- กัน scroll แนวนอนจาก overlay ตกแต่ง (100vw ทับ scrollbar) ---- */
html, body { overflow-x: clip; }
#tea-grain { width: 100%; }

/* ================= PASS 16: แผงติดตามเรา — การ์ดกลาง ไม่ติดขอบ ================= */
.footer-contact-panel {
  display: flex; align-items: center; justify-content: center; gap: 30px;
  max-width: 1140px; width: 100%; margin: 0 auto 30px; padding: 28px 34px;
  background: #fff; border: 1px solid rgba(76, 29, 149, 0.12); border-radius: 16px;
  box-shadow: 0 6px 26px rgba(42, 12, 84, 0.07);
}
.footer-contact-panel::before, .footer-contact-panel::after { display: none !important; }
.footer-contact-panel .footer-contact-intro { background: rgba(254, 147, 44, 0.06); border: 1px solid rgba(254, 147, 44, 0.35); border-radius: 14px; padding: 16px 22px; }
.footer-contact-panel .contact-channel-grid { flex: 1 1 560px; max-width: 600px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1080px) {
  .footer-contact-panel { flex-direction: column; align-items: stretch; }
  .footer-contact-panel .contact-channel-grid { max-width: none; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Desktop footer rhythm: the four social cards need two calm rows rather
   than four narrow columns, while the resource grid has stable proportions. */
@media (min-width: 1081px) {
  .footer-contact-panel { align-items: stretch; gap: 28px; }
  .footer-contact-panel .footer-contact-intro { flex: 0 1 390px; display: flex; flex-direction: column; justify-content: center; }
  .footer-contact-panel .contact-channel-grid { flex: 1 1 500px; max-width: 560px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .contact-channel { min-height: 68px; padding: 11px 14px; }
  .contact-channel strong { font-size: .83rem; overflow-wrap: normal; word-break: normal; }
  .footer-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(245px, 1.35fr); gap: 26px; }
  .footer-links a, .footer-links button { line-height: 1.45; }
}

/* Centre the final contact panel as a single, balanced invitation. */
@media (min-width: 1081px) {
  .site-footer { padding-top: 40px; }
  .footer-contact-panel { justify-content: center; align-items: center; min-height: 176px; }
  .footer-contact-panel .footer-contact-intro { align-items: center; text-align: center; }
  .footer-contact-panel .contact-channel-grid { justify-content: center; }
  .contact-channel { grid-template-columns: auto minmax(0, 1fr); justify-content: center; }
  .contact-channel > span:nth-child(2) { text-align: center; }
}

/* Compact footer layout: social channels belong beneath their related link
   columns instead of living in a separate oversized panel. */
.footer-contact-panel { display: none !important; }
@media (min-width: 1081px) {
  .site-footer { padding-top: 32px; }
  .footer-grid { align-items: stretch; }
  .footer-column { display: flex; min-height: 258px; flex-direction: column; align-items: center; text-align: center; }
  .footer-column .footer-links { display: flex; flex-direction: column; align-items: center; }
  .footer-links a, .footer-links button { text-align: center; }
  .footer-social { display: inline-flex; width: max-content; max-width: 100%; align-self: center; flex-direction: column; align-items: center; gap: 7px; margin-top: auto; color: #fff !important; font-size: .78rem; font-weight: 800; text-align: center; text-decoration: none; }
  .footer-social > span { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 9px; color: #fff; font-size: 21px; font-weight: 800; }
  .footer-social > b { max-width: 100%; padding: 0; color: #fff; background: transparent; font-size: .76rem; line-height: 1.35; overflow-wrap: anywhere; }
  .footer-social.facebook > span { background: #1877f2; font-family: Arial, sans-serif; }
  .footer-social.line > span { background: #06c755; }
  .footer-social.instagram > span { background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045); }
  .footer-social.email > span { background: #5a1aa3; }
  .footer-brand { text-align: center; }
  .footer-brand .footer-logo { margin-inline: auto; }
}
@media (max-width: 1080px) {
  .footer-column { display: flex; flex-direction: column; align-items: center; text-align: center; }
  .footer-column .footer-links { display: flex; flex-direction: column; align-items: center; }
  .footer-links a, .footer-links button { text-align: center; }
  .footer-social { display: inline-flex; flex-direction: column; align-items: center; gap: 7px; margin-top: 14px; color: #fff !important; text-align: center; text-decoration: none; }
  .footer-social > span { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 9px; color: #fff; font-size: 21px; font-weight: 800; }
  .footer-social.facebook > span { background: #1877f2; font-family: Arial, sans-serif; }
  .footer-social.line > span { background: #06c755; }
  .footer-social.instagram > span { background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045); }
  .footer-social.email > span { background: #5a1aa3; }
  .footer-social > b { padding: 0; color: #fff; background: transparent; font-size: .8rem; line-height: 1.35; }
  .footer-brand { text-align: center; }
  .footer-brand .footer-logo { margin-inline: auto; }
}

/* ---- popup: ภาพเต็มคอลัมน์ซ้าย ไม่เหลือขอบขาว ---- */
.modal-image { height: 100%; }
.modal-image img { width: 100%; height: 100%; object-fit: cover; }
.announcement-modal { align-items: stretch; }

/* The artwork keeps its natural aspect ratio and is centred within its purple
   panel; portrait or landscape posts no longer leave the image stuck to top. */
.modal-image { display: grid; place-items: center; }
.tea-modal-slide { width: 100%; height: 100%; display: grid; place-items: center; }
.modal-image img { object-fit: contain; object-position: center; }

/* Journal visuals are treated as publication covers, never cropped like a
   decorative banner. */
.journal-cover-frame { display: grid; place-items: center; min-height: 235px; padding: 16px; background: linear-gradient(145deg, #f5effb, #fff); }
.journal-cover-frame img { display: block; width: 100%; max-height: 285px; object-fit: contain; filter: none; }
@media (max-width: 700px) {
  .journal-cover-frame { min-height: 165px; max-height: 220px; padding: 10px; }
  .journal-cover-frame img { max-height: 190px; }
}

/* ---- โครงสร้างกรรมการบริหาร (หน้าเกี่ยวกับสมาคม) ---- */
.tea-committee { margin: 20px 0 8px; }
.tea-member {
  display: flex; align-items: center; gap: 16px; padding: 16px 18px;
  border: 1px solid rgba(76, 29, 149, 0.14); border-radius: 14px; background: #fff;
  margin-bottom: 12px; position: relative; overflow: hidden;
}
.tea-member::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(180deg, #fe932c, #7c3aed); }
.tea-member.is-president { background: linear-gradient(140deg, #2a005e, #4c1d95); border: 1px solid rgba(255, 217, 174, 0.3); }
.tea-member-photo { flex: 0 0 64px; width: 64px; height: 64px; border-radius: 50%; background: rgba(76, 29, 149, 0.08); display: grid; place-items: center; color: #4c1d95; }
.tea-member-photo img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: center top; }
.tea-member.is-president .tea-member-photo { background: rgba(255, 217, 174, 0.18); color: #ffd9ae; border: 1px solid rgba(255, 217, 174, 0.4); }
.tea-member-body { min-width: 0; }
.tea-member-body .pos { display: inline-block; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; color: #b45309; background: rgba(254, 147, 44, 0.14); border-radius: 999px; padding: 3px 10px; margin-bottom: 4px; }
.tea-member.is-president .tea-member-body .pos { background: #fe932c; color: #331a00; }
.tea-member-body b { display: block; font-size: 1.02rem; font-weight: 800; color: #241a3e; }
.tea-member.is-president .tea-member-body b { color: #fff; }
.tea-note { padding: 14px 16px; border-radius: 12px; background: rgba(76, 29, 149, 0.06); color: #5d5570; font-size: 0.88rem; line-height: 1.7; margin-top: 6px; }

/* Final polish: keep inner pages dense, legible and visually connected. */
.content-card { margin-inline: auto; }
.page-hero-compact { padding-block: 38px 32px; }
.page-hero-compact h1 { margin-bottom: 8px; }
.page-hero-compact .page-hero-meta { margin-top: 12px; }
.entry-content .tp-figure img { display: block; margin-inline: auto; }
.entry-content .tp-list a { color: #4c1d95; text-decoration-thickness: 1px; }
.entry-content .tp-list a:hover { color: #b45309; }
.site-main > .section:first-child { padding-top: 72px; }
.site-main > .section:last-child { padding-bottom: 78px; }
@media (max-width: 640px) {
  .page-hero-compact { padding-block: 28px 24px; }
  .page-hero h1 { font-size: 1.7rem; }
  .content-card { border-radius: 12px; }
  .tea-member { align-items: flex-start; }
  .tea-member-photo { flex-basis: 56px; width: 56px; height: 56px; }
  .cookie-banner { left: 10px; right: 10px; bottom: 10px; padding: 11px 13px; gap: 10px; }
  .cookie-banner p { font-size: 0.7rem; line-height: 1.45; }
  .cookie-actions { width: 100%; }
  .cookie-button { flex: 1 1 0; min-height: 34px; padding-inline: 8px; }
}

/* Footer: the desktop flex basis and five-column grid made the mobile footer
   tall, sparse and difficult to scan. Keep the contact strip compact and
   give links a deliberate two-column rhythm. */
@media (max-width: 700px) {
  .site-footer { padding-top: 28px; }
  .site-footer .footer-grid { width: min(100% - 48px, 1240px); margin-inline: auto; }
  .footer-contact-panel {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    margin-bottom: 26px;
    padding: 18px 14px;
  }
  .footer-contact-panel .footer-contact-intro {
    flex: 0 0 auto;
    width: auto;
    min-height: 0;
    padding: 14px 16px;
  }
  .footer-contact-intro h2 { font-size: 1.08rem; }
  .footer-contact-panel .contact-channel-grid {
    flex: 0 0 auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: minmax(68px, auto);
    align-content: start;
    gap: 10px;
  }
  .contact-channel { min-height: 68px; height: auto; padding: 10px; }
  .contact-channel strong { font-size: .76rem; }
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 20px;
  }
  .footer-brand { grid-column: 1 / -1; }
  .site-footer h3 { margin-bottom: 10px; font-size: .8rem; }
  .footer-links a, .footer-links button { margin-bottom: 8px; font-size: .8rem; line-height: 1.45; }
  .footer-bottom { flex-direction: column; margin-top: 30px; gap: 8px; }
}
@media (max-width: 640px) {
  /* Keep the Association's complete wordmark on phones: the header should
     identify the institution, not leave a large blank band around a mark. */
  .nav-wrap { min-height: 80px; gap: 10px; }
  .brand picture { width: min(290px, calc(100vw - 110px)); height: auto; }
  .brand-logo-horizontal { width: min(290px, calc(100vw - 110px)); height: auto; max-height: 58px; }
  .menu-button { width: 42px; height: 42px; padding: 11px; }
  .cookie-banner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
  }
  .cookie-copy p { display: none; }
  .cookie-copy strong { font-size: .78rem; }
  .cookie-actions { width: auto; }
  .cookie-button { min-width: 96px; }
}

/* Search is a reading task: reserve brand orange for the action and keep all
   instructional and entered text in a high-contrast ink colour. */
.search-panel { background: #fff; border-bottom-color: #e7e0ef; }
.search-panel-inner > label {
  color: #30105b;
  font-family: var(--f-thai), var(--f-en), sans-serif;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: none;
}
.search-box input {
  background: #fff;
  color: #1f1232;
  border-color: #cfc1e0;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 500;
}
.search-box input::placeholder { color: #665d73; opacity: 1; }
.search-box input:focus { border-color: #b45309; box-shadow: 0 0 0 3px rgba(180, 83, 9, .16); }
.search-suggestions { color: #675e73; font-family: var(--f-en), var(--f-thai), sans-serif; font-size: .76rem; font-weight: 700; }
.search-suggestions a { color: #35204f; border-bottom-color: #a99dbb; }

/* Contact page: this is an information form, so its text needs a stable
   surface—not a brand gradient fading into white. */
.contact-shell .intake-card { background: #fff; border-color: #d9cfea; box-shadow: 0 14px 32px rgba(45, 16, 86, .10); }
.contact-shell .intake-head {
  background: linear-gradient(125deg, #31006f 0%, #4c1d95 62%, #6734b5 100%);
  border-bottom-color: rgba(255, 255, 255, .25);
}
.contact-shell .intake-head .mono-label { color: #ffd39d; font-weight: 800; }
.contact-shell .intake-head h1 { color: #fff; }
.contact-shell .intake-head > span { color: #fff; font-weight: 500; line-height: 1.6; opacity: .94; }
.contact-shell .intake-form { background: #fff; color: #23183a; }
.contact-shell .intake-form label > span:first-child { color: #312046; font-family: var(--f-thai), var(--f-en), sans-serif; font-weight: 700; letter-spacing: .02em; text-transform: none; }
.contact-shell .intake-form input[type=text],
.contact-shell .intake-form input[type=email],
.contact-shell .intake-form textarea { background: #fbfaff; color: #211633; border-color: #cfc4df; border-radius: 10px; font-weight: 500; }
.contact-shell .intake-form input::placeholder,
.contact-shell .intake-form textarea::placeholder { color: #71677f; opacity: 1; }
.contact-shell .pill-group label { color: #3a2a4e; border-color: #d4c9e2; font-weight: 600; }
.contact-shell .pill-group input:checked + label { background: #d76a00; border-color: #d76a00; color: #fff; }
.contact-shell .slot-group label { color: #332342; border-color: #d4c9e2; background: #fff; }
.contact-shell .slot-group label b { color: #322044; font-weight: 700; }
.contact-shell .slot-group label small { color: #685d73; font-family: var(--f-en), var(--f-thai), sans-serif; font-weight: 600; }
.contact-shell .slot-group input:checked + label { border-color: #b45309; background: #fff0df; }
.contact-shell .slot-group input:checked + label b { color: #9a3f00; }
.contact-shell .direct-card { background: #f5f1fb; border-color: #d7c9e9; box-shadow: 0 10px 24px rgba(45, 16, 86, .08); }
.contact-shell .direct-card > span { color: #8d3600; font-weight: 800; }
.contact-shell .direct-card strong { color: #2b0b5d; }
.contact-shell .direct-card a { color: #35136c; font-weight: 700; }
.contact-shell .direct-card a:hover { color: #a94300; }
.contact-shell .direct-card p { border-top-color: #d7c9e9; color: #493d59; font-weight: 500; line-height: 1.7; }
@media (max-width: 640px) {
  .contact-shell { margin-top: 34px; padding-inline: 14px; }
  .contact-shell .intake-head { padding: 28px 24px 24px; }
  .contact-shell .intake-form { padding: 26px 24px 30px; }
}

/* Site-wide reading contrast baseline.  These components occur throughout
   archive, article, research, journal and document pages, so their colour
   must not depend on the retired dark-theme token values. */
.page-hero > .shell > p { color: rgba(255, 255, 255, .92); font-weight: 500; }
.breadcrumb { color: #fff; }
.hero-chip { color: #351a00; background: #fe932c; }
.hero-chip.ghost-chip { color: #fff; background: rgba(255, 255, 255, .18); }
.content-card.empty-state p,
.archive-wrap .news-body p { color: #4d4359; font-weight: 500; }
.archive-wrap .news-body h3 a { color: #261445; font-weight: 750; }
.archive-wrap .news-body time,
.entry-footer { color: #62576e; font-weight: 600; }
.search-form-main input { color: #211633; border-color: #cfc4df; font-weight: 500; }
.search-form-main input::placeholder { color: #71677f; opacity: 1; }
.pagination .page-numbers { color: #3d2a52; border-color: #cfc4df; }
.pagination .page-numbers:hover { color: #2b0b5d; border-color: #6d3bb3; }
.entry-content { color: #2a2037; }
.entry-content a, .doc-link, .text-link { color: #4a167f; }
.entry-content a:hover, .doc-link:hover, .text-link:hover { color: #a94300; }
.tea-note { background: #f1ecf8; color: #493d59; border: 1px solid #ded2eb; font-weight: 500; }
.tp-info .k, .tp-info .v small, .entry-content .tp-figure figcaption { color: #62576e; }
.tp-info .v, .tp-lead, .entry-content ul.tp-list li { color: #2b2340; }
.tp-cta .msg small { color: rgba(255, 255, 255, .9); }
/* Orange is an action colour; use a dark label on the light brand orange. */
.pea-badge-orange, .pea-btn-accent:not([class*='dark']) { color: #351a00; font-weight: 800; }
.pea-btn-accent { background: #e87818; }
.pea-btn-accent:hover { background: #c95e05; color: #fff; }

/* Dedicated executive committee page */
.committee-page { padding: 48px 0 78px; background: #fbfafc; }
.committee-page-intro { max-width: 700px; margin: 0 auto 28px; text-align: center; }
.committee-page-intro > span, .committee-support > div > span { color: #a94300; font-size: .76rem; font-weight: 800; letter-spacing: .12em; }
.committee-page h2 { margin: 7px 0 8px; color: #2b0b5d; font-size: clamp(1.5rem, 3vw, 2rem); }
.committee-page-intro p, .committee-support p { margin: 0; color: #493d59; font-weight: 500; line-height: 1.75; }
.committee-group { margin-top: 42px; }
.committee-group:first-of-type { margin-top: 0; }
.committee-group-head { display: flex; align-items: end; justify-content: space-between; margin: 0 0 16px; padding-bottom: 12px; border-bottom: 2px solid #e87818; }
.committee-group-head span { display: block; color: #a94300; font-size: .74rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.committee-group-head h2 { margin: 4px 0 0; font-size: clamp(1.25rem, 2.4vw, 1.65rem); }
.committee-group-president .committee-grid { grid-template-columns: minmax(0, 260px); justify-content: center; }
.committee-group-president .committee-group-head { justify-content: center; text-align: center; }
.committee-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.committee-card { overflow: hidden; border: 1px solid #dfd4ec; border-radius: 14px; background: #fff; box-shadow: 0 5px 18px rgba(43, 11, 93, .08); }
.committee-portrait { aspect-ratio: 4 / 4.4; overflow: hidden; background: #f1ecf8; }
.committee-portrait img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.committee-card > div { min-height: 92px; padding: 12px 14px 14px; border-top: 3px solid #e87818; }
.committee-card span { display: block; color: #9a3f00; font-size: .71rem; font-weight: 800; line-height: 1.35; }
.committee-card h3 { margin: 5px 0 0; color: #291049; font-size: .95rem; line-height: 1.45; }
.committee-support { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 30px; align-items: center; margin-top: 48px; padding: 28px; border: 1px solid #dfd4ec; border-radius: 16px; background: #f3eef9; }
.committee-support figure { margin: 0; }
.committee-support img { width: 100%; border-radius: 12px; box-shadow: 0 8px 24px rgba(43, 11, 93, .12); }
.committee-support figcaption { margin-top: 8px; color: #62576e; font-size: .78rem; font-weight: 600; }
@media (max-width: 900px) { .committee-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .committee-support { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .committee-page { padding: 32px 0 58px; } .committee-group { margin-top: 30px; } .committee-group-head { margin-bottom: 11px; padding-bottom: 9px; } .committee-group-head span { font-size: .67rem; } .committee-group-president .committee-grid { grid-template-columns: minmax(0, 1fr); max-width: 260px; margin-inline: auto; } .committee-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .committee-card > div { min-height: 106px; padding: 10px; } .committee-card h3 { font-size: .84rem; } .committee-card span { font-size: .65rem; } .committee-support { margin-top: 30px; padding: 18px; gap: 20px; } }

/* Journal hub: current TEJ, article support notices, and the distinct
   pre-2022 Endosarn archive. */
.journal-hub { padding: 54px 0 80px; background: #fbfafc; }
.journal-hub-intro { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 26px; padding: 28px; border: 1px solid #dfd4ec; border-radius: 18px; background: #fff; }
.journal-hub-intro > div { max-width: 730px; }
.journal-hub-intro span, .journal-hub-heading > span, .endosarn-list > div > span { color: #a94300; font-size: .73rem; font-weight: 850; letter-spacing: .13em; }
.journal-hub h2 { margin: 7px 0; color: #2b0b5d; font-size: clamp(1.45rem, 3vw, 2rem); }
.journal-hub p { margin: 0; color: #514360; line-height: 1.7; }
.journal-hub-cards { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 20px; }
.journal-hub-card { overflow: hidden; border: 1px solid #dfd4ec; border-radius: 17px; background: #fff; }
.journal-hub-card.current { display: grid; grid-template-columns: minmax(180px, .85fr) minmax(0,1.15fr); }
.journal-hub-card.current img { width: 100%; height: 100%; min-height: 235px; object-fit: cover; }
.journal-hub-card > div { align-self: center; padding: 26px; }
.journal-hub-card > div > span { color: #a94300; font-size: .7rem; font-weight: 850; letter-spacing: .12em; }
.journal-hub-card h3 { margin: 7px 0; color: #2b0b5d; font-size: 1.25rem; }
.journal-hub-card p { font-size: .9rem; }
.journal-hub-card a { display: inline-flex; align-items: center; gap: 4px; margin-top: 18px; color: #5a1aa3; font-size: .87rem; font-weight: 800; text-decoration: none; }
.journal-hub-card a:hover { color: #a94300; }
.journal-hub-card.archive { display: grid; align-content: center; padding: 27px; background: linear-gradient(145deg, #31006f, #5b229d); }
.journal-hub-card.archive > .material-symbols-outlined { display: grid; width: 50px; height: 50px; place-items: center; border-radius: 14px; background: rgba(255,255,255,.13); color: #ffd9ae; font-size: 28px; }
.journal-hub-card.archive > div { padding: 20px 0 0; }
.journal-hub-card.archive > div > span, .journal-hub-card.archive h3, .journal-hub-card.archive p { color: #fff; }
.journal-hub-card.archive > div > span, .journal-hub-card.archive a { color: #ffd9ae; }
.journal-hub-notices { margin-top: 46px; }
.journal-hub-heading { margin-bottom: 16px; }
.journal-hub-heading h2 { margin-bottom: 5px; }
.journal-notice-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.journal-notice-list a { display: grid; grid-template-columns: 40px minmax(0,1fr) 20px; gap: 11px; align-items: center; min-width: 0; margin: 0; padding: 15px; border: 1px solid #dfd4ec; border-radius: 13px; background: #fff; color: #2b0b5d; }
.journal-notice-list a:hover { border-color: #b775e0; }
.journal-notice-list a > .material-symbols-outlined:first-child { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 11px; background: #f0e9fa; color: #5a1aa3; }
.journal-notice-list small { display: block; color: #a94300; font-size: .68rem; }
.journal-notice-list b { display: block; margin-top: 3px; font-size: .88rem; line-height: 1.42; }
.endosarn-list { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 46px; padding: 26px; border: 1px dashed #c7addf; border-radius: 16px; background: #f7f2fb; }
.endosarn-list > div { max-width: 680px; }
@media (max-width: 700px) { .journal-hub { padding: 32px 0 55px; } .journal-hub-intro, .endosarn-list { display: grid; align-items: start; padding: 20px; } .journal-hub-cards, .journal-hub-card.current, .journal-notice-list { grid-template-columns: 1fr; } .journal-hub-card.current img { min-height: 165px; max-height: 220px; } .journal-hub-card > div { padding: 20px; } .journal-hub-card.archive { padding: 20px; } .journal-hub-card.archive > div { padding: 16px 0 0; } }

/* Homepage announcement popup: a clear visual hierarchy with the Association
   purple as the frame and orange reserved for the primary action. */
.modal-backdrop { background: rgba(24, 0, 58, .76); backdrop-filter: blur(12px); }
.announcement-modal { width: min(860px, 94vw); grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr); border: 2px solid #fe932c; border-radius: 20px; background: #fff !important; box-shadow: 0 30px 90px rgba(12, 0, 31, .58); }
.modal-image { min-height: 380px; background: radial-gradient(circle at 50% 35%, #6f36b3 0%, #340075 58%, #210047 100%); }
.modal-image { position: relative; overflow: hidden; isolation: isolate; }
.modal-image::before { content: ''; position: absolute; z-index: 0; inset: -24px; background: var(--tea-slide-background) center / cover no-repeat; filter: blur(20px) brightness(.56) saturate(1.15); transform: scale(1.1); }
.modal-image::after { content: ''; position: absolute; z-index: 1; inset: 0; pointer-events: none; background: linear-gradient(0deg, rgba(32, 0, 75, .48), rgba(37, 0, 82, .12)); }
.tea-modal-slide { position: relative; z-index: 2; }
.modal-image img { position: relative; z-index: 2; filter: none; object-fit: contain; object-position: center; }
.modal-image .slide-arrow, .modal-image .slide-source { z-index: 3; }
.slide-source { z-index: 2; left: 16px; bottom: 16px; padding: 6px 11px; border: 1px solid rgba(255,255,255,.72); background: rgba(255,255,255,.94); color: #340075; font-size: .69rem; font-weight: 800; box-shadow: 0 4px 12px rgba(20,0,48,.16); }
.announcement-modal .modal-close { top: 14px; right: 14px; width: 38px; height: 38px; border: 1px solid rgba(52,0,117,.14); background: #fff; color: #4c1d95; box-shadow: 0 4px 12px rgba(20,0,48,.12); }
.announcement-modal .modal-close:hover { background: #340075; color: #fff; }
.modal-copy { position: relative; gap: 12px; padding: 34px 30px 28px; background: linear-gradient(145deg, #fff 0%, #fbf8ff 100%); }
.modal-copy::before { content: ''; display: block; width: 58px; height: 5px; border-radius: 999px; background: linear-gradient(90deg, #fe932c, #b45309); }
.slide-count { align-self: flex-start; margin-top: 2px; padding: 4px 8px; border-radius: 999px; background: #efe8fa; color: #5a1aa3; font-size: .66rem; font-weight: 850; }
.modal-copy .section-kicker { margin: 2px 0 0; color: #a94300; font-size: .7rem; font-weight: 850; letter-spacing: .14em; }
.modal-copy h2 { margin: 0; color: #2b0b5d; font-size: clamp(1.28rem, 2.3vw, 1.65rem); line-height: 1.35; }
.modal-copy > p:not(.section-kicker) { margin: 0; color: #514360; font-size: .94rem; line-height: 1.78; }
.modal-actions { margin-top: 6px; }
.announcement-modal .button.primary { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 20px; border-radius: 10px; background: #b45309; color: #fff; font-weight: 850; box-shadow: 0 7px 16px rgba(180,83,9,.23); }
.announcement-modal .button.primary:hover { background: #8d3c06; }
.remember-close { margin-top: 0; color: #685a78; font-size: .76rem; }
.slide-dots { margin-top: auto; }
.slide-dots button { background: #d9cceb; }
.slide-dots button.is-active { background: #fe932c; }
@media (max-width: 720px) {
  .modal-backdrop { align-items: center; padding: 12px; }
  .announcement-modal { display: block; width: min(590px, 96vw); max-height: 92vh; overflow-y: auto; border-radius: 17px; }
  .modal-image { height: 230px; min-height: 0; max-height: none; }
  .modal-image img { height: 230px; object-fit: contain; object-position: center; }
  .modal-copy { padding: 23px 21px 20px; gap: 9px; }
  .modal-copy h2 { font-size: 1.23rem; }
  .modal-copy > p:not(.section-kicker) { font-size: .87rem; line-height: 1.65; }
  .announcement-modal .button.primary { width: 100%; }
}

/* ================================================================
   Shared content surfaces — clear, calm panels inspired by the
   reference site's editorial rhythm.  This keeps every inner page
   recognisably part of one association website without cloning it.
   ================================================================ */
.page-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid #e2d8ed;
  background:
    radial-gradient(circle at 88% 8%, rgba(164, 103, 220, .24), transparent 34%),
    linear-gradient(115deg, #28005b 0%, #4c1d95 62%, #6a35aa 100%);
}
.page-hero::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: linear-gradient(90deg, #fe932c, #b45309 22%, transparent 22%); }
.archive-hero-news .shell { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 430px); align-items: center; gap: clamp(28px, 6vw, 78px); min-height: 238px; }
.archive-hero-news .archive-hero-copy { padding-block: 36px 34px; }
.archive-hero-kicker { display: block; margin-top: 15px; color: #ffd3a2; font-size: .72rem; font-weight: 850; letter-spacing: .16em; }
.archive-hero-news h1 { margin-top: 5px; }
.archive-hero-news-art { position: relative; justify-self: end; width: min(100%, 410px); padding: 10px; border: 1px solid rgba(255,255,255,.24); border-radius: 16px; background: rgba(255,255,255,.12); box-shadow: 0 14px 34px rgba(17,0,48,.24); }
.archive-hero-news-art img { display: block; width: 100%; height: 158px; object-fit: contain; object-position: center; border-radius: 10px; background: rgba(19,0,48,.3); }
.archive-hero-news-art span { position: absolute; left: 22px; bottom: 21px; padding: 5px 10px; border-radius: 999px; color: #340075; background: rgba(255,255,255,.94); font-size: .7rem; font-weight: 850; box-shadow: 0 3px 9px rgba(15,0,40,.22); }
.archive-news-head { padding: 46px 0 30px; background: linear-gradient(180deg, #fff 0%, #faf8fe 100%); border-bottom: 1px solid #ebe3f3; }
.archive-news-kicker { display: inline-flex; align-items: center; gap: 6px; color: #6d28a8; font-size: .75rem; font-weight: 850; letter-spacing: .1em; }
.archive-news-kicker .material-symbols-outlined { font-size: 17px; }
.archive-news-title-row { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-top: 6px; }
.archive-news-title-row h1 { margin: 0; color: #211044; font-size: clamp(1.8rem, 3vw, 2.45rem); line-height: 1.25; }
.archive-news-title-row p { margin: 5px 0 0; color: #655579; font-size: .95rem; }
.archive-news-title-row > a { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 5px; color: #5a1aa3; font-size: .83rem; font-weight: 850; text-decoration: none; }
.archive-news-title-row > a:hover { color: #b45309; }
.archive-news-title-row > a .material-symbols-outlined { font-size: 18px; }
.news-archive-wrap { padding-top: 28px; }
.news-archive-wrap .news-grid { gap: 24px; }
.news-archive-wrap .news-card.featured { grid-column: span 1; }
.news-archive-wrap .news-card { min-height: 100%; border-color: #e1d8ed; box-shadow: 0 8px 24px rgba(43,11,93,.08); }
.news-archive-wrap .news-image { aspect-ratio: 4 / 3; padding: 10px; background: #f5f0fa; }
.news-archive-wrap .news-image img { border-radius: 11px; }
.news-archive-wrap .news-body { min-height: 180px; padding: 18px 20px 19px; }
.news-archive-wrap .news-body h3 { font-size: 1.02rem; }
.news-archive-wrap .news-body p { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.event-photo-wall { margin-top: 52px; padding: 26px; border: 1px solid #ddd2ea; border-radius: 18px; background: linear-gradient(135deg, #f8f4fc, #fff); box-shadow: 0 10px 28px rgba(43,11,93,.07); }
.event-photo-wall-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.event-photo-wall-head span { color: #a94300; font-size: .7rem; font-weight: 850; letter-spacing: .14em; }
.event-photo-wall-head h2 { margin: 4px 0 0; color: #2b0b5d; font-size: 1.38rem; }
.event-photo-wall-head a { display: inline-flex; align-items: center; gap: 5px; color: #5a1aa3; font-size: .82rem; font-weight: 850; text-decoration: none; }
.event-photo-wall-head a .material-symbols-outlined { font-size: 17px; }
.event-photo-wall-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.event-photo-wall-grid a { display: grid; place-items: center; min-height: 170px; padding: 8px; overflow: hidden; border: 1px solid #e2d8ed; border-radius: 13px; background: #f1ebf8; }
.event-photo-wall-grid img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center; }
@media (max-width: 760px) {
  .archive-hero-news .shell { grid-template-columns: 1fr; gap: 0; min-height: 0; }
  .archive-hero-news .archive-hero-copy { padding-block: 30px 18px; }
  .archive-hero-news-art { justify-self: stretch; width: auto; margin-bottom: 26px; }
  .archive-hero-news-art img { height: 148px; }
  .archive-news-head { padding: 31px 0 23px; }
  .archive-news-title-row { display: block; }
  .archive-news-title-row h1 { font-size: 1.65rem; }
  .archive-news-title-row > a { margin-top: 14px; }
  .event-photo-wall { margin-top: 36px; padding: 18px; }
  .event-photo-wall-head { align-items: start; flex-direction: column; }
  .event-photo-wall-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .event-photo-wall-grid a { min-height: 130px; }
}
.archive-wrap, .content-area, .contact-shell { position: relative; }
.content-card,
.archive-wrap .news-card,
.committee-card,
.journal-hub-card,
.journal-notice-list a,
.endosarn-list,
.content-area {
  border-color: #ddd2ea;
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(43, 11, 93, .08);
}
.archive-wrap .news-card { overflow: hidden; background: #fff; }
.archive-wrap .news-body { padding: 20px 21px 22px; }
.archive-wrap .news-body h3 { margin-top: 3px; line-height: 1.35; }
.content-card { overflow: hidden; background: #fff; }
.content-card .entry-content { padding: clamp(22px, 4vw, 42px); }
.content-card .content-thumb { padding: 18px; border-bottom: 1px solid #e6ddec; background: #f8f5fb; }
.committee-group-head { border-bottom-color: #e87818; }
.journal-hub-intro { box-shadow: 0 8px 22px rgba(43,11,93,.06); }

/* Images are content, not decorative crops: retain the complete supplied
   image inside a deliberate surface and remove hover zoom throughout. */
.news-image,
.content-thumb,
.journal-cover-frame,
.d22-news-card .thumb,
.d22-strip-item,
.pea-evt,
.pea-feat,
.pea-gallery-grid a,
.committee-portrait {
  background: #f5f1fa;
}
.news-image img,
.content-thumb img,
.entry-content img,
.journal-cover-frame img,
.journal-hub-card.current img,
.d22-president-photo img,
.d22-board-photo img,
.d22-strip-item img,
.d22-news-card .thumb img,
.pea-evt img,
.pea-feat img,
.pea-gallery-grid img,
.committee-portrait img,
.committee-support img {
  object-fit: contain !important;
  object-position: center !important;
  transform: none !important;
  background: #f5f1fa;
}
.news-card:hover .news-image img,
.d22-strip-item:hover img,
.d22-news-card:hover .thumb img,
.pea-gallery-grid a:hover img { transform: none !important; }
.pea-slide, .pea-slide:nth-child(2), .pea-slide:nth-child(3) {
  background-size: cover, contain, cover;
  background-repeat: no-repeat;
  background-position: center, center, center;
}
@media (max-width: 700px) {
  .content-card .entry-content { padding: 22px 18px; }
  .content-card .content-thumb { padding: 12px; }
  .archive-wrap .news-body { padding: 16px; }
  .content-card, .archive-wrap .news-card, .committee-card, .journal-hub-card, .content-area { border-radius: 14px; }
}

/* Unified inner-page headers: same bright editorial rhythm as the news page.
   Breadcrumb, title and description stay useful, while the heavy purple band
   is reserved for content cards rather than every page heading. */
.page-hero {
  background: linear-gradient(180deg, #fff 0%, #faf8fe 100%);
  border-bottom: 1px solid #ebe3f3;
}
.page-hero::after {
  height: 3px;
  background: linear-gradient(90deg, #e87818 0 40px, #8b5cf6 40px 74px, transparent 74px);
}
.page-hero .shell { padding-block: 46px 30px; }
.page-hero-compact .shell { padding-block: 46px 30px; }
.page-hero h1,
.page-hero-compact h1 {
  margin: 9px 0 0;
  color: #211044;
  font-size: clamp(1.8rem, 3vw, 2.45rem);
  line-height: 1.25;
  text-shadow: none;
}
.page-hero h1::after { display: none; }
.page-hero > .shell > p,
.page-hero .desc { margin: 6px 0 0; color: #655579; font-weight: 400; }
.page-hero .breadcrumb { display: none; }
.page-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 0;
  color: #6d28a8;
  font-size: .75rem;
  font-weight: 850;
  letter-spacing: .1em;
}
.page-hero-kicker .material-symbols-outlined { font-size: 17px; }
.breadcrumb {
  display: inline-flex;
  gap: 7px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #7a6a8e;
  font-size: .78rem;
  backdrop-filter: none;
}
.breadcrumb a { color: #5a1aa3; }
.breadcrumb a:hover { color: #b45309; text-decoration: none; }
.page-hero .page-hero-meta { margin-top: 13px; }
.page-header {
  display: block;
  padding: 40px 0 30px;
  border-bottom: 1px solid #ebe3f3;
  background: linear-gradient(180deg, #fff 0%, #faf8fe 100%);
}
.page-header .section-kicker { margin: 0 0 7px; color: #6d28a8; font-size: .75rem; font-weight: 850; letter-spacing: .1em; }
.page-header h1,
.page-header h2,
.page-header .page-title { margin: 0; color: #211044; font-size: clamp(1.8rem, 3vw, 2.45rem); font-weight: 800; line-height: 1.25; }
.page-header h1::after,
.page-header h2::after { display: none; }
@media (max-width: 700px) {
  .page-hero .shell,
  .page-hero-compact .shell { padding-block: 31px 23px; }
  .page-header { padding: 30px 0 23px; }
  .page-hero h1,
  .page-hero-compact h1,
  .page-header h1,
  .page-header .page-title { font-size: 1.65rem; }
}

/* Privacy, Security and PDPA notices: long-form content remains readable
   and visibly marked as a draft until Association approval is recorded. */
.legal-page { max-width: 860px; color: #3f3151; font-size: .97rem; line-height: 1.78; }
.legal-page .legal-draft { margin: 0 0 26px; padding: 17px 19px; border: 1px solid #f3c58e; border-left: 4px solid #e87818; border-radius: 12px; background: #fff8ef; }
.legal-page .legal-draft strong { color: #8e4100; font-size: .93rem; }
.legal-page .legal-draft p { margin: 4px 0 0; color: #6a4a2d; }
.legal-page .legal-lead { margin: 0 0 26px; color: #352153; font-size: 1.08rem; line-height: 1.82; }
.legal-page h2 { margin: 30px 0 9px; color: #2b0b5d; font-size: 1.22rem; line-height: 1.4; }
.legal-page h2::before { content: ''; display: inline-block; width: 7px; height: 7px; margin: 0 9px 2px 0; border-radius: 50%; background: #e87818; }
.legal-page p { margin: 0 0 12px; }
.legal-page ul { margin: 0 0 14px; padding-left: 1.2em; }
.legal-page li { margin: 5px 0; }
.legal-page a { color: #5a1aa3; font-weight: 750; overflow-wrap: anywhere; }
.legal-page .legal-updated { margin-top: 30px; padding-top: 16px; border-top: 1px solid #e6ddec; color: #766686; font-size: .82rem; }
.footer-legal-links { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.footer-legal-links a { color: #f2ecfa; text-decoration: none; }
.footer-legal-links a:hover { color: #ffd9ae; }
.footer-legal-links i { font-style: normal; color: #a992c2; }
@media (max-width: 700px) {
  .legal-page { font-size: .92rem; line-height: 1.72; }
  .legal-page .legal-draft { padding: 15px; }
  .legal-page .legal-lead { font-size: 1rem; }
  .legal-page h2 { margin-top: 25px; font-size: 1.12rem; }
  .footer-legal-links { justify-content: center; }
}

/* Events: a readable, scrollable Association activity feed.  The page links
   to Facebook rather than embedding it, keeping third-party tracking out of
   the initial website scope. */
.event-social-hub { display: grid; grid-template-columns: minmax(250px, .72fr) minmax(0, 1.28fr); gap: 28px; margin-top: 52px; padding: 30px; overflow: hidden; border: 1px solid #dcd0eb; border-radius: 20px; background: linear-gradient(135deg, #f8f4fc 0%, #fff 58%, #f6effe 100%); box-shadow: 0 12px 28px rgba(43,11,93,.08); }
.event-social-intro { align-self: center; }
.event-social-source { display: inline-flex; align-items: center; gap: 8px; color: #5a1aa3; font-size: .75rem; font-weight: 850; letter-spacing: .04em; }
.event-social-source > span { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 7px; background: #1877f2; color: #fff; font-family: Arial, sans-serif; font-size: 17px; }
.event-social-intro h2 { margin: 12px 0 8px; color: #2b0b5d; font-size: clamp(1.45rem, 2.4vw, 1.9rem); line-height: 1.35; }
.event-social-intro p { margin: 0; color: #655579; line-height: 1.72; }
.event-social-follow { display: inline-flex; align-items: center; gap: 7px; margin-top: 20px; padding: 11px 15px; border-radius: 10px; background: #1877f2; color: #fff; font-size: .86rem; font-weight: 800; text-decoration: none; box-shadow: 0 7px 16px rgba(24,119,242,.22); }
.event-social-follow:hover { background: #0f68d8; color: #fff; translate: 0 -1px; }
.event-social-follow .material-symbols-outlined { font-size: 18px; }
.event-social-rail { display: flex; gap: 13px; padding: 2px 2px 13px; overflow-x: auto; overscroll-behavior-inline: contain; scroll-snap-type: x mandatory; scrollbar-color: #9d7cc5 #eee7f6; scrollbar-width: thin; }
.event-social-photo { flex: 0 0 210px; display: flex; flex-direction: column; gap: 7px; scroll-snap-align: start; color: #2b0b5d; text-decoration: none; }
.event-social-photo-frame { display: grid; height: 160px; place-items: center; padding: 9px; overflow: hidden; border: 1px solid #ded2eb; border-radius: 14px; background: #f0e9f8; }
.event-social-photo-frame img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center; }
.event-social-photo b { min-height: 2.8em; font-size: .84rem; line-height: 1.4; }
.event-social-photo small { color: #806d93; font-size: .72rem; }
.event-social-photo:hover .event-social-photo-frame { border-color: #a96bdd; box-shadow: 0 8px 17px rgba(67,15,133,.13); }
.event-social-photo:hover b { color: #7a2bc2; }
@media (max-width: 800px) {
  .event-social-hub { grid-template-columns: 1fr; gap: 22px; margin-top: 36px; padding: 21px; }
  .event-social-rail { margin-inline: -4px; }
  .event-social-photo { flex-basis: 185px; }
  .event-social-photo-frame { height: 145px; }
}

/* Unified publication library: PDF pages sit on a clean white canvas rather
   than a decorative background, so each document stays the visual focus. */
.journal-hub { background: #fff; }
.library-page-tabs { display: inline-flex; gap: 5px; margin: 0 0 26px; padding: 4px; border-radius: 10px; background: #f4f0fa; }
.library-page-tabs button { padding: 9px 18px; border: 0; border-radius: 7px; background: transparent; color: #6c5c7d; font: inherit; font-size: .88rem; font-weight: 800; cursor: pointer; }
.library-page-tabs button.is-active { background: #fff; color: #3f0b82; box-shadow: 0 3px 9px rgba(43,11,93,.11); }
.library-pdf-section { margin-top: 0; padding-top: 4px; }
.library-pdf-heading { display: flex; align-items: end; justify-content: space-between; gap: 22px; margin-bottom: 18px; }
.library-pdf-heading > div { max-width: 680px; }
.library-pdf-heading span { color: #a94300; font-size: .72rem; font-weight: 850; letter-spacing: .13em; }
.library-pdf-heading h2 { margin: 6px 0 4px; color: #2b0b5d; font-size: clamp(1.45rem, 2.5vw, 1.9rem); }
.library-pdf-heading p { margin: 0; color: #655579; }
.library-pdf-heading > a { display: inline-flex; align-items: center; gap: 5px; color: #5a1aa3; font-size: .82rem; font-weight: 800; text-decoration: none; white-space: nowrap; }
.library-pdf-heading > a .material-symbols-outlined { color: inherit; font-size: 18px; letter-spacing: 0; }
.library-pdf-tabs { display: inline-flex; gap: 5px; margin: 2px 0 20px; padding: 4px; border-radius: 10px; background: #f4f0fa; }
.library-pdf-tabs button { padding: 8px 16px; border: 0; border-radius: 7px; background: transparent; color: #6c5c7d; font: inherit; font-size: .86rem; font-weight: 800; cursor: pointer; }
.library-pdf-tabs button.is-active { background: #fff; color: #3f0b82; box-shadow: 0 3px 9px rgba(43,11,93,.11); }
.library-tab-panel[hidden] { display: none !important; }
.library-pdf-section .library-pdf-tabs { display: none; }
.library-issue-group { margin: 0 0 42px; }
.library-issue-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin: 0 0 14px; padding: 0 2px 10px; border-bottom: 2px solid #eadff7; }
.library-issue-heading span { color: #a94300; font-size: .68rem; font-weight: 850; letter-spacing: .12em; }
.library-issue-heading h3 { margin: 4px 0 0; color: #2b0b5d; font-size: 1.24rem; }
.library-issue-heading > b { padding: 6px 10px; border-radius: 999px; background: #f1e9fb; color: #5a1aa3; font-size: .78rem; white-space: nowrap; }
.library-pdf-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.library-pdf-card { display: flex; flex-direction: column; overflow: hidden; padding: 14px; border: 1px solid #210047; border-radius: 17px; background: #160033; box-shadow: 0 8px 20px rgba(43,11,93,.14); }
.library-thaijo-link { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0 0 28px; padding: 20px 24px; border: 1px solid #dfd4ec; border-left: 5px solid #c86a16; border-radius: 16px; background: linear-gradient(110deg, #f7f2fc, #fff); color: #2b0b5d; text-decoration: none; box-shadow: 0 8px 22px rgba(43,11,93,.06); }
.library-thaijo-link:hover { border-color: #8c42ce; box-shadow: 0 12px 26px rgba(43,11,93,.12); }
.library-thaijo-copy { display: grid; gap: 5px; }
.library-thaijo-copy small { color: #a94300; font-size: .68rem; font-weight: 850; letter-spacing: .12em; }
.library-thaijo-copy strong { font-size: 1rem; line-height: 1.5; }
.library-thaijo-action { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; padding: 10px 15px; border-radius: 999px; background: #31006f; color: #fff; font-size: .88rem; font-weight: 800; }
.library-thaijo-link:hover .library-thaijo-action { background: #5b229d; }
.library-pdf-preview { display: grid; height: 300px; place-items: center; overflow: hidden; border: 1px solid rgba(255,255,255,.22); border-radius: 10px; background: #f6f2fa; text-decoration: none; }
.library-pdf-preview img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center; background: #fff; }
.library-pdf-preview > .material-symbols-outlined { color: #6d28a8; font-size: 54px; }
.library-pdf-preview canvas.endosarn-thumb { display: none; width: 100%; height: 100%; object-fit: contain; object-position: center; background: #fff; }
.library-pdf-preview canvas.endosarn-thumb.is-loaded { display: block; }
.library-pdf-desc { margin: 6px 0 12px; font-size: .86rem; line-height: 1.55; color: #6a5e7e; }
.library-pdf-copy { display: flex; min-height: 130px; flex-direction: column; padding: 14px 2px 3px; }
.library-pdf-copy small { color: #ffc3ec; font-size: .71rem; font-weight: 800; }
.library-pdf-copy h3 { margin: 7px 0 16px; color: #fff; font-size: 1rem; line-height: 1.42; }
.library-pdf-copy a { display: inline-flex; align-items: center; gap: 5px; margin-top: auto; color: #ff8be0; font-size: .82rem; font-weight: 850; text-decoration: none; }
.library-pdf-copy a .material-symbols-outlined { font-size: 17px; }
.library-pdf-card:hover { border-color: #8c42ce; box-shadow: 0 12px 26px rgba(43,11,93,.2); translate: 0 -2px; }
@media (max-width: 900px) { .library-pdf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .library-pdf-section { margin-top: 35px; }.library-pdf-heading { align-items: start; flex-direction: column; gap: 12px; }.library-issue-group { margin-bottom: 32px; }.library-issue-heading { align-items: start; }.library-pdf-grid { grid-template-columns: 1fr; }.library-pdf-preview { height: 275px; }.library-pdf-copy { min-height: 0; } }

/* About the Association */
.about-hero { overflow: hidden; color: #fff; background: radial-gradient(circle at 84% 5%, rgba(171,107,238,.75), transparent 33%), linear-gradient(112deg, #180037, #3c087a 56%, #6126a4); }
.about-hero-inner { position: relative; display: flex; align-items: center; justify-content: space-between; min-height: 285px; padding-top: 46px; padding-bottom: 46px; }
.about-heading-meta { display:flex; align-items:center; gap:12px; margin-bottom:22px; }.about-breadcrumb { margin:0; }.about-breadcrumb, .about-breadcrumb a { color: rgba(255,255,255,.82); }.about-breadcrumb a { text-decoration: none; }
.about-kicker { display: inline-flex; align-items: center; gap: 6px; color: #ffd6a0; font-size: .72rem; font-weight: 900; letter-spacing: .13em; }.about-kicker .material-symbols-outlined { font-size: 17px; }.about-kicker.warm { color: #b95100; }
.about-hero h1 { max-width: 650px; margin: 10px 0; color: #fff; font-size: clamp(2.1rem, 4vw, 3.5rem); line-height: 1.12; }.about-hero p { max-width: 600px; margin: 0; color: rgba(255,255,255,.82); font-size: 1rem; line-height: 1.7; }
.about-hero-mark { display: grid; place-items: center; width: 250px; height: 250px; margin-right: 42px; }.about-hero-mark::before, .about-hero-mark i, .about-hero-mark b { display: none; }.about-hero-mark img { display:block; width:205px; height:205px; filter:drop-shadow(0 10px 14px rgba(0,0,0,.27)); }
.about-page { padding: 62px 0 78px; background: linear-gradient(180deg, #fff 0%, #faf8fd 100%); }.about-intro-grid { display: grid; grid-template-columns: minmax(0,1.05fr) minmax(330px,.95fr); gap: 44px; align-items: center; }.about-intro-copy h2 { max-width: 660px; margin: 9px 0 15px; color: #27085b; font-size: clamp(1.75rem, 3vw, 2.55rem); line-height: 1.25; }.about-intro-copy > p { max-width: 670px; margin: 0; color: #655579; line-height: 1.85; }.about-statement { margin-top: 24px; padding: 18px 19px; border-left: 4px solid #f08419; border-radius: 0 13px 13px 0; background: #f6f0fc; color: #3a146e; line-height: 1.65; }
.about-pillar-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-items: stretch; }.about-pillar-grid article { display:flex; min-height: 205px; flex-direction:column; padding: 20px 15px; border: 1px solid #e4d8f1; border-radius: 16px; background: #fff; box-shadow: 0 9px 22px rgba(55,18,95,.07); }.about-pillar-grid .material-symbols-outlined { display: grid; width: 39px; height: 39px; place-items: center; border-radius: 11px; background: #4c1590; color: #ffe2b6; font-size: 21px; }.about-pillar-grid h3 { margin: 18px 0 7px; color: #35106d; font-size: 1rem; }.about-pillar-grid p { margin: 0; color: #736383; font-size: .78rem; line-height: 1.55; }
.about-history { margin-top: 74px; padding: 44px; border: 1px solid #e7d9f2; border-radius: 24px; background: radial-gradient(circle at 95% 8%, rgba(210,153,255,.24), transparent 28%), #fff; }.about-history-heading { max-width: 760px; }.about-history-heading h2 { margin: 8px 0 12px; color:#2b0b5d; font-size:clamp(1.7rem,3vw,2.35rem); line-height:1.25; }.about-history-heading p { margin:0; color:#665579; line-height:1.85; }.about-history-grid { display:grid; grid-template-columns:repeat(5,1fr); gap:12px; margin-top:31px; }.about-history-grid article { min-height:194px; padding:19px 17px; border:1px solid #eadff4; border-radius:15px; background:#fcfaff; }.about-history-grid article > .material-symbols-outlined { display:grid; width:38px; height:38px; place-items:center; border-radius:10px; background:#f0e5fb; color:#6321a5; }.about-history-grid h3 { margin:16px 0 7px; color:#3f117d; font-size:.94rem; line-height:1.35; }.about-history-grid p { margin:0; color:#746483; font-size:.76rem; line-height:1.6; }.about-history-feature { color:#fff; background:linear-gradient(145deg,#31006c,#6e22b4)!important; border-color:#31006c!important; }.about-history-feature > span { display:block; color:#ffe3ac; font-family:Georgia,serif; font-size:2.6rem; line-height:1; }.about-history-feature strong { display:block; margin-top:9px; color:#fff; font-size:.92rem; }.about-history-feature p { margin-top:9px; color:rgba(255,255,255,.82); }
.about-president { display: grid; grid-template-columns: minmax(280px,.72fr) minmax(0,1.28fr); gap: 0; margin-top: 76px; overflow: hidden; border: 1px solid #eadcf5; border-radius: 25px; background: radial-gradient(circle at 95% 4%, rgba(208,157,255,.34), transparent 30%), linear-gradient(124deg,#f5f0fc,#fff); box-shadow: 0 17px 37px rgba(54,18,98,.12); }.about-president-photo { position: relative; display: grid; min-height: 455px; align-items: end; padding: 24px; background: linear-gradient(145deg,#29005e,#641cb1); }.about-president-photo::after { content:""; position:absolute; inset:0; opacity:.45; background: repeating-linear-gradient(45deg,transparent 0 24px,rgba(255,255,255,.08) 24px 25px); }.about-president-frame { position: relative; z-index: 1; overflow: hidden; width: min(100%,360px); margin: 0 auto; border-radius: 18px 18px 6px 6px; background:#190538; box-shadow: 0 16px 28px rgba(12,0,34,.32); }.about-president-frame img { display:block; width:100%; height:100%; object-fit:contain; object-position:center bottom; }.about-president-photo > span { position: absolute; z-index:2; right: 22px; bottom: 18px; padding: 9px 13px; border-radius: 999px; background:#fff; color:#5614a4; font-size:.72rem; font-weight:900; letter-spacing:.1em; }.about-president-copy { align-self:center; padding: 50px 54px; }.about-president-copy h2 { margin: 9px 0 6px; color:#4b1196; font-size:clamp(1.8rem,3vw,2.65rem); line-height:1.28; overflow-wrap:anywhere; }.about-president-role { margin: 0 0 22px!important; color:#d06103!important; font-weight:850; line-height:1.6; }.about-president-copy > p:not(.about-president-role) { color:#625275; line-height:1.85; }.about-president-link { display:inline-flex; align-items:center; gap:8px; margin-top:12px; color:#4b1196; font-size:.9rem; font-weight:900; text-decoration:none; }.about-president-link .material-symbols-outlined { font-size:19px; }.about-president-link .material-symbols-outlined:last-child { margin-left:3px; }
.about-actions { display:grid; grid-template-columns:repeat(3,1fr); gap:15px; margin-top:28px; }.about-actions a { display:flex; align-items:center; gap:13px; min-height:92px; padding:17px; border:1px solid #e2d4ee; border-radius:15px; background:#fff; color:#321066; text-decoration:none; box-shadow:0 7px 19px rgba(43,11,93,.06); transition:translate .2s,box-shadow .2s; }.about-actions a:hover { translate:0 -3px; box-shadow:0 13px 25px rgba(43,11,93,.12); }.about-actions > a > .material-symbols-outlined:first-child { display:grid; width:38px; height:38px; place-items:center; flex:none; border-radius:10px; background:#f0e6fb; color:#6622aa; }.about-actions div { min-width:0; }.about-actions b,.about-actions small { display:block; }.about-actions b { font-size:.9rem; }.about-actions small { margin-top:4px; color:#766684; font-size:.72rem; line-height:1.4; }.about-actions > a > .material-symbols-outlined:last-child { margin-left:auto; color:#9c48d2; font-size:19px; }
@media (max-width:900px) { .about-hero-mark { width:180px; height:180px; margin-right:20px; }.about-hero-mark img { width:150px; height:150px; }.about-intro-grid { grid-template-columns:1fr; }.about-pillar-grid { max-width:620px; }.about-history-grid { grid-template-columns:repeat(3,1fr); }.about-president-copy { padding:38px; }.about-actions { grid-template-columns:1fr; } }
@media (max-width:640px) { .about-hero-inner { min-height:0; padding-top:36px; padding-bottom:38px; }.about-heading-meta { align-items:flex-start; flex-direction:column; gap:8px; }.about-hero-mark { display:none; }.about-page { padding:38px 0 50px; }.about-pillar-grid { grid-template-columns:1fr; }.about-pillar-grid article,.about-pillar-grid article:nth-child(2) { min-height:0; translate:none; }.about-history { margin-top:45px; padding:26px 20px; border-radius:18px; }.about-history-grid { grid-template-columns:1fr; margin-top:22px; }.about-history-grid article { min-height:0; }.about-president { grid-template-columns:1fr; margin-top:48px; }.about-president-photo { min-height:360px; }.about-president-frame { height:318px; }.about-president-copy { padding:31px 23px; }.about-actions { margin-top:17px; } }

/* Shared purple heading band for all inner pages. */
.page-hero,
.archive-news-head {
  position: relative;
  overflow: hidden;
  border-bottom: 0;
  background: radial-gradient(circle at 87% 8%, rgba(164,91,237,.72), transparent 35%), linear-gradient(112deg, #180037, #3c087a 58%, #6528a6);
}
.page-hero::after { display: none; }
.page-hero .shell,
.page-hero-compact .shell { padding-block: 52px 44px; }
.page-hero h1,
.page-hero-compact h1,
.archive-news-head h1 { color: #fff; text-shadow: 0 2px 14px rgba(11,0,33,.22); }
.page-hero > .shell > p,
.page-hero .desc,
.archive-news-head p { color: rgba(255,255,255,.82); }
.page-hero-kicker,
.archive-news-kicker { color: #ffd7a1; }
.page-hero-kicker .material-symbols-outlined,
.archive-news-kicker .material-symbols-outlined { color: inherit; }
.archive-news-head { padding: 50px 0 42px; }
.archive-news-title-row > a { color: #fff0d4; }
.archive-news-title-row > a .material-symbols-outlined { color: inherit; }


/* English header: keep the wordmark visible while giving language controls a lighter footprint. */
@media (min-width: 901px) {
  html[lang^="en"] .brand { flex: 0 0 120px; min-width: 120px; }
  html[lang^="en"] .brand-logo-horizontal { width: 120px; max-width: 120px; }
}
html[lang^="en"] .accessibility-tools { gap: 4px; }
html[lang^="en"] .lang-switch { gap: 4px; }
html[lang^="en"] .lang-switch a,
html[lang^="en"] .accessibility-tools button {
  min-width: 24px;
  height: 22px;
  padding: 0 6px;
  font-size: 0.62rem;
}

@media (min-width: 901px) {
  html[lang^="en"] .main-nav ul { gap: 8px; }
  html[lang^="en"] .main-nav a { font-size: 0.86rem; padding: 8px 7px; }
}

@media (min-width: 901px) {
  html[lang^="en"] .brand { flex: 0 0 307px; min-width: 307px; }
  html[lang^="en"] .brand-logo-horizontal { width: 307px; max-width: 307px; max-height: 64px; }
  html[lang^="en"] .main-nav ul { gap: 5px; }
  html[lang^="en"] .main-nav a { font-size: 0.78rem; padding: 6px 5px; }
}


/* poster news cards: uniform landscape crop from the top */
.archive-wrap .news-card .news-image { aspect-ratio: 16 / 9 !important; height: auto !important; background: #fff; overflow: hidden; }
.archive-wrap .news-card .news-image img { width: 100% !important; height: 100% !important; object-fit: cover !important; object-position: center top !important; filter: none !important; background: #fff; }

/* tea-textfix: keep emails and kickers on one line */
.tp-info .v{white-space:nowrap;overflow-wrap:normal;word-break:normal;font-size:clamp(.8rem,1.15vw,1rem)}
.archive-news-kicker,.archive-news-kicker *{white-space:nowrap}
.archive-news-kicker{flex-shrink:0;max-width:none}

/* tea-footerfix: 3 link columns + brand */
@media (min-width:1001px){.footer-grid{grid-template-columns:repeat(3,minmax(0,1fr)) minmax(245px,1.35fr)}}
.site-footer .footer-column .footer-social + .footer-social{margin-top:10px}

/* tea-socials: one row of social links under the footer columns */
.site-footer .footer-column{min-height:0!important}
.footer-socials{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:14px 40px;margin-top:36px;padding-top:28px;border-top:1px solid rgba(255,255,255,.12)}
.footer-socials .footer-social{margin:0!important;display:inline-flex!important;flex-direction:row!important;align-items:center;gap:10px}
.footer-socials .footer-social>span{width:36px;height:36px;margin:0!important;flex:0 0 36px}
.footer-socials .footer-social b{font-size:.9rem;white-space:nowrap}
@media(max-width:700px){.footer-socials{flex-direction:column;align-items:flex-start;width:max-content!important;margin-inline:auto;gap:14px}}
