@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&family=Noto+Sans+Thai:wght@400;500;600;700;800&display=swap");

:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #5f6877;
  --line: #dfe4ec;
  --brand: #126b5f;
  --brand-strong: #0d4f47;
  --gold: #c48720;
  --soft: #eef7f5;
  --shadow: 0 20px 55px rgba(19, 32, 52, .10);
  --shadow-soft: 0 12px 30px rgba(19, 32, 52, .06);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: #334155 #0f172a;
}

/* ==========================================================================
   Custom Theme-Aware Scrollbar System
   ========================================================================== */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-main, #0f172a);
}

::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 10px;
  border: 2px solid var(--bg-main, #0f172a);
  transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-sky, #38bdf8);
}

/* Light Theme Scrollbar */
[data-theme="light"] {
  scrollbar-color: #94a3b8 #f8fafc !important;
}

[data-theme="light"] ::-webkit-scrollbar-track {
  background: #f8fafc !important;
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: #cbd5e1 !important;
  border: 2px solid #f8fafc !important;
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
  background: #0284c7 !important;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Sarabun", "Noto Sans Thai", Inter, "Segoe UI", Tahoma, Arial, sans-serif;
  line-height: 1.65;
  background:
    radial-gradient(circle at top left, rgba(18, 107, 95, .08), transparent 28%),
    linear-gradient(180deg, #f8fafc 0%, var(--bg) 100%);
  color: var(--ink);
}

a {
  color: inherit;
}

.site-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(247, 248, 251, .92);
  border-bottom: 1px solid rgba(223, 228, 236, .85);
  backdrop-filter: blur(14px);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 8px;
  background: transparent;
  box-shadow: 0 10px 24px rgba(19, 32, 52, .10);
}

.brand-mark img {
  width: 40px;
  height: 40px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav a,
.button,
.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 8px;
  color: #1f2937;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.nav a:hover,
.icon-link:hover {
  background: #edf1f6;
}

.hero {
  padding: 72px 0 46px;
}

.home-hero {
  padding: 72px 0 34px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
  gap: 42px;
  align-items: center;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-bottom: 18px;
  padding: 6px 10px;
  border: 1px solid #cfe3df;
  border-radius: 999px;
  background: #f7fffd;
  color: var(--brand-strong);
  font-size: 13px;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: 68px;
  line-height: 1.05;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 16px;
  font-size: 38px;
  line-height: 1.18;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 20px;
  line-height: 1.25;
}

.lead {
  max-width: 720px;
  color: var(--muted);
  font-size: 19px;
}

.home-lead {
  max-width: 690px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  border: 1px solid transparent;
  cursor: pointer;
}

.button.primary {
  background: var(--brand);
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(18, 107, 95, .22);
}

.button.primary:hover {
  background: var(--brand-strong);
}

.button.secondary {
  border-color: var(--line);
  background: #ffffff;
}

.button.secondary:hover {
  background: #f0f4f8;
}

.status-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.workspace-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.workspace-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfe;
}

.window-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #d1d8e2;
}

.window-dot:nth-child(1) {
  background: #ef7d6c;
}

.window-dot:nth-child(2) {
  background: #f3c766;
}

.window-dot:nth-child(3) {
  background: #63c38b;
}

.workspace-body {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.workspace-note {
  padding: 16px;
  border: 1px solid #d8e7e4;
  border-radius: 8px;
  background: #f7fffd;
}

.workspace-note strong {
  display: block;
  margin-bottom: 6px;
  color: var(--brand-strong);
}

.workspace-note p {
  margin-bottom: 0;
  color: var(--muted);
}

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

.workspace-list a {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #1f2937;
  text-decoration: none;
}

.workspace-list a:hover {
  border-color: #b7cbc7;
  background: #fbfffe;
}

.workspace-list span:first-child {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  background: var(--soft);
  color: var(--brand);
  font-weight: 900;
}

.workspace-list strong {
  display: block;
}

.workspace-list small {
  color: var(--muted);
}

.status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.status-light {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--brand-strong);
  font-weight: 800;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #23b26d;
  box-shadow: 0 0 0 6px rgba(35, 178, 109, .14);
}

.status-list {
  display: grid;
  gap: 1px;
  background: var(--line);
}

.status-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 14px;
  padding: 14px 18px;
  background: #ffffff;
}

.status-row span:first-child {
  color: var(--muted);
  font-weight: 700;
}

.section {
  padding: 44px 0;
}

.section.soft-band {
  border-block: 1px solid var(--line);
  background: #ffffff;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.section-head p {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--muted);
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.home-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.menu-card,
.doc-card,
.note-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 32px rgba(19, 32, 52, .06);
}

.menu-card {
  display: grid;
  min-height: 218px;
  padding: 22px;
  text-decoration: none;
}

.home-grid .menu-card {
  min-height: 198px;
}

.menu-card:hover {
  border-color: #b7cbc7;
  transform: translateY(-2px);
  transition: transform .18s ease, border-color .18s ease;
}

.menu-card p {
  color: var(--muted);
}

.icon-box {
  display: grid;
  width: 46px;
  height: 46px;
  margin-bottom: 20px;
  place-items: center;
  border-radius: 8px;
  background: var(--soft);
  color: var(--brand);
}

.icon-box.gold {
  background: #fff7e8;
  color: var(--gold);
}

.icon-box.dark {
  background: #eef0f4;
  color: #202632;
}

.icon-box.coral {
  background: #fff0ed;
  color: #c54e3d;
}

.design-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .8fr);
  gap: 18px;
  align-items: stretch;
}

.summary-copy,
.summary-map {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(19, 32, 52, .06);
}

.summary-copy p {
  color: var(--muted);
}

.summary-map {
  display: grid;
  gap: 1px;
  overflow: hidden;
  padding: 0;
  background: var(--line);
}

.map-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 14px;
  padding: 16px;
  background: #ffffff;
}

.map-row strong {
  color: var(--brand-strong);
}

.map-row span {
  color: var(--muted);
}

.doc-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  padding: 34px 0 70px;
}

.sidebar {
  position: sticky;
  top: 90px;
  display: grid;
  gap: 8px;
}

.sidebar a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 8px;
  color: #344054;
  font-weight: 700;
  text-decoration: none;
}

.sidebar a:hover,
.sidebar a.active {
  background: #eaf4f2;
  color: var(--brand-strong);
}

.doc-stack {
  display: grid;
  gap: 16px;
}

.doc-card,
.note-block {
  padding: 24px;
}

.doc-card {
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
}

.doc-card p,
.note-block p,
.doc-card li,
.note-block li {
  color: #46515f;
}

.doc-card ul,
.note-block ul {
  padding-left: 20px;
}

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

.design-hero {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(18, 107, 95, .12), rgba(196, 135, 32, .08)),
    #ffffff;
  box-shadow: var(--shadow);
}

.design-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
  gap: 26px;
  align-items: center;
  padding: 34px;
}

.design-stack {
  display: grid;
  gap: 12px;
}

.snapshot-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid #dfe7e3;
  border-radius: 14px;
  background: rgba(255, 255, 255, .82);
}

.snapshot-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #475467;
  font-size: 14px;
}

.snapshot-row span {
  color: #556070;
  font-weight: 700;
}

.snapshot-row strong {
  color: #0f172a;
}

.principle-tags,
.source-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.principle-tag,
.source-tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.principle-tag {
  border: 1px solid #cfe3df;
  background: #f7fffd;
  color: var(--brand-strong);
}

.source-tag {
  border: 1px solid #ead9b9;
  background: #fff9ee;
  color: #7a4f0f;
}

.style-score {
  display: grid;
  gap: 10px;
}

.score-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  align-items: center;
}

.score-label {
  color: #344054;
  font-weight: 800;
}

.score-track {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: #e7ebf1;
}

.score-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--gold));
}

.source-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.source-card {
  display: grid;
  align-content: start;
  min-height: 260px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
  box-shadow: var(--shadow-soft);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.source-card:hover {
  transform: translateY(-3px);
  border-color: #bfd7d1;
  box-shadow: 0 16px 38px rgba(19, 32, 52, .12);
}

.source-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), #1d7e6e);
  color: #ffffff;
  font-weight: 800;
}

.source-card p {
  color: var(--muted);
}

