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

html { scroll-behavior: smooth; }

body {
  background: var(--bs-bg);
  color: var(--bs-text);
  font-family: var(--bs-font-body);
  font-size: 17px;
  line-height: var(--bs-lh-body-th);
  word-break: normal;
  line-break: normal;
  -webkit-font-smoothing: antialiased;
  transition: background-color .18s ease, color .18s ease;
}
/* Guideline: Thai runs one step larger than English (body-th 17/1.65, body 16/1.6). */
html:lang(en) body { font-size: 16px; line-height: 1.6; }
/* Archivo Black is set tight in English (0.95–1.1); Thai display keeps ≥ 1.25. Only i18n headings —
   event titles come from the database and are often Thai on English pages. */
:lang(en) :is(.hero h1, h2.section-title, .page-head h1) { line-height: 1.12; }
/* Guideline: Thai is never letter-spaced. These labels carry the page's language, so in Thai they drop the tracking. */
:lang(th) :is(.footer-privacy, .footer-company, .chip-text, .done-tag, .gap-mid) { letter-spacing: 0; }

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Header: one size and layout on every page ---- */
header.site-header { position: relative; z-index: 40; border-bottom: 1px solid var(--bs-border); background: var(--bs-bg); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 18px;
}
.header-inner .logo img { height: 46px; width: auto; display: block; }
.header-right { display: flex; align-items: center; gap: 18px; }

nav.site-nav { display: flex; align-items: center; gap: 4px; }
nav.site-nav > a, .nav-menu-btn {
  font-family: var(--bs-font-body);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.7;
  color: var(--bs-text-subtle);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: var(--bs-radius-md);
}
nav.site-nav > a:hover, .nav-menu-btn:hover { color: var(--bs-text); }
nav.site-nav > a.active, .nav-menu-btn.active { color: var(--bs-text-link); font-weight: 700; }
nav.site-nav a:focus-visible, .nav-menu-btn:focus-visible { outline: 2px solid var(--bs-text-link); outline-offset: 2px; }

/* Classroom menu: a disclosure button and a full-width panel under the header. The panel is
   positioned against the header, so the scrolling nav row on phones never clips it. */