.source-card a {
  color: var(--brand-strong);
  font-weight: 800;
  text-decoration: none;
}

.direction-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.direction-row {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.direction-row:last-child {
  border-bottom: 0;
}

.direction-row strong {
  color: #1f2937;
}

.direction-row p {
  margin-bottom: 0;
  color: var(--muted);
}

.article-card {
  background:
    linear-gradient(135deg, rgba(18, 107, 95, .04), rgba(196, 135, 32, .04)),
    #ffffff;
}

.article-header {
  margin-bottom: 20px;
}

.article-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(250px, .75fr);
  gap: 20px;
  align-items: start;
}

.article-copy p,
.article-copy li,
.article-sidebar p {
  color: #46515f;
}

.article-section {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e7ebf1;
}

.article-sidebar {
  display: grid;
}

.color-panel {
  padding: 18px;
  border: 1px solid #dfe4ec;
  border-radius: 12px;
  background: linear-gradient(180deg, #f9fbfd 0%, #f7f8fb 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}

.color-panel h3 {
  margin-bottom: 12px;
  font-size: 18px;
}

.palette-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.swatch {
  display: flex;
  align-items: end;
  justify-content: center;
  min-height: 92px;
  padding: 10px;
  border-radius: 10px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .2);
}

.swatch span {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
}

.swatch-navy {
  background: linear-gradient(135deg, #173a63, #0c2340);
}

.swatch-purple {
  background: linear-gradient(135deg, #5a2e72, #341947);
}

.swatch-gold {
  background: linear-gradient(135deg, #d8a94d, #9c6c12);
}

.section-heading {
  margin-bottom: 16px;
}

.insight-card {
  background: linear-gradient(135deg, rgba(18, 107, 95, .04), rgba(196, 135, 32, .03)), #ffffff;
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.insight-item {
  padding: 16px;
  border: 1px solid #e4e9ef;
  border-radius: 14px;
  background: rgba(255, 255, 255, .9);
}

.insight-item h3 {
  margin-bottom: 8px;
  color: var(--brand-strong);
}

.insight-item p {
  margin-bottom: 0;
  color: #5a6472;
}

.quote-card {
  padding: 24px;
  border: 1px solid #d8e7e4;
  border-radius: 14px;
  background: linear-gradient(135deg, #f7fffd 0%, #f9fcfb 100%);
  box-shadow: var(--shadow-soft);
}

.quote-card strong {
  color: var(--brand-strong);
}

.code-list {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
}

code {
  padding: 2px 6px;
  border-radius: 6px;
  background: #eef1f5;
  color: #111827;
  font-family: Consolas, "Courier New", monospace;
  font-size: .94em;
}

pre {
  overflow-x: auto;
  margin: 12px 0 0;
  padding: 14px;
  border-radius: 8px;
  background: #101418;
  color: #eef7f5;
  font-size: 14px;
  line-height: 1.55;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 24px 0 34px;
  color: var(--muted);
  font-size: 14px;
}

svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

@media (max-width: 860px) {
  .topbar-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
  }

  .nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hero {
    padding-top: 42px;
  }

  h1 {
    font-size: 48px;
  }

  h2 {
    font-size: 32px;
  }

  .hero-grid,
  .doc-layout {
    grid-template-columns: 1fr;
  }

  .status-panel {
    display: none;
  }

  .menu-grid,
  .note-grid,
  .source-grid,
  .home-grid,
  .design-summary,
  .insight-grid {
    grid-template-columns: 1fr;
  }

  .design-hero-inner {
    grid-template-columns: 1fr;
  }

  .article-grid {
    grid-template-columns: 1fr;
  }

  .palette-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .site-shell {
    width: min(100% - 22px, 1120px);
  }

  .hero-actions,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .button,
  .icon-link {
    width: 100%;
  }

  h1 {
    font-size: 36px;
  }

  h2 {
    font-size: 28px;
  }

  .status-row {
    grid-template-columns: 1fr;
  }

  .direction-row,
  .score-row,
  .map-row {
    grid-template-columns: 1fr;
  }

  .sidebar {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Rachadej.com homepage renovation — 2026-07-27
   Scoped to .home-page so the existing Admin documentation screens keep
   their established layout and components.
   ========================================================================== */

.home-page {
  --home-ink: #13201e;
  --home-muted: #64706e;
  --home-green: #0d4f47;
  --home-green-deep: #073b35;
  --home-green-soft: #e9f4f1;
  --home-coral: #e9785f;
  --home-amber: #e4a33d;
  --home-paper: #fbfaf6;
  --home-line: rgba(19, 32, 30, .12);
  --home-radius: 22px;
  font-family: "Noto Sans Thai", Inter, "Segoe UI", sans-serif;
  background: var(--home-paper);
  color: var(--home-ink);
}

.home-page::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background-image:
    linear-gradient(rgba(13, 79, 71, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(13, 79, 71, .025) 1px, transparent 1px);
  background-size: 36px 36px;
  content: "";
  pointer-events: none;
}

.home-page .site-shell {
  width: min(1180px, calc(100% - 48px));
}

.home-skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--home-green-deep);
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform .2s ease;
}

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

.home-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid rgba(19, 32, 30, .08);
  background: rgba(251, 250, 246, .88);
  backdrop-filter: blur(18px);
}

.home-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 82px;
}

.home-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--home-ink);
  text-decoration: none;
}

.home-page .brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(12, 45, 40, .10);
}

.home-page .brand-mark img {
  width: 44px;
  height: 44px;
}

.home-brand-copy {
  display: grid;
  line-height: 1.2;
}

.home-brand-copy strong {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -.02em;
}

.home-brand-copy small {
  margin-top: 4px;
  color: var(--home-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
}

.home-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.home-nav > a,
.home-auth .ra-login,
.home-auth .ra-user,
.home-auth .ra-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 13px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #34413f;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.home-nav > a:hover,
.home-auth .ra-login:hover,
.home-auth .ra-logout:hover {
  background: #eef2ef;
  color: var(--home-green);
}

.home-auth {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 4px;
  padding-left: 8px;
  border-left: 1px solid var(--home-line);
}

.home-auth .ra-auth-form {
  display: inline-flex;
  margin: 0;
}

.home-auth .ra-login {
  background: var(--home-green);
  color: #ffffff;
}

.home-auth .ra-login:hover {
  background: var(--home-green-deep);
  color: #ffffff;
}

.home-auth .ra-user {
  color: var(--home-green);
}

.home-auth .ra-logout {
  cursor: pointer;
}

.home-hero-v2 {
  position: relative;
  overflow: hidden;
  padding: 88px 0 96px;
}

.home-hero-v2::after {
  position: absolute;
  z-index: -1;
  top: -240px;
  right: -180px;
  width: 620px;
  height: 620px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(13, 79, 71, .12) 0%, rgba(13, 79, 71, 0) 68%);
  content: "";
}

.home-hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(400px, .92fr);
  gap: 72px;
  align-items: center;
}

.home-eyebrow,
.home-section-index {
  color: var(--home-green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.home-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 24px;
  padding: 7px 12px;
  border: 1px solid rgba(13, 79, 71, .14);
  border-radius: 999px;
  background: rgba(255, 255, 255, .64);
  letter-spacing: .04em;
  text-transform: none;
}

.home-eyebrow > span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2ea271;
  box-shadow: 0 0 0 5px rgba(46, 162, 113, .12);
}

.home-hero-copy h1 {
  max-width: 700px;
  margin-bottom: 24px;
  font-size: clamp(48px, 5.2vw, 72px);
  line-height: 1.08;
  letter-spacing: -.055em;
}

.home-hero-copy h1 span {
  color: var(--home-green);
}

.home-hero-lead {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--home-muted);
  font-size: 19px;
  line-height: 1.75;
}

.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.home-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 50px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 13px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  transition: transform .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.home-button svg {
  width: 18px;
  height: 18px;
}

.home-button:hover {
  transform: translateY(-2px);
}

.home-button-primary {
  background: var(--home-green);
  color: #ffffff;
  box-shadow: 0 16px 32px rgba(13, 79, 71, .20);
}

.home-button-primary:hover {
  background: var(--home-green-deep);
}

.home-button-quiet {
  border-color: var(--home-line);
  background: rgba(255, 255, 255, .68);
  color: var(--home-ink);
}

.home-button-quiet:hover {
  border-color: rgba(13, 79, 71, .28);
  background: #ffffff;
}

.home-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin: 36px 0 0;
  padding: 25px 0 0;
  border-top: 1px solid var(--home-line);
  list-style: none;
}

.home-hero-meta li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #45514f;
  font-size: 13px;
  font-weight: 700;
}

.home-hero-meta span {
  color: #98a19f;
  font-size: 10px;
  letter-spacing: .08em;
}

.home-focus-board {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid rgba(13, 79, 71, .13);
  border-radius: 28px;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 30px 80px rgba(17, 45, 40, .13);
  backdrop-filter: blur(14px);
}

.home-focus-board::before {
  position: absolute;
  z-index: -1;
  inset: 22px -22px -22px 22px;
  border: 1px solid rgba(13, 79, 71, .08);
  border-radius: inherit;
  background: rgba(233, 244, 241, .65);
  content: "";
}

.home-board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 2px 2px 8px;
}

.home-board-head > div {
  display: grid;
  gap: 3px;
}

.home-board-label {
  color: var(--home-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.home-board-head strong {
  font-size: 16px;
}

.home-board-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--home-green-soft);
  color: var(--home-green);
  font-size: 11px;
  font-weight: 800;
}

.home-board-status span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2ea271;
}

.home-feature-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 144px;
  padding: 20px;
  border-radius: 20px;
  text-decoration: none;
}

.home-feature-game {
  background:
    radial-gradient(circle at 90% 15%, rgba(255, 255, 255, .17), transparent 24%),
    linear-gradient(135deg, var(--home-green-deep), #12685c);
  color: #ffffff;
  box-shadow: 0 16px 32px rgba(13, 79, 71, .22);
}

.home-feature-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 16px;
  background: rgba(255, 255, 255, .12);
}

.home-feature-icon svg {
  width: 26px;
  height: 26px;
}

.home-feature-copy {
  display: grid;
}

.home-feature-copy small {
  margin-bottom: 3px;
  color: rgba(255, 255, 255, .64);
  font-size: 11px;
  font-weight: 700;
}

.home-feature-copy strong {
  font-size: 23px;
  letter-spacing: -.02em;
}

.home-feature-copy > span {
  margin-top: 3px;
  color: rgba(255, 255, 255, .72);
  font-size: 13px;
}

.home-feature-arrow {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  font-size: 17px;
}

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

.home-mini-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--home-line);
  border-radius: 16px;
  background: #ffffff;
  color: var(--home-ink);
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease;
}

.home-mini-card:hover {
  border-color: rgba(13, 79, 71, .28);
  transform: translateY(-2px);
}

.home-mini-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  background: var(--home-green-soft);
  color: var(--home-green);
  font-size: 13px;
  font-weight: 900;
}

.home-mini-icon.coral {
  background: #fff0ec;
  color: #bb543f;
}

.home-mini-icon.amber {
  background: #fff6e5;
  color: #9d6717;
}

.home-mini-card > span:nth-child(2) {
  display: grid;
  min-width: 0;
}

.home-mini-card strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-mini-card small {
  overflow: hidden;
  margin-top: 2px;
  color: var(--home-muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-mini-card > span:last-child {
  color: #929b99;
}

.home-board-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 0 0;
  color: #7c8785;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.home-board-foot i {
  width: 18px;
  height: 1px;
  background: #cdd4d2;
}

.home-spaces {
  padding: 96px 0 104px;
  border-block: 1px solid var(--home-line);
  background: #ffffff;
}

.home-section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, .65fr);
  gap: 40px;
  align-items: end;
  margin-bottom: 38px;
}

.home-section-head h2,
.home-method-copy h2,
.home-cta-card h2 {
  margin: 12px 0 0;
  color: var(--home-ink);
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.18;
  letter-spacing: -.04em;
}

.home-section-head p {
  margin-bottom: 4px;
  color: var(--home-muted);
  line-height: 1.75;
}

.home-space-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--home-line);
  border-left: 1px solid var(--home-line);
}

.home-space-card {
  position: relative;
  display: flex;
  min-height: 390px;
  flex-direction: column;
  padding: 28px;
  border-right: 1px solid var(--home-line);
  border-bottom: 1px solid var(--home-line);
  background: #ffffff;
  color: var(--home-ink);
  text-decoration: none;
  transition: background-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.home-space-card:hover {
  z-index: 1;
  background: #f7faf8;
  box-shadow: 0 22px 44px rgba(17, 45, 40, .09);
  transform: translateY(-5px);
}

.home-space-card-featured {
  background: #f1f7f5;
}

.home-card-number {
  align-self: flex-end;
  color: #a4aca9;
  font-family: Inter, sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
}

.home-space-icon {
  display: grid;
  width: 52px;
  height: 52px;
  margin: 30px 0 26px;
  place-items: center;
  border-radius: 15px;
  background: var(--home-green);
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(13, 79, 71, .16);
}

.home-space-icon svg {
  width: 24px;
  height: 24px;
}

.home-space-icon-coral {
  background: #fff0ec;
  color: #b84f3b;
  box-shadow: none;
}

.home-space-icon-amber {
  background: #fff5df;
  color: #9d6717;
  box-shadow: none;
}

.home-space-icon-slate {
  background: #edf0f2;
  color: #394643;
  box-shadow: none;
}

.home-card-copy {
  display: grid;
}

.home-card-copy small {
  margin-bottom: 6px;
  color: var(--home-green);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.home-card-copy strong {
  font-size: 22px;
  letter-spacing: -.025em;
}

.home-card-copy > span {
  margin-top: 12px;
  color: var(--home-muted);
  font-size: 14px;
  line-height: 1.75;
}

.home-card-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 24px;
  color: var(--home-green);
  font-size: 13px;
  font-weight: 800;
}

.home-card-link span {
  font-size: 16px;
}

.home-method {
  padding: 112px 0;
  background: var(--home-paper);
}

.home-method-layout {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(420px, 1.1fr);
  gap: 96px;
  align-items: start;
}

.home-method-copy {
  position: sticky;
  top: 120px;
}

.home-method-copy h2 {
  margin-bottom: 24px;
}

.home-method-copy p {
  max-width: 520px;
  color: var(--home-muted);
  font-size: 17px;
  line-height: 1.85;
}

.home-text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  color: var(--home-green);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.home-text-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.home-method-list {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--home-line);
  list-style: none;
}

.home-method-list li {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 20px;
  padding: 30px 0;
  border-bottom: 1px solid var(--home-line);
}

.home-method-list li > span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: #ffffff;
  color: var(--home-green);
  font-family: Inter, sans-serif;
  font-size: 10px;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(17, 45, 40, .08);
}

.home-method-list strong {
  display: block;
  margin-bottom: 8px;
  color: var(--home-ink);
  font-size: 21px;
  letter-spacing: -.02em;
}

.home-method-list p {
  margin-bottom: 0;
  color: var(--home-muted);
  line-height: 1.8;
}

.home-cta {
  padding: 0 0 96px;
  background: var(--home-paper);
}

.home-cta-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 56px;
  align-items: end;
  padding: 56px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 88% 5%, rgba(255, 255, 255, .12), transparent 28%),
    linear-gradient(135deg, var(--home-green-deep), #0f5d52);
  color: #ffffff;
  box-shadow: 0 30px 70px rgba(13, 79, 71, .19);
}

.home-cta-card::after {
  position: absolute;
  right: -85px;
  bottom: -150px;
  width: 320px;
  height: 320px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 50%;
  content: "";
}

.home-cta-card .home-section-index {
  color: rgba(255, 255, 255, .58);
}

.home-cta-card h2 {
  color: #ffffff;
  font-size: clamp(34px, 4vw, 48px);
}

.home-cta-card p {
  max-width: 600px;
  margin: 14px 0 0;
  color: rgba(255, 255, 255, .68);
}

.home-cta-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.home-button-light {
  background: #ffffff;
  color: var(--home-green-deep);
}

.home-button-outline {
  border-color: rgba(255, 255, 255, .26);
  background: rgba(255, 255, 255, .06);
  color: #ffffff;
}

.home-button-outline:hover {
  background: rgba(255, 255, 255, .12);
}