.nav-menu-btn { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; cursor: pointer; }
.nav-menu-btn svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .18s ease; }
.nav-menu-btn[aria-expanded="true"] { color: var(--bs-text); }
.nav-menu-btn.active[aria-expanded="true"] { color: var(--bs-text-link); }
.nav-menu-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav-panel { position: absolute; left: 0; right: 0; top: 100%; background: var(--bs-bg); border-block: 1px solid var(--bs-border); }
.nav-panel[hidden] { display: none; }
.nav-panel-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 56px; padding-block: 32px 40px; }
.nav-panel-label { display: block; margin-bottom: 14px; font: 700 12px/1.4 var(--bs-font-label); letter-spacing: var(--bs-track-label); text-transform: uppercase; color: var(--bs-text-muted); }
:lang(th) .nav-panel-classes .nav-panel-label { letter-spacing: 0; }
.nav-panel-intro p { font-size: 16px; line-height: 1.7; color: var(--bs-text-subtle); max-width: 26em; }
.nav-panel-all, .nav-panel-line { display: table; text-decoration: none; font-weight: 700; }
.nav-panel-all { margin-top: 20px; font-size: 16px; color: var(--bs-text-link); }
.nav-panel-line { margin-top: 10px; font-size: 15px; color: var(--bs-text-subtle); }
.nav-panel-all:hover, .nav-panel-line:hover { text-decoration: underline; text-underline-offset: 4px; }
.nav-panel-classes ul { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.nav-panel-classes li a { display: flex; flex-direction: column; gap: 8px; color: inherit; text-decoration: none; }
.nav-panel-classes li a:hover .npc-tile { background: var(--bs-blue-deep); }
/* Class tile: the brand blue field with the mark's squares, the class name set on it. */
.npc-tile { position: relative; display: flex; align-items: flex-end; aspect-ratio: 16 / 10; padding: 14px 16px; border-radius: var(--bs-radius-lg); overflow: hidden; background: var(--bs-blue); color: var(--bs-paper); transition: background-color .18s ease; }
.npc-tile i { position: absolute; width: 34%; aspect-ratio: 1; border-radius: 14%; background: var(--bs-on-blue-faint); }
.npc-tile i:nth-child(1) { top: -14%; right: 10%; }
.npc-tile i:nth-child(2) { top: 18%; right: -12%; }
.npc-tile i:nth-child(3) { top: -30%; right: 48%; width: 22%; }
.npc-title { position: relative; font-family: var(--bs-font-display); font-size: 19px; line-height: 1.1; }
.npc-soon { font-size: 13px; font-weight: 600; color: var(--bs-text-muted); }
@media (prefers-reduced-motion: no-preference) {
  .nav-panel:not([hidden]) { animation: nav-panel-in .18s ease-out; }
}
@keyframes nav-panel-in { from { opacity: 0; transform: translateY(-6px); } }

/* Theme-aware lockups — img-qualified so plain class rules elsewhere can't tie
   the specificity and force both variants visible (the footer bug). */
html[data-theme] img.on-light { display: none; }
html[data-theme] img.on-dark { display: block; }
html[data-theme="light"] img.on-light { display: block; }
html[data-theme="light"] img.on-dark { display: none; }

.lang-toggle {
  display: flex; align-items: center; justify-content: center;
  height: 38px; padding: 0 12px; flex: 0 0 auto;
  font-family: var(--bs-font-label);
  font-size: 12px; font-weight: 700;
  letter-spacing: var(--bs-track-label);
  text-decoration: none;
  border: 1px solid var(--bs-border);
  border-radius: var(--bs-radius-md);
  color: var(--bs-text-muted);
  transition: color .18s ease, border-color .18s ease;
}
.lang-toggle:hover { color: var(--bs-text); border-color: var(--bs-text-muted); }

.theme-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; padding: 0; flex: 0 0 auto;
  background: none;
  border: 1px solid var(--bs-border);
  border-radius: var(--bs-radius-md);
  color: var(--bs-text-muted);
  cursor: pointer;
  transition: color .18s ease, border-color .18s ease;
}
.theme-toggle:hover { color: var(--bs-text); border-color: var(--bs-text-muted); }
.theme-toggle:focus-visible { outline: 2px solid var(--bs-text-link); outline-offset: 2px; }
.theme-toggle svg { width: 17px; height: 17px; display: block; }
.theme-toggle .icon-sun { display: block; }
.theme-toggle .icon-moon { display: none; }
html[data-theme="light"] .theme-toggle .icon-sun { display: none; }
html[data-theme="light"] .theme-toggle .icon-moon { display: block; }

@media (max-width: 720px) {
  .header-inner { flex-wrap: wrap; gap: 10px; padding-block: 16px 8px; }
  .header-inner .logo img { height: 42px; }
  /* Nav drops to its own full-width row; toggles stay beside the logo. */
  .header-right { display: contents; }
  .lang-toggle { margin-left: auto; }
  nav.site-nav { order: 3; width: 100%; justify-content: space-between; overflow-x: auto; }
  nav.site-nav > a, .nav-menu-btn { white-space: nowrap; padding: 8px 10px; }
  .nav-panel { max-height: calc(100svh - 120px); overflow-y: auto; }
  .nav-panel-inner { grid-template-columns: 1fr; gap: 26px; padding-block: 22px 28px; }
  .nav-panel-classes ul { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .npc-tile { padding: 12px; }
  .npc-title { font-size: 16px; }
}

/* ---- Type + sections ---- */
/* Small label over a page title; only the About hero keeps one. */
.eyebrow {
  display: inline-block;
  font-family: var(--bs-font-label);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: var(--bs-track-label);
  text-transform: uppercase;
  color: var(--bs-text-accent);
  border-top: 3px solid var(--bs-blue);
  padding-top: 10px;
  margin-bottom: 28px;
}

.hero { padding-block: 84px 72px; }
.hero h1 {
  font-family: var(--bs-font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: clamp(34px, 6vw, 56px);
  line-height: var(--bs-lh-display-th);
  max-width: 18em;
}
.hero .lead {
  margin-top: 26px;
  font-size: 19px;
  line-height: 1.65;
  color: var(--bs-text-subtle);
  max-width: 34em;
}
.hero .lead-en {
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--bs-text-muted);
  max-width: 40em;
}

.cta-row { margin-top: 36px; display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }

.btn {
  display: inline-block;
  font-family: var(--bs-font-body);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: var(--bs-radius-md);
  border: none;
  cursor: pointer;
}
.btn-primary { background: var(--bs-blue); color: var(--bs-paper); }
.btn-primary:hover { background: var(--bs-blue-deep); }
.btn-primary:disabled { opacity: .55; cursor: default; }
.btn-ghost { background: none; color: var(--bs-text-link); border: 1.5px solid var(--bs-border); }
.btn-ghost:hover { border-color: var(--bs-text-link); }
.btn:focus-visible { outline: 3px solid var(--bs-text-link); outline-offset: 3px; }

section.band { border-top: 1px solid var(--bs-border); padding-block: 64px; }
/* A section heading with its "see all" link on the same line; the link drops below on a phone. */
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 18px; }
.section-head h2.section-title { flex: 1 1 0; min-width: min(100%, 16em); margin-bottom: 0; }
/* A list's heading (events page, home announcements): a step smaller than a section title. */
h2.section-title.list-title { font-size: clamp(22px, 2.8vw, 28px); margin-bottom: 24px; }
.section-more { flex: none; color: var(--bs-text-link); text-decoration: none; font-family: var(--bs-font-body); font-size: 15px; font-weight: 600; }

h2.section-title {
  font-family: var(--bs-font-display);
  font-weight: 700;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.3;
  max-width: 22em;
  margin-bottom: 18px;
}
.section-body { color: var(--bs-text-subtle); max-width: 36em; }

/* ---- Video ---- */
.video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--bs-radius-md);
  overflow: hidden;
}
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-title {
  font-family: var(--bs-font-body);
  font-weight: 700;
  font-size: 19px;
  line-height: 1.45;
  margin-top: 16px;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px 28px;
  margin-top: 8px;
}
@media (max-width: 860px) { .video-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .video-grid { grid-template-columns: 1fr; } }
.video-card { text-decoration: none; color: inherit; display: block; }
.video-card .thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--bs-radius-lg);
  background: var(--bs-bg-raised);
  display: block;
}
.video-card h3 {
  font-family: var(--bs-font-body);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.45;
  margin-top: 12px;
}
.video-card:hover h3 { color: var(--bs-text-link); }

/* ---- Events ---- */
.event-card {
  display: flex;
  gap: 24px;
  border: 1px solid var(--bs-border);
  border-radius: var(--bs-radius-lg);
  padding: 24px;
  text-decoration: none;
  color: inherit;
  margin-bottom: 16px;
  transition: border-color .15s ease;
}
.event-card:hover { border-color: var(--bs-text-link); }
.event-card .poster {
  width: 180px;
  flex: 0 0 180px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--bs-radius-md);
  background: var(--bs-bg-raised);
}
.event-card .body { min-width: 0; }
.event-card h3 {
  font-family: var(--bs-font-body);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.4;
}
.event-meta {
  margin-top: 10px;
  font-size: 15px;
  color: var(--bs-text-subtle);
  line-height: 1.7;
}
/* Date/time line: body font at full contrast — the tracked 12px label face was too faint for Thai dates. */
.event-meta .mono {
  font-family: var(--bs-font-body);
  font-size: 15.5px;
  font-weight: 600;
  color: var(--bs-text);
  letter-spacing: 0;
}
.event-meta .nw { white-space: nowrap; }
.event-card .desc {
  margin-top: 10px;
  font-size: 15px;
  color: var(--bs-text-subtle);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (max-width: 560px) {
  .event-card { flex-direction: column; }
  .event-card .poster { width: 100%; flex: none; aspect-ratio: 16 / 9; }
}

.chip {
  display: inline-block;
  font-family: var(--bs-font-label);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: var(--bs-track-label);
  padding: 4px 10px;
  border-radius: var(--bs-radius-pill);
  border: 1px solid var(--bs-border);
  color: var(--bs-text-muted);
}
.chip-online { color: var(--bs-text-link); border-color: currentColor; }

/* ---- Event page / registration ---- */
.event-hero { padding-block: 56px 0; }
.event-hero .poster-lg {
  /* Natural aspect ratio, never cropped — posters are usually 4:5 portrait. */
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 640px;
  border-radius: var(--bs-radius-lg);
}
.event-hero .poster-row { margin-bottom: 36px; }
/* Two posters sit side by side, equal widths, tops aligned; stacked on phones. */
.event-hero .poster-row.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}
.event-hero .poster-row.two .poster-lg { width: 100%; max-height: none; }
@media (max-width: 640px) {
  .event-hero .poster-row.two { grid-template-columns: 1fr; }
}
.event-hero h1 {
  font-family: var(--bs-font-display);
  font-weight: 700;
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.3;
  max-width: 20em;
}
.event-info {
  margin-top: 22px;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 20px;
  font-size: 16px;
}
.event-info dt { color: var(--bs-text-muted); font-size: 14px; padding-top: 2px; }
.event-info dd { margin: 0; }
.event-desc { margin-top: 28px; color: var(--bs-text-subtle); max-width: 40em; white-space: pre-line; }
.event-desc a { color: var(--bs-text-link); overflow-wrap: anywhere; }