.home-footer {
  padding: 52px 0 42px;
  border-top: 1px solid var(--home-line);
  background: #f5f4ef;
}

.home-footer-inner {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 48px;
  align-items: center;
}

.home-footer-brand {
  color: var(--home-ink);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -.02em;
  text-decoration: none;
}

.home-footer p {
  margin: 5px 0 0;
  color: var(--home-muted);
  font-size: 13px;
}

.home-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.home-footer nav a {
  color: #46514f;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.home-footer nav a:hover {
  color: var(--home-green);
}

.home-footer small {
  color: #7f8886;
  font-size: 11px;
  white-space: nowrap;
}

.home-page a:focus-visible,
.home-page button:focus-visible {
  outline: 3px solid rgba(228, 163, 61, .75);
  outline-offset: 3px;
}

@media (max-width: 1040px) {
  .home-hero-layout {
    grid-template-columns: minmax(0, 1fr) minmax(360px, .85fr);
    gap: 44px;
  }

  .home-space-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-method-layout {
    gap: 56px;
  }

  .home-cta-card {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .home-cta-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 820px) {
  .home-page .site-shell {
    width: min(100% - 32px, 1180px);
  }

  .home-header-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 14px 0;
  }

  .home-nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .home-nav::-webkit-scrollbar {
    display: none;
  }

  .home-nav > a,
  .home-auth .ra-login,
  .home-auth .ra-user,
  .home-auth .ra-logout {
    min-height: 38px;
    padding: 8px 11px;
    font-size: 13px;
  }

  .home-hero-v2 {
    padding: 64px 0 76px;
  }

  .home-hero-layout,
  .home-section-head,
  .home-method-layout {
    grid-template-columns: 1fr;
  }

  .home-hero-layout {
    gap: 52px;
  }

  .home-section-head {
    gap: 16px;
  }

  .home-method-copy {
    position: static;
  }

  .home-method-layout {
    gap: 48px;
  }

  .home-footer-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 560px) {
  .home-page .site-shell {
    width: min(100% - 24px, 1180px);
  }

  .home-brand-copy small {
    display: none;
  }

  .home-auth {
    margin-left: 0;
    padding-left: 4px;
  }

  .home-hero-v2 {
    padding: 50px 0 64px;
  }

  .home-hero-copy h1 {
    font-size: clamp(40px, 12vw, 54px);
    letter-spacing: -.045em;
  }

  .home-hero-lead {
    font-size: 16px;
  }

  .home-hero-actions,
  .home-cta-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .home-button {
    width: 100%;
  }

  .home-hero-meta {
    gap: 12px 18px;
  }

  .home-focus-board {
    padding: 15px;
    border-radius: 22px;
  }

  .home-focus-board::before {
    display: none;
  }

  .home-feature-card {
    grid-template-columns: 46px minmax(0, 1fr);
    padding: 16px;
  }

  .home-feature-icon {
    width: 46px;
    height: 46px;
  }

  .home-feature-copy strong {
    font-size: 20px;
  }

  .home-feature-copy > span,
  .home-feature-arrow {
    display: none;
  }

  .home-board-grid {
    grid-template-columns: 1fr;
  }

  .home-spaces {
    padding: 72px 0 76px;
  }

  .home-section-head {
    margin-bottom: 28px;
  }

  .home-space-grid {
    grid-template-columns: 1fr;
  }

  .home-space-card {
    min-height: 330px;
    padding: 24px;
  }

  .home-space-icon {
    margin: 20px 0;
  }

  .home-method {
    padding: 76px 0;
  }

  .home-method-list li {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 14px;
  }

  .home-cta {
    padding-bottom: 68px;
  }

  .home-cta-card {
    gap: 36px;
    padding: 32px 24px;
    border-radius: 22px;
  }

  .home-footer nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 360px) {
  .home-nav {
    gap: 0;
  }

  .home-nav > a,
  .home-auth .ra-login,
  .home-auth .ra-user,
  .home-auth .ra-logout {
    padding: 7px;
    font-size: 12px;
  }

  .home-auth {
    padding-left: 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-page *,
  .home-page *::before,
  .home-page *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

/* ==========================================================================
   Homepage V3 Premium Design & Complete Directory System
   ========================================================================== */
.home-page-v3 {
  background: #0f172a;
  color: #f8fafc;
  font-family: "Sarabun", "Noto Sans Thai", Inter, sans-serif;
  line-height: 1.6;
}

.home-header-v3 {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.home-header-inner-v3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 16px;
}

.home-brand-v3 {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
  flex-shrink: 0;
}

.brand-mark-v3 img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.2s ease;
}

.brand-mark-v3 .logo-light {
  display: none !important;
}

.brand-mark-v3 .logo-dark {
  display: block !important;
}

[data-theme="light"] .brand-mark-v3 .logo-dark {
  display: none !important;
}

[data-theme="light"] .brand-mark-v3 .logo-light {
  display: block !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

.home-brand-copy-v3 {
  white-space: nowrap;
}

.home-brand-copy-v3 strong {
  display: block;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.home-brand-copy-v3 small {
  display: block;
  font-size: 0.75rem;
  color: #94a3b8;
}

.home-nav-v3 {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.home-nav-v3 a {
  text-decoration: none;
  color: #cbd5e1;
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.home-nav-v3 a:hover {
  color: #38bdf8;
}

.home-fb-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #1877f2 0%, #0666e5 100%);
  border: 1px solid rgba(24, 119, 242, 0.5);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none !important;
  box-shadow: 0 4px 14px rgba(24, 119, 242, 0.35);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.home-fb-link svg {
  fill: #ffffff;
  transition: transform 0.2s ease;
}

.home-fb-link:hover {
  background: linear-gradient(135deg, #0666e5 0%, #0452bc 100%);
  border-color: #1877f2;
  box-shadow: 0 6px 20px rgba(24, 119, 242, 0.55);
  transform: translateY(-2px) scale(1.02);
}

.home-fb-link:hover svg {
  transform: scale(1.1);
}

.connect-box-v3 {
  margin-top: 28px;
}

/* ==========================================================================
   Multi-Theme System (Saturday Auspicious / Cyber Dark / Warm Light)
   ========================================================================== */

/*
 * ตัวแปรของทุกธีมประกาศที่ :root ระดับเดียวโดยตั้งใจ
 *
 * layouts/site.php ใส่ data-theme ไว้ทั้งบน <html> และ <body> ส่วน theme-toggle.js
 * ถูกโหลดใน <head> จึงตั้งค่าให้ <html> ได้ก่อน แล้วค่อยตามไปตั้งที่ <body> ทีหลัง
 * ถ้าตัวเลือกยังเป็น [data-theme="..."] แบบไม่ระบุ element ตัวแปรจะถูกตั้งซ้ำที่ body
 * ด้วยธีมที่ PHP render มา แล้วทับค่าของ <html> ทำให้พื้นหลังหลัก (.home-page-v3 คือ
 * body เอง) ค้างเป็นธีมเดิมไม่ว่าจะแก้ตัวแปรอย่างไร
 */

/* 1. ธีมแสดงเริ่มต้น: วันเสาร์ (มงคล) - Saturday Auspicious Theme */
:root[data-theme="saturday"] {
  --bg-main: #0f172a;
  --bg-card: rgba(30, 41, 59, 0.6);
  --bg-section: #090d16;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-kicker: #38bdf8;
  --accent-sky: #38bdf8;
  --accent-purple: #c084fc;
  --btn-primary: linear-gradient(135deg, #0284c7 0%, #7e22ce 100%);
  --header-bg: rgba(15, 23, 42, 0.92);
}

/* 2. ธีม Cyber Dark */
:root[data-theme="cyber"] {
  --bg-main: #050b14;
  --bg-card: rgba(15, 23, 42, 0.8);
  --bg-section: #020617;
  --text-main: #f1f5f9;
  --text-muted: #64748b;
  --text-kicker: #06b6d4;
  --accent-sky: #06b6d4;
  --accent-purple: #818cf8;
  --btn-primary: linear-gradient(135deg, #0891b2 0%, #4f46e5 100%);
  --header-bg: rgba(5, 11, 20, 0.92);
}

/* 3. ธีม Warm Light (ปรับปรุงความคมชัดของ Header และตัวอักษร) */
:root[data-theme="light"] {
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-section: #f1f5f9;
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-kicker: #0284c7;
  --accent-sky: #0284c7;
  --accent-purple: #7e22ce;
  --btn-primary: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  --header-bg: rgba(255, 255, 255, 0.98);
  --header-border: #e2e8f0;
  --nav-link-color: #334155;
  --nav-link-hover: #0284c7;
  --item-bg: #f8fafc;
  --item-border: #e2e8f0;
  --footer-bg: #e2e8f0;
}

/* 4. ธีม Luxury Soft Lavender — ชุดสีเต็มอยู่ท้ายไฟล์ */


/* Apply CSS Variables to Layout */
.home-page-v3 {
  background: var(--bg-main) !important;
  color: var(--text-main) !important;
}

.home-header-v3 {
  background: var(--header-bg) !important;
  border-bottom: 1px solid var(--header-border, rgba(255, 255, 255, 0.08)) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.home-nav-v3 a {
  color: var(--nav-link-color, #cbd5e1) !important;
}

.home-nav-v3 a:hover {
  color: var(--nav-link-hover, #38bdf8) !important;
}

.home-directory-v3 {
  background: var(--bg-section) !important;
}

.directory-card-v3,
.home-hero-card-v3,
.pillar-card-v3 {
  background: var(--bg-card) !important;
  border-color: var(--item-border, rgba(255, 255, 255, 0.08)) !important;
}

/* Global Airbnb Discovery Filter Pills */
.filter-pill-v3 {
  appearance: none !important;
  -webkit-appearance: none !important;
  min-height: 40px !important;
  padding: 0.5rem 1.25rem !important;
  border-radius: 999px !important;
  background: rgba(15, 23, 42, 0.75) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  color: #cbd5e1 !important;
  font-size: 0.88rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  backdrop-filter: blur(12px) !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

.filter-pill-v3:hover {
  background: rgba(124, 58, 237, 0.25) !important;
  border-color: rgba(168, 85, 247, 0.55) !important;
  color: #ffffff !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.3) !important;
}

.filter-pill-v3.active {
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%) !important;
  border-color: transparent !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.45) !important;
}

.home-hero-copy-v3 h1,
.section-title-v3 h2,
.philosophy-copy-v3 h2,
.directory-card-v3 h3,
.home-brand-copy-v3 strong,
.spotlight-info-v3 strong,
.spotlight-subitem-v3 strong {
  color: var(--text-main) !important;
}

.home-hero-lead-v3,
.section-title-v3 p,
.philosophy-copy-v3 p,
.directory-card-v3 p,
.pillar-card-v3 p,
.home-brand-copy-v3 small,
.spotlight-info-v3 span,
.spotlight-subitem-v3 small {
  color: var(--text-muted) !important;
}

.section-kicker-v3,
.home-badge-v3,
.stat-num-v3,
.pillar-num-v3 {
  color: var(--text-kicker) !important;
}

/* Light Theme Specific Enhancements */
[data-theme="light"] .spotlight-item-v3,
[data-theme="light"] .spotlight-subitem-v3,
[data-theme="light"] .directory-links-v3 a {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  color: #1e293b !important;
}

[data-theme="light"] .spotlight-item-v3:hover,
[data-theme="light"] .spotlight-subitem-v3:hover,
[data-theme="light"] .directory-links-v3 a:hover {
  background: #f1f5f9 !important;
  border-color: #0284c7 !important;
  color: #0284c7 !important;
}

[data-theme="light"] .theme-switcher-toggle {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}

[data-theme="light"] .theme-dropdown-menu {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

[data-theme="light"] .theme-select-btn {
  color: #334155 !important;
}

[data-theme="light"] .theme-select-btn:hover,
[data-theme="light"] .theme-select-btn.active {
  background: #e0f2fe !important;
  color: #0284c7 !important;
}

[data-theme="light"] .home-footer-v3 {
  background: #f1f5f9 !important;
  border-top: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .footer-brand-v3 strong,
[data-theme="light"] .footer-links-v3 a {
  color: #1e293b !important;
}

[data-theme="light"] .home-philosophy-v3 {
  background: #f1f5f9 !important;
  border-top: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .philosophy-copy-v3 h2,
[data-theme="light"] .pillar-card-v3 h4 {
  color: #0f172a !important;
}

[data-theme="light"] .philosophy-copy-v3 p,
[data-theme="light"] .pillar-card-v3 p {
  color: #475569 !important;
}

[data-theme="light"] .pillar-card-v3 {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .pillar-num-v3 {
  background: #e0f2fe !important;
  color: #0284c7 !important;
}

/* Lavender Theme Specific Overrides (Warm Light Base + Purple Accents) */
[data-theme="lavender"] .primary-btn-v3 {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 10px 25px rgba(124, 58, 237, 0.35) !important;
}

[data-theme="lavender"] .primary-btn-v3:hover {
  background: linear-gradient(135deg, #6d28d9 0%, #5b21b6 100%) !important;
  box-shadow: 0 14px 30px rgba(124, 58, 237, 0.45) !important;
}

[data-theme="lavender"] .status-dot-v3 {
  background: #a855f7 !important;
  box-shadow: 0 0 10px #a855f7 !important;
}

[data-theme="lavender"] .card-tag-v3 {
  background: rgba(168, 85, 247, 0.15) !important;
  color: #7c3aed !important;
}

[data-theme="lavender"] .glow-teal {
  background: rgba(168, 85, 247, 0.12) !important;
  color: #7c3aed !important;
}

[data-theme="lavender"] .spotlight-info-v3 small {
  color: #7c3aed !important;
}

[data-theme="lavender"] .highlight-text-v3 {
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

[data-theme="lavender"] .spotlight-item-v3:hover,
[data-theme="lavender"] .spotlight-subitem-v3:hover,
[data-theme="lavender"] .directory-links-v3 a:hover {
  background: #f1f5f9 !important;
  border-color: #7c3aed !important;
  color: #7c3aed !important;
}

[data-theme="lavender"] .filter-pill-v3.active {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%) !important;
  border-color: transparent !important;
  color: #ffffff !important;
}

[data-theme="lavender"] .filter-pill-v3:hover {
  border-color: #7c3aed !important;
  color: #7c3aed !important;
}

[data-theme="lavender"] .pillar-num-v3 {
  background: #f3e8ff !important;
  color: #7c3aed !important;
}

[data-theme="lavender"] .theme-select-btn:hover,
[data-theme="lavender"] .theme-select-btn.active {
  background: #f3e8ff !important;
  color: #7c3aed !important;
}

body[data-theme="lavender"] .ra-user-profile-chip {
  background: #ede9fe !important;
  border-color: #c084fc !important;
}

body[data-theme="lavender"] .ra-user-name {
  color: #240046 !important;
}

/* Theme Switcher Component UI */
.theme-switcher-wrapper {
  position: relative;
  display: inline-block;
}

.theme-switcher-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.theme-switcher-toggle:hover {
  background: rgba(255, 255, 255, 0.15);
}

.theme-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 200px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  display: none;
  flex-direction: column;
  gap: 4px;
  z-index: 200;
}

.theme-switcher-wrapper:hover .theme-dropdown-menu,
.theme-switcher-wrapper:focus-within .theme-dropdown-menu {
  display: flex;
}

.theme-select-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #cbd5e1;
  font-size: 0.85rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
}

.theme-select-btn:hover,
.theme-select-btn.active {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
}

.theme-select-btn small {
  display: block;
  font-size: 0.7rem;
  color: #64748b;
  margin-left: auto;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.saturday-dot { background: linear-gradient(135deg, #a855f7, #38bdf8); }
.cyber-dot { background: linear-gradient(135deg, #06b6d4, #6366f1); }
.light-dot { background: linear-gradient(135deg, #0284c7, #f8fafc); }

.home-btn-sm {
  padding: 6px 14px;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8 !important;
  border: 1px solid rgba(56, 189, 248, 0.3);
  font-weight: 600;
}

/* Hero Section */
.home-hero-v3 {
  padding: 80px 0 60px;
  background: radial-gradient(circle at 10% 20%, rgba(14, 165, 233, 0.15), transparent 45%),
              radial-gradient(circle at 90% 80%, rgba(20, 184, 166, 0.12), transparent 45%);
}

.home-hero-layout-v3 {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: center;
}

.home-badge-v3 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.85rem;
  color: #38bdf8;
  margin-bottom: 24px;
}

.status-dot-v3 {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
}

.home-hero-copy-v3 h1 {
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin: 0 0 20px;
  color: #f8fafc;
}

.highlight-text-v3 {
  background: linear-gradient(135deg, #38bdf8 0%, #2dd4bf 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.home-hero-lead-v3 {
  font-size: 1.15rem;
  color: #94a3b8;
  max-width: 580px;
  margin-bottom: 32px;
}

.home-hero-actions-v3 {
  display: flex;
  gap: 16px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.home-btn-v3 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.25s ease;
}

.primary-btn-v3 {
  background: linear-gradient(135deg, #0284c7 0%, #0d9488 100%);
  color: #ffffff;
  box-shadow: 0 10px 25px rgba(2, 132, 199, 0.3);
}

.primary-btn-v3:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px rgba(2, 132, 199, 0.4);
}

.secondary-btn-v3 {
  background: rgba(255, 255, 255, 0.06);
  color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.secondary-btn-v3:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.home-hero-stats-v3 {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-num-v3 {
  font-size: 1.4rem;
  font-weight: 800;
  color: #38bdf8;
}

.stat-label-v3 {
  font-size: 0.85rem;
  color: #64748b;
}

.stat-divider-v3 {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
}

/* Hero Spotlight Card */
.home-hero-card-v3 {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 28px;
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.card-header-v3 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.card-title-v3 {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
}

.card-tag-v3 {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  font-weight: 600;
}

.spotlight-item-v3 {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
  margin-bottom: 16px;
}

.spotlight-item-v3:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(56, 189, 248, 0.4);
}

.glow-teal {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.2), rgba(6, 182, 212, 0.2));
  color: #2dd4bf;
  padding: 12px;
  border-radius: 12px;
}

.spotlight-info-v3 small {
  display: block;
  font-size: 0.75rem;
  color: #38bdf8;

}

.spotlight-info-v3 strong {
  display: block;
  font-size: 1.05rem;
  color: #f8fafc;
}

.spotlight-info-v3 span {
  font-size: 0.8rem;
  color: #94a3b8;
}

.spotlight-arrow-v3 {
  margin-left: auto;
  font-size: 1.2rem;
  color: #64748b;
}

.spotlight-grid-v3 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.spotlight-subitem-v3 {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  text-decoration: none;
  color: inherit;

}

.spotlight-subitem-v3 strong {
  display: block;
  font-size: 0.9rem;
  color: #e2e8f0;
}

.spotlight-subitem-v3 small {
  font-size: 0.75rem;
  color: #64748b;
}

.card-footer-v3 {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: #64748b;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.status-online-v3 {
  color: #10b981;
}

/* Directory Section */
.home-directory-v3 {
  padding: 80px 0;
  background: #090d16;
}

.section-title-v3 {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 56px;
}

.section-kicker-v3 {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #38bdf8;
  text-transform: uppercase;
}

.section-title-v3 h2 {
  font-size: 2.2rem;
  font-weight: 800;
  color: #f8fafc;
  margin: 8px 0 16px;
}

.section-title-v3 p {
  color: #94a3b8;
  font-size: 1.05rem;
}

.directory-grid-v3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.directory-card-v3 {
  position: relative;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 32px 24px;
  transition: all 0.25s ease;
}

.directory-card-v3:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.3);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.card-badge-v3 {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 12px;
}

.bg-purple { background: rgba(168, 85, 247, 0.15); color: #c084fc; }
.bg-teal { background: rgba(20, 184, 166, 0.15); color: #2dd4bf; }
.bg-amber { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.bg-blue { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }

.card-icon-wrapper-v3 {
  display: inline-flex;
  padding: 14px;
  border-radius: 12px;
  margin-bottom: 20px;
}

.purple { background: rgba(168, 85, 247, 0.1); color: #c084fc; }
.teal { background: rgba(20, 184, 166, 0.1); color: #2dd4bf; }
.amber { background: rgba(245, 158, 11, 0.1); color: #fbbf24; }
.blue { background: rgba(59, 130, 246, 0.1); color: #60a5fa; }

.directory-card-v3 h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #f8fafc;
  margin: 0 0 8px;
}

.directory-card-v3 p {
  font-size: 0.9rem;
  color: #94a3b8;
  margin-bottom: 24px;
  min-height: 44px;
}

.directory-links-v3 {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.directory-links-v3 a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  text-decoration: none;
  color: #cbd5e1;
  font-size: 0.88rem;
  transition: all 0.2s;
}

.directory-links-v3 a:hover {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
}

.directory-links-v3 strong {
  font-weight: 600;
}

/* Philosophy Section */
.home-philosophy-v3 {
  padding: 80px 0;
  background: #0f172a;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.philosophy-layout-v3 {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  align-items: center;
}

.philosophy-copy-v3 h2 {
  font-size: 2rem;
  font-weight: 800;
  color: #f8fafc;
  margin: 12px 0 20px;
}

.philosophy-copy-v3 p {
  color: #94a3b8;
  font-size: 1.05rem;
  line-height: 1.7;
}

.philosophy-pillars-v3 {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pillar-card-v3 {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 20px;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.pillar-num-v3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: #38bdf8;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.1);
}

.pillar-card-v3 h4 {
  margin: 0 0 6px;
  font-size: 1.1rem;
  color: #f1f5f9;
}

.pillar-card-v3 p {
  margin: 0;
  font-size: 0.9rem;
  color: #94a3b8;
}

/* Footer */
.home-footer-v3 {
  padding: 48px 0;
  background: #060911;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.home-footer-inner-v3 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-brand-v3 strong {
  font-size: 1.2rem;
  color: #fff;
}

.footer-brand-v3 p {
  font-size: 0.85rem;
  color: #64748b;
  margin: 4px 0 0;
}

.footer-links-v3 {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links-v3 a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.9rem;

}

.footer-links-v3 a:hover {
  color: #38bdf8;
}

.footer-copy-v3 small {
  color: #475569;
  font-size: 0.8rem;
}

/* ==========================================================================
   Cyber Social Network Banner Card
   ========================================================================== */
.cyber-banner-section-v3 {
  padding: 40px 0 60px;
}

.cyber-banner-card-v3 {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.cyber-banner-img-wrap-v3 {
  position: relative;
  width: 100%;
  max-height: 440px;
  overflow: hidden;
  background: #090d16;
}

.cyber-banner-img-v3 {
  width: 100%;
  height: 440px;
  object-fit: cover;
  display: block;
  filter: brightness(0.85) contrast(1.1);
  transition: transform 0.6s ease;
}

.cyber-banner-card-v3:hover .cyber-banner-img-v3 {
  transform: scale(1.03);
}

.cyber-banner-overlay-v3 {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.94) 0%, rgba(15, 23, 42, 0.72) 45%, rgba(15, 23, 42, 0.2) 100%);
  display: flex;
  align-items: center;
  padding: 48px;
}

[data-theme="light"] .cyber-banner-overlay-v3 {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.8) 50%, rgba(255, 255, 255, 0.25) 100%) !important;
}

[data-theme="light"] .cyber-banner-content-v3 h2 {
  color: #0f172a !important;
  text-shadow: none !important;
}

[data-theme="light"] .cyber-banner-content-v3 p {
  color: #334155 !important;
}

.cyber-banner-content-v3 {
  max-width: 600px;
}

.cyber-tag-v3 {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(56, 189, 248, 0.3);
  margin-bottom: 16px;
}

.cyber-banner-content-v3 h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 16px;
  line-height: 1.25;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.cyber-banner-content-v3 p {
  font-size: 1.05rem;
  color: #cbd5e1;
  line-height: 1.6;
  margin-bottom: 28px;
}

@media (max-width: 768px) {
  .cyber-banner-overlay-v3 {
    padding: 28px 20px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.85) 100%);
  }

  .cyber-banner-img-v3 {
    height: 380px;
  }
}

@media (max-width: 900px) {
  .home-hero-layout-v3,
  .philosophy-layout-v3 {
    grid-template-columns: 1fr;
  }

  .home-nav-v3 {
    display: none;
  }
}

@media (min-width: 901px) and (max-width: 1400px) {
  .home-header-inner-v3 {
    gap: 12px;
  }

  .home-nav-v3 {
    gap: 12px;
  }

  .home-nav-v3 > a {
    font-size: 0.88rem;
  }

  .home-fb-link {
    width: 40px;
    min-width: 40px;
    height: 40px;
    justify-content: center;
    padding: 0;
    font-size: 0;
  }

  .theme-switcher-toggle {
    min-width: 40px;
    min-height: 40px;
    justify-content: center;
    padding: 6px 9px;
  }

  .theme-switcher-toggle .theme-label {
    display: none;
  }
}

/* ==========================================================================
   PRO USER PROFILE CHIP & POPOVER DROPDOWN MENU
   ========================================================================== */
.ra-user-menu-container {
  position: relative;
  display: inline-block;
}

.ra-user-profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px 10px 3px 4px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  margin-left: 8px;
  height: 42px;
  cursor: pointer;
  outline: none;
  font-family: inherit;
}

.ra-chip-chevron {
  color: #94a3b8;
  transition: transform 0.25s ease;
  margin-left: 2px;
}

.ra-user-menu-container.active .ra-chip-chevron {
  transform: rotate(180deg);
  color: #38bdf8;
}

.ra-profile-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 250px;
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  padding: 12px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(20px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.96);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}

body[data-theme="light"] .ra-profile-dropdown-menu {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(226, 232, 240, 0.95);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
}

.ra-user-menu-container.active .ra-profile-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.ra-dropdown-user-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px 10px;
}

.ra-dropdown-avatar-lg {
  width: 40px;
  height: 40px;
  max-width: 40px;
  max-height: 40px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, #a855f7 0%, #38bdf8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(168, 85, 247, 0.4);
}

.ra-dropdown-user-details {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  overflow: hidden;
  line-height: 1.25;
}

.ra-dropdown-user-name {
  font-size: 14px;
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 165px;
}

body[data-theme="light"] .ra-dropdown-user-name {
  color: #0f172a;
}

.ra-dropdown-user-email {
  font-size: 11.5px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 165px;
}

.ra-dropdown-group-label {
  font-size: 9.5px;
  font-weight: 900;
  color: #64748b;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 8px 10px 3px;
}

.ra-dropdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 4px 0;
}

body[data-theme="light"] .ra-dropdown-divider {
  background: #e2e8f0;
}

.ra-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 12px;
  color: #cbd5e1 !important;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
  transition: all 0.18s ease;
}

body[data-theme="light"] .ra-dropdown-item {
  color: #334155 !important;
}

.ra-dropdown-item svg {
  color: #38bdf8;
  transition: transform 0.18s ease;
  flex-shrink: 0;
}

.ra-dropdown-item:hover {
  background: rgba(56, 189, 248, 0.14);
  color: #38bdf8 !important;
  transform: translateX(3px);
}

body[data-theme="light"] .ra-dropdown-item:hover {
  background: rgba(2, 132, 199, 0.08);
  color: #0284c7 !important;
}

.ra-dropdown-logout-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
  margin-top: 2px;
}

.ra-dropdown-logout-btn:hover {
  background: #ef4444;
  border-color: #ef4444;
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4);
}

body[data-theme="light"] .ra-user-profile-chip {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(226, 232, 240, 0.95);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
}

.ra-user-profile-chip:hover {
  border-color: rgba(56, 189, 248, 0.6);
  box-shadow: 0 6px 24px rgba(56, 189, 248, 0.25);
  transform: translateY(-1px);
}

.ra-user-profile-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none !important;
  color: inherit;
  padding-right: 4px;
}

.ra-user-avatar-wrapper {
  position: relative;
  width: 34px;
  height: 34px;
  max-width: 34px;
  max-height: 34px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, #a855f7 0%, #38bdf8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(168, 85, 247, 0.4);
}

.ra-user-avatar-img {
  width: 30px !important;
  height: 30px !important;
  max-width: 30px !important;
  max-height: 30px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  display: block !important;
}

.ra-user-avatar-initial {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #0f172a;
  color: #38bdf8;
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}

body[data-theme="light"] .ra-user-avatar-initial {
  background: #ffffff;
  color: #0284c7;
}

.ra-user-info-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1px;
  line-height: 1.1;
}

.ra-user-name {
  font-size: 13px;
  font-weight: 700;
  color: #f8fafc;
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s ease;
}

body[data-theme="light"] .ra-user-name {
  color: #0f172a;
}

.ra-user-profile-link:hover .ra-user-name {
  color: #38bdf8;
}

body[data-theme="light"] .ra-user-profile-link:hover .ra-user-name {
  color: #0284c7;
}

.ra-role-badge {
  font-size: 8.5px;
  font-weight: 900;
  padding: 1px 6px;
  border-radius: 999px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  line-height: 1.2;
  display: inline-block;
  margin-top: 1px;
}

.ra-role-admin {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.3) 0%, rgba(168, 85, 247, 0.35) 100%);
  border: 1px solid rgba(251, 191, 36, 0.5);
  color: #fbbf24;
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.2);
}

.ra-role-member {
  background: rgba(56, 189, 248, 0.2);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
}

.ra-logout-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  height: 32px;
}

.ra-logout-btn:hover {
  background: #ef4444;
  border-color: #ef4444;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.45);
  transform: scale(1.04);
}

.ra-login-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: 1px solid rgba(52, 211, 153, 0.3);
  color: #ffffff !important;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  margin-left: 6px;
}

.ra-login-pill-btn:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
  transform: translateY(-1px);
}

/* ==========================================================================
   Luxury Soft Lavender — ชุดสีเต็มของธีม
   ==========================================================================

   คอมโพเนนต์ v3 ส่วนใหญ่ฝังสีฟ้า (#38bdf8) และเขียว (#2dd4bf) ไว้ตรง ๆ
   ไม่ได้อ่านจากตัวแปรธีม การแก้ --bg-main อย่างเดียวจึงไม่เคยทำให้หน้าเป็นม่วง
   โดยเฉพาะ .home-hero-v3 ที่ฉาบ radial-gradient ฟ้า+เขียวทับพื้นหลังไว้เสมอ

   บล็อกนี้จึงกำหนดสีของธีมไว้ที่เดียวจนจบ และใช้ตัวเลือก html[data-theme=...]
   เพราะ override ของธีม light ถูกประกาศไว้ท้ายไฟล์ ถ้าใช้ specificity เท่ากัน
   ธีม light จะชนะทุกจุดที่ทับกัน
   ========================================================================== */

:root[data-theme="lavender"] {
  --lav-bg: #faf8ff;
  --lav-section: #f3eefe;
  --lav-card: #ffffff;
  --lav-line: #e5dcfa;
  --lav-tint: #ede9fe;
  --lav-ink: #1f1b35;
  --lav-muted: #5d5578;
  --lav-accent: #7c3aed;
  --lav-accent-2: #9333ea;
  --lav-deep: #6d28d9;

  --bg-main: var(--lav-bg);
  --bg-card: var(--lav-card);
  --bg-section: var(--lav-section);
  --text-main: var(--lav-ink);
  --text-muted: var(--lav-muted);
  --text-kicker: var(--lav-accent);
  --accent-sky: var(--lav-accent);
  --accent-purple: var(--lav-accent-2);
  --btn-primary: linear-gradient(135deg, #7c3aed 0%, #9333ea 100%);
  --header-bg: rgba(250, 248, 255, 0.96);
  --header-border: var(--lav-line);
  --nav-link-color: #3f3a56;
  --nav-link-hover: var(--lav-accent);
  --item-bg: var(--lav-card);
  --item-border: var(--lav-line);
  --footer-bg: var(--lav-section);
}

/* จุดสีในเมนูเลือกธีม — app/config/app.php อ้างคลาสนี้แต่ยังไม่เคยมีใน CSS */
.lavender-dot {
  background: linear-gradient(135deg, #a78bfa, #7c3aed);
}

/* พื้นหลัง Hero — ต้นเหตุหลักของโทนฟ้า-เขียวที่ค้างอยู่ */
html[data-theme="lavender"] .home-hero-v3 {
  background:
    radial-gradient(circle at 10% 20%, rgba(139, 92, 246, 0.18), transparent 45%),
    radial-gradient(circle at 90% 80%, rgba(216, 180, 254, 0.22), transparent 45%);
}

/* ---------------------------------------------------------------- scrollbar */

html[data-theme="lavender"] {
  scrollbar-color: #b9a7e8 var(--lav-bg) !important;
}

html[data-theme="lavender"] ::-webkit-scrollbar-track {
  background: var(--lav-bg) !important;
}

html[data-theme="lavender"] ::-webkit-scrollbar-thumb {
  background: #cfc2ee !important;
  border: 2px solid var(--lav-bg) !important;
}

html[data-theme="lavender"] ::-webkit-scrollbar-thumb:hover {
  background: var(--lav-accent) !important;
}

/* -------------------------------------------------------------- โครงหน้าสว่าง */

html[data-theme="lavender"] .brand-mark-v3 .logo-dark {
  display: none !important;
}

html[data-theme="lavender"] .brand-mark-v3 .logo-light {
  display: block !important;
  border: 1px solid var(--lav-line) !important;
  box-shadow: 0 4px 12px rgba(76, 29, 149, 0.10) !important;
}

html[data-theme="lavender"] .home-footer-v3,
html[data-theme="lavender"] .home-philosophy-v3 {
  background: var(--lav-section) !important;
  border-top: 1px solid var(--lav-line) !important;
}

html[data-theme="lavender"] .footer-brand-v3 strong,
html[data-theme="lavender"] .philosophy-copy-v3 h2,
html[data-theme="lavender"] .pillar-card-v3 h4 {
  color: var(--lav-ink) !important;
}

html[data-theme="lavender"] .footer-links-v3 a,
html[data-theme="lavender"] .philosophy-copy-v3 p,
html[data-theme="lavender"] .pillar-card-v3 p {
  color: var(--lav-muted) !important;
}

html[data-theme="lavender"] .footer-links-v3 a:hover {
  color: var(--lav-accent) !important;
}

html[data-theme="lavender"] .pillar-card-v3 {
  background: var(--lav-card) !important;
  border: 1px solid var(--lav-line) !important;
}

html[data-theme="lavender"] .cyber-banner-overlay-v3 {
  background: linear-gradient(90deg, rgba(250, 248, 255, 0.96) 0%, rgba(250, 248, 255, 0.82) 50%, rgba(250, 248, 255, 0.25) 100%) !important;
}

html[data-theme="lavender"] .cyber-banner-content-v3 h2 {
  color: var(--lav-ink) !important;
  text-shadow: none !important;
}

html[data-theme="lavender"] .cyber-banner-content-v3 p {
  color: #4a4363 !important;
}

/* ------------------------------------------------------- รายการและการ์ดต่าง ๆ */

html[data-theme="lavender"] .spotlight-item-v3,
html[data-theme="lavender"] .spotlight-subitem-v3,
html[data-theme="lavender"] .directory-links-v3 a {
  background: var(--lav-card) !important;
  border: 1px solid var(--lav-line) !important;
  color: #322c4d !important;
}

html[data-theme="lavender"] .spotlight-item-v3:hover,
html[data-theme="lavender"] .spotlight-subitem-v3:hover,
html[data-theme="lavender"] .directory-links-v3 a:hover {
  background: var(--lav-tint) !important;
  border-color: var(--lav-accent) !important;
  color: var(--lav-deep) !important;
}

html[data-theme="lavender"] .directory-card-v3:hover {
  border-color: rgba(124, 58, 237, 0.35) !important;
}

/* ------------------------------------------------- ตัวอักษรเน้นและป้ายกำกับ */

html[data-theme="lavender"] .home-badge-v3,
html[data-theme="lavender"] .stat-num-v3,
html[data-theme="lavender"] .section-kicker-v3,
html[data-theme="lavender"] .spotlight-info-v3 small {
  color: var(--lav-accent) !important;
}

html[data-theme="lavender"] .highlight-text-v3 {
  background: linear-gradient(135deg, #7c3aed 0%, #c084fc 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
}

html[data-theme="lavender"] .home-btn-sm,
html[data-theme="lavender"] .cyber-tag-v3 {
  background: var(--lav-tint) !important;
  color: var(--lav-deep) !important;
  border: 1px solid rgba(124, 58, 237, 0.28) !important;
}

html[data-theme="lavender"] .glow-teal,
html[data-theme="lavender"] .card-badge-v3.bg-teal,
html[data-theme="lavender"] .card-icon-wrapper-v3.teal {
  background: rgba(147, 51, 234, 0.12) !important;
  color: var(--lav-accent) !important;
}

html[data-theme="lavender"] .pillar-num-v3 {
  background: var(--lav-tint) !important;
  color: var(--lav-accent) !important;
}

html[data-theme="lavender"] .primary-btn-v3 {
  background: linear-gradient(135deg, #7c3aed 0%, #9333ea 100%) !important;
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.28) !important;
}

html[data-theme="lavender"] .primary-btn-v3:hover {
  background: linear-gradient(135deg, #6d28d9 0%, #7e22ce 100%) !important;
}

html[data-theme="lavender"] .status-dot-v3 {
  background: var(--lav-accent) !important;
  box-shadow: 0 0 12px rgba(124, 58, 237, 0.55) !important;
}

/* --------------------------------------------------------- ตัวสลับธีม */

html[data-theme="lavender"] .theme-switcher-toggle {
  background: var(--lav-tint) !important;
  border: 1px solid var(--lav-line) !important;
  color: var(--lav-ink) !important;
}

html[data-theme="lavender"] .theme-dropdown-menu {
  background: var(--lav-card) !important;
  border: 1px solid var(--lav-line) !important;
  box-shadow: 0 10px 30px rgba(76, 29, 149, 0.16) !important;
}

html[data-theme="lavender"] .theme-select-btn {
  color: #3f3a56 !important;
}

html[data-theme="lavender"] .theme-select-btn:hover,
html[data-theme="lavender"] .theme-select-btn.active {
  background: var(--lav-tint) !important;
  color: var(--lav-deep) !important;
}

/* ------------------------------------------------------- เมนูผู้ใช้ */

html[data-theme="lavender"] .ra-user-profile-chip {
  background: rgba(255, 255, 255, 0.95) !important;
  border-color: var(--lav-line) !important;
  box-shadow: 0 4px 16px rgba(76, 29, 149, 0.10) !important;
}

html[data-theme="lavender"] .ra-user-profile-chip:hover {
  border-color: rgba(124, 58, 237, 0.55) !important;
  box-shadow: 0 6px 24px rgba(124, 58, 237, 0.22) !important;
}

html[data-theme="lavender"] .ra-user-name,
html[data-theme="lavender"] .ra-dropdown-user-name {
  color: var(--lav-ink) !important;
}

html[data-theme="lavender"] .ra-user-profile-link:hover .ra-user-name,
html[data-theme="lavender"] .ra-user-menu-container.active .ra-chip-chevron,
html[data-theme="lavender"] .ra-dropdown-item svg,
html[data-theme="lavender"] .ra-user-avatar-initial {
  color: var(--lav-accent) !important;
}

html[data-theme="lavender"] .ra-user-avatar-wrapper,
html[data-theme="lavender"] .ra-dropdown-avatar-lg {
  background: linear-gradient(135deg, #a78bfa 0%, #7c3aed 100%) !important;
}

html[data-theme="lavender"] .ra-user-avatar-initial {
  background: #ffffff !important;
}

html[data-theme="lavender"] .ra-profile-dropdown-menu {
  background: rgba(255, 255, 255, 0.97) !important;
  border-color: var(--lav-line) !important;
  box-shadow: 0 16px 36px rgba(76, 29, 149, 0.14) !important;
}

html[data-theme="lavender"] .ra-dropdown-divider {
  background: var(--lav-line) !important;
}

html[data-theme="lavender"] .ra-dropdown-item {
  color: #3f3a56 !important;
}

html[data-theme="lavender"] .ra-dropdown-item:hover {
  background: rgba(124, 58, 237, 0.10) !important;
  color: var(--lav-deep) !important;
}

html[data-theme="lavender"] .ra-role-member {
  background: rgba(124, 58, 237, 0.16) !important;
  border: 1px solid rgba(124, 58, 237, 0.35) !important;
  color: var(--lav-deep) !important;
}