.reg-form { max-width: 480px; }
.reg-form .field { margin-bottom: 18px; }
.reg-form label {
  display: block;
  font-family: var(--bs-font-body);
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 7px;
}
.reg-form label .req { color: var(--bs-text-crit); }
.reg-form input, .reg-form select {
  width: 100%;
  font-family: var(--bs-font-body);
  font-size: 16px;
  color: var(--bs-text);
  background: var(--bs-bg);
  border: 1px solid var(--bs-border);
  border-radius: var(--bs-radius-md);
  padding: 11px 14px;
}
.reg-form input:focus, .reg-form select:focus {
  outline: none;
  border-color: var(--bs-blue);
}
.form-msg { margin-top: 16px; font-size: 15px; line-height: 1.6; }
.form-msg.ok { color: var(--bs-text-pass); }
.form-msg.err { color: var(--bs-text-crit); }

/* Registration confirmation pop-up: a ticket with a blue header, a
   perforation and an event stub. The dialog itself is transparent so the
   perforation's notches show the backdrop through them. */
.reg-dialog {
  --rd-bg: var(--bs-bg);
  --rd-panel: var(--bs-blue-wash);
  margin: auto;
  width: min(420px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--bs-text);
  filter: drop-shadow(0 0 1px var(--bs-border)) drop-shadow(0 24px 48px rgba(0, 0, 0, .35));
}
html[data-theme="dark"] .reg-dialog { --rd-bg: var(--bs-bg-raised); --rd-panel: var(--bs-bg-surface); }
.reg-dialog::backdrop { background: rgba(0, 0, 0, .65); }
.reg-dialog[open] { animation: rd-in .26s cubic-bezier(.2, .8, .3, 1); }
@keyframes rd-in { from { opacity: 0; transform: translateY(14px) scale(.97); } }

.rd-head {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 16px 16px 22px;
  background: var(--bs-blue); color: var(--bs-paper);
  border-radius: var(--bs-radius-md) var(--bs-radius-md) 0 0;
}
.rd-mark { width: 26px; height: 26px; flex: 0 0 auto; fill: currentColor; }
.rd-eyebrow { flex: 1; min-width: 0; font-family: var(--bs-font-label); font-size: 12px; font-weight: 700; letter-spacing: var(--bs-track-label); }
.rd-x { width: 36px; height: 36px; flex: 0 0 auto; display: grid; place-items: center; border: none; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; }
.rd-x:hover { background: rgba(255, 255, 255, .16); }
.rd-x:focus-visible { outline: 2px solid var(--bs-paper); outline-offset: 1px; }
.rd-x svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; fill: none; }

.rd-body { padding: 24px 24px 10px; background: var(--rd-bg); }
.rd-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 12px 3px 9px; border-radius: var(--bs-radius-pill);
  font-size: 14px; font-weight: 600; line-height: 1.6;
  color: var(--bs-status-ink);
}
.rd-chip.pass { background: var(--bs-pass); }
.rd-chip.pass::before { content: "\2713"; font-weight: 700; }
.rd-chip.watch { background: var(--bs-watch); }
.rd-chip.watch::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.rd-body h3 { margin-top: 14px; font-family: var(--bs-font-display); font-size: 28px; font-weight: 700; line-height: var(--bs-lh-display-th); text-wrap: balance; overflow-wrap: anywhere; }
.rd-lead { margin-top: 6px; font-size: 16.5px; line-height: 1.65; color: var(--bs-text-muted); }

/* Perforation: half-circle notches on both edges plus a dashed tear line. */
.rd-perf {
  position: relative; height: 28px; background: var(--rd-bg);
  -webkit-mask: radial-gradient(circle 12px at 0 50%, transparent 97%, #000) left / 51% 100% no-repeat,
                radial-gradient(circle 12px at 100% 50%, transparent 97%, #000) right / 51% 100% no-repeat;
          mask: radial-gradient(circle 12px at 0 50%, transparent 97%, #000) left / 51% 100% no-repeat,
                radial-gradient(circle 12px at 100% 50%, transparent 97%, #000) right / 51% 100% no-repeat;
}
.rd-perf::before { content: ""; position: absolute; left: 22px; right: 22px; top: 50%; border-top: 2px dashed var(--bs-border); }

.rd-stub { display: flex; flex-direction: column; gap: 18px; padding: 10px 24px 24px; background: var(--rd-bg); border-radius: 0 0 var(--bs-radius-md) var(--bs-radius-md); }
.rd-event { font-family: var(--bs-font-display); font-size: 18px; font-weight: 600; line-height: 1.45; }
.rd-info { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 15px; line-height: 1.6; }
.rd-info dt { font-family: var(--bs-font-label); font-size: 12px; letter-spacing: .04em; color: var(--bs-text-muted); padding-top: 3px; }
.rd-info dd { min-width: 0; }
.rd-mail { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--bs-radius-md); background: var(--rd-panel); font-size: 15px; line-height: 1.6; }
.rd-mail > div { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.rd-mail svg { width: 20px; height: 20px; flex: 0 0 auto; margin-top: 2px; fill: none; stroke: var(--bs-text-link); stroke-width: 1.6; stroke-linejoin: round; }
.rd-mail strong { font-weight: 600; overflow-wrap: anywhere; }
.rd-hint { font-size: 13.5px; color: var(--bs-text-muted); }
.rd-hint a { color: var(--bs-text-link); font-weight: 600; text-decoration: none; white-space: nowrap; }
.rd-hint a:hover { text-decoration: underline; }
.rd-stub .btn { width: 100%; }
.rd-line { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--bs-radius-md); border: 1px solid var(--bs-border); font-size: 15px; line-height: 1.6; }
.rd-line > div { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.rd-line-icon { width: 22px; height: 22px; flex: 0 0 auto; margin-top: 1px; fill: #06C755; }
.rd-line-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.rd-line-btns a { display: inline-block; padding: 8px 14px; border-radius: var(--bs-radius-md); border: 1.5px solid var(--bs-border); color: var(--bs-text-link); font-size: 14px; font-weight: 700; text-decoration: none; }
.rd-line-btns a:first-child { border-color: var(--bs-text-link); }
.rd-line-btns a:hover { background: var(--rd-panel); }
.rd-line[hidden] { display: none; }
.rd-line-btns a.rd-line-go { background: #06C755; border-color: #06C755; color: #FFFFFF; }
.rd-line-btns a.rd-line-go:hover { background: #05B34C; }

@media (max-width: 400px) {
  .rd-body { padding-inline: 20px; }
  .rd-stub { padding-inline: 20px; }
  .rd-body h3 { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) { .reg-dialog[open] { animation: none; } }
.reg-closed {
  border: 1px solid var(--bs-border);
  border-radius: var(--bs-radius-lg);
  padding: 20px 24px;
  color: var(--bs-text-muted);
  max-width: 480px;
}

/* ---- Points (home about) ---- */
.points { margin-top: 44px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
@media (max-width: 760px) { .points { grid-template-columns: 1fr; } }
.point { border-top: 1px solid var(--bs-border); padding-top: 22px; }
.point .ref {
  font-family: var(--bs-font-label);
  font-size: 12px; font-weight: 700;
  letter-spacing: var(--bs-track-label);
  color: var(--bs-text-link);
  display: block; margin-bottom: 12px;
}
.point h3 { font-family: var(--bs-font-body); font-weight: 700; font-size: 20px; line-height: 1.45; margin-bottom: 10px; }
.point p { font-size: 15.5px; color: var(--bs-text-muted); line-height: 1.65; }

/* ---- Footer ---- */
footer.site-footer { border-top: 1px solid var(--bs-border); padding-block: 44px 60px; }
.footer-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.footer-inner img.lockup { height: 56px; width: auto; }
.footer-tagline { margin-top: 14px; font-size: 14px; font-weight: 500; color: var(--bs-text-link); }
.footer-right { display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }
@media (max-width: 560px) { .footer-right { align-items: flex-start; } }
.social-bar { display: flex; gap: 10px; }
.social-bar a {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border: 1px solid var(--bs-border);
  border-radius: var(--bs-radius-md);
  color: var(--bs-text-muted);
}
.social-bar a:hover { color: var(--bs-text); border-color: var(--bs-text-muted); }
.social-bar svg { width: 17px; height: 17px; }
.footer-meta {
  font-family: var(--bs-font-label);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: var(--bs-track-label);
  color: var(--bs-text-muted);
  text-align: right;
  line-height: 2;
}
@media (max-width: 560px) {
  .footer-meta { text-align: left; }
  /* Phones: each part on its own line instead of a "|" left hanging at a line end. */
  .footer-meta .fm-part { display: block; }
  .footer-meta .fm-sep, .footer-meta .fm-br { display: none; }
}

.empty-note { color: var(--bs-text-muted); font-size: 15px; }

.page-head { padding-block: 56px 8px; }
.page-head h1 {
  font-family: var(--bs-font-display);
  font-weight: 700;
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.25;
}
.page-head .sub { margin-top: 14px; color: var(--bs-text-subtle); max-width: 36em; }

/* Inner-page header: compact brand-blue panel with the mark's rounded squares. */
.page-band { position: relative; overflow: hidden; background: var(--bs-blue); color: var(--bs-paper); }
.page-band::before, .page-band::after { content: ''; position: absolute; aspect-ratio: 1; border-radius: 20px; background: var(--bs-on-blue-faint); pointer-events: none; }
.page-band::before { width: 200px; top: -70px; right: 12%; }
.page-band::after { width: 150px; bottom: -60px; right: -40px; }
.page-band .page-head { position: relative; padding-block: 60px 56px; }
.page-band .page-head h1 { color: var(--bs-paper); }
.page-band .page-head .sub { color: rgba(255, 255, 255, .88); }
.page-band a { color: var(--bs-paper); text-underline-offset: 3px; }
.page-band + section.band { border-top: none; }
.nf-page { min-height: 50vh; }

/* Event recap (post-event highlights) */
.recap .section-title { font-size: clamp(24px, 3vw, 32px); }
.recap-summary { max-width: 46em; line-height: 1.8; }
.recap-video { margin-top: 28px; max-width: 880px; }
.recap-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 28px; }
.recap-gallery a { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--bs-bg-raised); border-radius: var(--bs-radius-md); }
.recap-gallery img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.recap-gallery a:hover img { transform: scale(1.03); }
.recap-gallery a:focus-visible { outline: 3px solid var(--bs-text-link); outline-offset: 2px; }
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgba(0, 0, 0, .88); }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox img { max-width: min(92vw, 1400px); max-height: 86vh; object-fit: contain; }
.lightbox button { position: absolute; background: rgba(0, 0, 0, .5); color: #fff; border: 0; border-radius: var(--bs-radius-md); width: 48px; height: 48px; font: 20px/1 var(--bs-font-body); cursor: pointer; }
.lightbox button:hover { background: rgba(0, 0, 0, .8); }
.lightbox button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); color: #fff; font: 13px var(--bs-font-label); }
.chip-recap { background: var(--bs-blue); color: var(--bs-paper); border-color: var(--bs-blue); }
.event-card.is-past:not(.has-recap) { opacity: .75; }
@media (max-width: 640px) {
  .recap-gallery { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .lb-prev, .lb-next { top: auto; bottom: 8px; transform: none; }
}

@media (prefers-reduced-motion: reduce) { .recap-gallery img { transition: none; } .recap-gallery a:hover img { transform: none; } }

/* Privacy notice */
.privacy { max-width: 46em; }
.privacy h2 { font-size: 20px; margin: 40px 0 12px; }
.privacy h2:first-child { margin-top: 0; }
.privacy p, .privacy li { color: var(--bs-text-subtle); line-height: 1.75; }
.privacy p { margin: 0 0 12px; }
.privacy ul { margin: 0 0 14px; padding-left: 1.3em; }
.privacy li { margin-bottom: 6px; }
.privacy li > ul { margin: 8px 0 0; }
.privacy strong { color: var(--bs-text); font-weight: 600; }
.privacy p a, .privacy li a { color: var(--bs-text-link); text-decoration: underline; text-underline-offset: 2px; }

/* Terms: choices nobody has answered yet. The build refuses to ship while any are open, so guests never see these. */
.terms-open { background: #FFE58A; color: #3D2E00; padding: 0 .25em; border-radius: 3px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.terms-open strong { color: inherit; }
.terms-todo { border: 2px dashed #E0A800; background: #FFF8DB; color: #3D2E00; border-radius: var(--bs-radius-md); padding: 14px 18px; margin: 0 0 32px; }
.terms-todo p, .terms-todo li { color: inherit; }
.terms-todo ul { margin: 6px 0 0; }
.terms-todo code { font-size: .9em; background: rgba(0,0,0,.06); padding: 0 .3em; border-radius: 3px; }

/* ---- Classroom class cards (home page and /classroom): the class name up front on the brand blue ---- */
.class-row { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.class-card, .class-more { position: relative; display: flex; flex-direction: column; aspect-ratio: 4 / 5; padding: 24px; border-radius: var(--bs-radius-lg); overflow: hidden; }
.class-card { justify-content: space-between; background: var(--bs-blue); color: var(--bs-paper); text-decoration: none; transition: background-color .18s ease; }
a.class-card:hover { background: var(--bs-blue-deep); }
.class-card:focus-visible { outline: 3px solid var(--bs-text-link); outline-offset: 4px; }
/* Three of the mark's squares, kept clear of the label row and the name (no text on tiles). */
.class-art i { position: absolute; width: 24%; aspect-ratio: 1; border-radius: 14%; background: var(--bs-on-blue-faint); }
.class-art i:nth-child(1) { top: 19%; right: 7%; }
.class-art i:nth-child(2) { top: 19%; right: 34%; }
.class-art i:nth-child(3) { top: 41%; right: 7%; }
.class-top { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 12px; font: 700 12px/1 var(--bs-font-label); letter-spacing: var(--bs-track-label); }
.class-soon { padding: 7px 11px 6px; border-radius: var(--bs-radius-pill); background: var(--bs-paper); color: var(--bs-blue); text-transform: uppercase; }
:lang(th) .class-soon { font-size: 13px; letter-spacing: 0; text-transform: none; }
.class-title { position: relative; margin-top: auto; font-family: var(--bs-font-display); font-size: clamp(30px, 3.4vw, 46px); line-height: 1.02; overflow-wrap: anywhere; }
.class-by { position: relative; margin-top: 14px; font-size: 13px; font-weight: 600; }
.class-more { justify-content: flex-end; gap: 10px; background: var(--bs-grey); color: var(--bs-void); }
html[data-theme="dark"] .class-more { background: var(--bs-bg-raised); color: var(--bs-text); }
.class-more-title { font-family: var(--bs-font-display); font-weight: 700; font-size: 24px; line-height: 1.3; }
.class-more p { font-size: 15px; line-height: 1.7; color: var(--bs-text-subtle); }
.class-more .text-link { margin-top: 8px; gap: 16px; }
@media (max-width: 720px) {
  /* Cards scroll sideways on phones, like a shelf, with the next one peeking in. */
  .class-row { display: flex; gap: 14px; margin-inline: -24px; padding: 0 24px 6px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 24px; scrollbar-width: none; }
  .class-row::-webkit-scrollbar { display: none; }
  .class-row > li { flex: 0 0 74%; scroll-snap-align: start; }
  .class-card, .class-more { height: 100%; padding: 20px; }
}
@media (prefers-reduced-motion: reduce) { .class-card { transition: none; } }

/* ---- /classroom placeholder (replaced when the Classroom app ships) ---- */
.classroom-soon .page-band .page-head { padding-block: 88px 80px; }
.classroom-soon .page-head h1 { font-size: clamp(40px, 6.4vw, 80px); line-height: 1.05; max-width: 12em; }
:lang(th) .classroom-soon .page-head h1 { line-height: 1.25; }
.classroom-soon .page-head h1 .thin { display: block; }
.classroom-soon .page-head .sub { font-size: 18px; line-height: 1.75; max-width: 34em; }
.cs-note { margin-top: 14px; font-size: 15.5px; line-height: 1.75; color: rgba(255, 255, 255, .85); max-width: 36em; }
.classroom-soon .page-band .btn-primary { background: var(--bs-paper); color: var(--bs-blue); }
.classroom-soon .page-band .btn-primary:hover { background: var(--bs-grey); }
.classroom-soon .page-band .btn-ghost { color: var(--bs-paper); border-color: rgba(255, 255, 255, .6); text-decoration: none; }
.classroom-soon .page-band .btn-ghost:hover { border-color: var(--bs-paper); }
.classroom-soon .page-band .btn:focus-visible { outline-color: var(--bs-paper); }
