:root {
  --bg: #f3f7fb;
  --paper: #fffdf7;
  --paper-soft: #f3f8fb;
  --ink: #1f252b;
  --muted: #66727d;
  --line: #d7e3ea;
  --accent: #79aeca;
  --accent-dark: #3f7897;
  --accent-soft: #e6f3f8;
  --cream: #fffef9;
  --shadow: 0 24px 60px rgba(45, 82, 103, 0.12);
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Anuphan", system-ui, sans-serif;
  line-height: 1.7;
  overflow-x: hidden;
  background:
    linear-gradient(rgba(63, 120, 151, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(63, 120, 151, 0.045) 1px, transparent 1px),
    radial-gradient(circle at 12% 0%, #e7f5fb 0, transparent 30rem),
    radial-gradient(circle at 92% 14%, #fff8e9 0, transparent 24rem),
    var(--bg);
  background-size: 28px 28px, 28px 28px, auto, auto, auto;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  background-image: radial-gradient(#3f7897 0.55px, transparent 0.7px);
  background-size: 18px 18px;
  mix-blend-mode: multiply;
}

/* ============================= */
/* Main Content */
/* ============================= */

main {
  transition: opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

a {
  color: inherit;
  text-decoration: none;
}

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

h1 {
  margin-bottom: 20px;
  font-size: clamp(4.2rem, 13vw, 10rem);
  line-height: 0.86;
  letter-spacing: -0.09em;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.18;
  letter-spacing: -0.045em;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.08rem;
}

/* ============================= */
/* Header */
/* ============================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: 76px;
  padding: 14px clamp(18px, 5vw, 72px);
  background: rgba(255, 253, 247, 0.84);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand,
.nav-links,
.hero-actions,
.category-tabs,
.footer-links {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 1px solid var(--line);
  background: #171f26;
  box-shadow: 0 10px 26px rgba(45, 82, 103, 0.12);
}

.nav-links {
  gap: clamp(14px, 2vw, 30px);
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 800;
}

.nav-links a {
  transition: color 0.2s cubic-bezier(0.4, 0, 0.2, 1), background 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.nav-links a:hover,
.footer-links a:hover {
  color: var(--accent-dark);
}

.lang-switch {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.78);
  box-shadow: 0 10px 24px rgba(45, 82, 103, 0.08);
}

.lang-switch button {
  border: 0;
  padding: 7px 11px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.lang-switch button.active {
  background: var(--ink);
  color: var(--paper);
}

.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 253, 247, 0.86);
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(45, 82, 103, 0.08);
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: var(--ink);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.site-header.menu-open .menu-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-header.menu-open .menu-toggle span:nth-child(2) {
  opacity: 0;
}

.site-header.menu-open .menu-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Desktop Header: Brand | Nav | TH/EN */

@media (min-width: 769px) {
  .site-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 28px;
  }

  .header-top,
  .header-actions {
    display: contents;
  }

  .brand {
    grid-column: 1;
    justify-self: start;
  }

  .nav-links {
    grid-column: 2;
    justify-self: end;
    width: auto;
    overflow: visible;
    padding: 0;
  }

  .nav-links a {
    padding: 0;
    border: 0;
    background: transparent;
  }

  .lang-switch {
    grid-column: 3;
    justify-self: end;
    margin: 0;
  }

  .menu-toggle {
    display: none;
  }
}

/* ============================= */
/* Hero */
/* ============================= */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.78fr);
  gap: clamp(28px, 5vw, 68px);
  align-items: center;
  min-height: calc(100vh - 76px);
  padding: clamp(44px, 7vw, 92px) clamp(18px, 5vw, 72px);
}

.paper-wrap {
  position: relative;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-text,
.section-heading p,
.feature-grid p,
.command-card p,
.premium-band p,
.policy-card p,
.policy-card li {
  color: var(--muted);
}

.hero-text {
  max-width: 700px;
  font-size: clamp(1rem, 2vw, 1.18rem);
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(45, 82, 103, 0.08);
  transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, box-shadow;
}

.button:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 32px rgba(45, 82, 103, 0.16);
}

.button:active {
  transform: translateY(-1px);
}

.button.primary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.button.secondary {
  background: rgba(255, 253, 247, 0.74);
}

/* ============================= */
/* Cards */
/* ============================= */

.hero-card,
.feature-grid article,
.command-card,
.premium-band,
.policy-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 247, 0.78);
  box-shadow: var(--shadow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, box-shadow;
}

.feature-grid article:hover,
.command-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 28px 70px rgba(45, 82, 103, 0.15);
}

.hero-card {
  position: relative;
  min-height: 470px;
  padding: clamp(26px, 4vw, 44px);
  overflow: hidden;
}

.hero-card::before,
.hero-card::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.hero-card::before {
  width: 230px;
  height: 230px;
  right: -82px;
  top: -74px;
  background: rgba(121, 174, 202, 0.22);
}

.hero-card::after {
  width: 160px;
  height: 160px;
  left: -56px;
  bottom: -50px;
  background: rgba(255, 225, 175, 0.22);
}

.avatar-shell {
  position: relative;
  z-index: 1;
  width: 112px;
  height: 112px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: var(--cream);
  box-shadow: 0 16px 36px rgba(45, 82, 103, 0.1);
}

.bot-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 24px;
}

.card-kicker {
  position: relative;
  z-index: 1;
  margin: 44px 0 10px;
  color: var(--accent-dark);
  font-weight: 800;
}

.hero-card h2,
.hero-card .mini-list {
  position: relative;
  z-index: 1;
}

.mini-list {
  display: grid;
  gap: 10px;
  margin-top: 28px;
}

.mini-list span {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.74);
  color: var(--muted);
  font-weight: 700;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================= */
/* Metrics */
/* ============================= */

.metrics,
.section,
.site-footer,
.policy-main {
  padding-inline: clamp(18px, 5vw, 72px);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.metrics div {
  min-height: 118px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 253, 247, 0.72);
  box-shadow: 0 12px 30px rgba(45, 82, 103, 0.07);
}

.metrics strong {
  display: block;
  font-size: 1.75rem;
  letter-spacing: -0.04em;
}

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

/* ============================= */
/* Sections */
/* ============================= */

.section {
  padding-top: clamp(64px, 9vw, 110px);
  padding-bottom: clamp(64px, 9vw, 110px);
}

.section-heading {
  max-width: 860px;
  margin-bottom: 30px;
}

.section-heading.split {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  max-width: none;
}

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

.feature-grid article,
.command-card {
  min-height: 185px;
  padding: 24px;
}

.brand-mark,
.feature-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-weight: 800;
}

.feature-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 20px;
  background: var(--accent-soft);
  color: var(--accent-dark);
}

/* ============================= */
/* Commands */
/* ============================= */

.search-box {
  display: grid;
  gap: 7px;
  min-width: min(390px, 100%);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.search-box input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.84);
  color: var(--ink);
  font: inherit;
  outline: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-box input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(121, 174, 202, 0.2);
  background: rgba(255, 253, 247, 0.95);
}

.category-tabs {
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.category-tabs button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.76);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: background, border-color, color;
}

.category-tabs button:hover {
  background: rgba(255, 253, 247, 0.95);
  border-color: var(--accent);
}

.category-tabs button.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
  transform: scale(1.02);
}

.command-card {
  min-height: 148px;
  animation: fadeInUp 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.command-card .category {
  color: var(--accent-dark);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.command-card code {
  display: inline-block;
  margin: 10px 0 8px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-soft);
  color: var(--ink);
  font-size: 0.95rem;
}

/* ============================= */
/* Premium */
/* ============================= */

.premium-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  margin-inline: clamp(18px, 5vw, 72px);
  padding: clamp(28px, 5vw, 46px);
  background:
    radial-gradient(circle at 100% 0%, rgba(121, 174, 202, 0.22), transparent 22rem),
    rgba(255, 253, 247, 0.8);
}

.premium-band div {
  max-width: 840px;
}

/* ============================= */
/* Footer */
/* ============================= */

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-top: 30px;
  padding-bottom: 30px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.footer-links {
  gap: 18px;
  font-weight: 800;
}

/* ============================= */
/* Old Policy Layout Support */
/* ============================= */

.policy-main {
  padding-top: clamp(48px, 7vw, 86px);
  padding-bottom: clamp(64px, 9vw, 110px);
}

.policy-hero {
  max-width: 920px;
  margin-bottom: 28px;
}

.policy-hero h1 {
  font-size: clamp(2.8rem, 8vw, 6rem);
  letter-spacing: -0.07em;
}

.policy-card {
  max-width: 980px;
  padding: clamp(24px, 4vw, 44px);
}

.policy-card + .policy-card {
  margin-top: 16px;
}

.policy-card h2 {
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.policy-card ul {
  padding-left: 1.25rem;
}

.policy-updated {
  color: var(--accent-dark);
  font-weight: 800;
}

/* ============================= */
/* Legal Pages */
/* ============================= */

.legal-page {
  min-height: calc(100vh - 86px);
  padding: clamp(32px, 7vw, 86px) clamp(18px, 5vw, 72px);
}

.legal-card {
  max-width: 920px;
  margin: 0 auto;
  padding: clamp(26px, 5vw, 54px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 253, 247, 0.78);
  box-shadow: var(--shadow);
}

.legal-card h1 {
  margin-bottom: 10px;
  font-size: clamp(2.4rem, 7vw, 5.8rem);
  line-height: 0.95;
}

.legal-card h2 {
  margin-top: 34px;
  margin-bottom: 10px;
  font-size: clamp(1.25rem, 3vw, 1.9rem);
}

.legal-card p,
.legal-card li {
  color: var(--muted);
  font-size: 1rem;
}

.legal-card a {
  color: var(--ink);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.legal-card ul {
  padding-left: 22px;
}

.legal-muted {
  color: var(--muted);
}

/* ============================= */
/* Tablet */
/* ============================= */

@media (max-width: 920px) {
  .hero,
  .premium-band {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .metrics,
  .feature-grid,
  .command-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-heading.split {
    align-items: stretch;
    flex-direction: column;
  }
}

/* ============================= */
/* Mobile */
/* ============================= */

@media (max-width: 768px) {
  body {
    background-size: 24px 24px, 24px 24px, auto, auto, auto;
  }

  .site-header {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    min-height: auto;
    padding: 14px 16px;
  }

  .header-top {
    width: 100%;
  }

  .brand {
    width: auto;
    min-width: 0;
    gap: 10px;
  }

  .brand-logo {
    width: 44px;
    height: 44px;
  }

  .brand span {
    font-size: 19px;
    font-weight: 800;
    white-space: nowrap;
  }

  .header-actions {
    flex: 0 0 auto;
    gap: 10px;
  }

  .lang-switch {
    margin-top: 0;
    padding: 4px;
    gap: 4px;
    border-radius: 999px;
  }

  .lang-switch button {
    min-width: 42px;
    height: 38px;
    padding: 0 10px;
    font-size: 13px;
  }

  .menu-toggle {
    display: inline-block;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
  }

  .nav-links {
    display: grid;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    gap: 8px;
    padding: 0;
    opacity: 0;
    transform: translateY(-6px);
    transition:
      max-height 0.24s ease,
      opacity 0.18s ease,
      transform 0.18s ease,
      padding 0.18s ease;
  }

  .site-header.menu-open .nav-links {
    max-height: 420px;
    opacity: 1;
    transform: translateY(0);
    padding-top: 8px;
  }

  .nav-links a {
    width: 100%;
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 16px;
    background: rgba(255, 253, 247, 0.88);
    border: 1px solid rgba(63, 120, 151, 0.12);
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
  }

  .nav-links a:hover {
    color: var(--accent-dark);
    background: rgba(230, 243, 248, 0.82);
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 40px 18px 32px;
  }

  .hero-copy {
    max-width: 100%;
  }

  .eyebrow {
    font-size: 11px;
    letter-spacing: 0.12em;
    margin-bottom: 14px;
  }

  h1,
  .hero h1 {
    font-size: clamp(56px, 17vw, 82px);
    line-height: 0.95;
    letter-spacing: -0.07em;
    margin-bottom: 18px;
  }

  .hero-text {
    font-size: 16px;
    line-height: 1.85;
    max-width: 100%;
  }

  .hero-actions {
    display: flex;
    gap: 10px;
    margin-top: 26px;
  }

  .button {
    min-height: 52px;
    padding: 0 20px;
    font-size: 15px;
    border-radius: 999px;
    flex: 1;
    white-space: nowrap;
  }

  .hero-card {
    min-height: auto;
    padding: 26px;
    border-radius: 26px;
  }

  .hero-card::before {
    width: 180px;
    height: 180px;
    right: -76px;
    top: -64px;
  }

  .hero-card::after {
    width: 120px;
    height: 120px;
  }

  .avatar-shell {
    width: 120px;
    height: 120px;
    border-radius: 30px;
    margin-bottom: 22px;
  }

  .bot-avatar {
    border-radius: 24px;
  }

  .card-kicker {
    margin-top: 22px;
  }

  .hero-card h2 {
    font-size: 25px;
    line-height: 1.25;
  }

  .mini-list {
    gap: 10px;
  }

  .mini-list span {
    font-size: 14px;
    padding: 11px 14px;
  }

  .metrics {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 16px 18px;
  }

  .metrics div {
    min-height: 104px;
    padding: 18px 16px;
    border-radius: 22px;
  }

  .metrics strong {
    font-size: 25px;
  }

  .metrics span {
    font-size: 13px;
  }

  .section {
    padding: 52px 18px;
  }

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

  .section-heading h2 {
    font-size: 32px;
    line-height: 1.15;
  }

  .section-heading p {
    font-size: 15px;
    line-height: 1.75;
  }

  .feature-grid,
  .command-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .feature-grid article,
  .command-card {
    padding: 22px;
    border-radius: 24px;
  }

  .commands-section .split {
    display: block;
  }

  .search-box {
    width: 100%;
    margin-top: 20px;
  }

  .search-box input {
    width: 100%;
    min-height: 52px;
    font-size: 15px;
  }

  .category-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: none;
  }

  .category-tabs::-webkit-scrollbar {
    display: none;
  }

  .category-tabs button {
    flex: 0 0 auto;
    font-size: 14px;
    padding: 0 16px;
    border-radius: 999px;
  }

  .premium-band {
    display: block;
    margin-inline: 18px;
    padding: 30px 22px;
    border-radius: 28px;
  }

  .premium-band .button {
    margin-top: 22px;
    width: 100%;
  }

  .legal-page {
    padding: 32px 18px;
  }

  .legal-card {
    padding: 26px 22px;
    border-radius: 26px;
  }

  .legal-card h1 {
    font-size: clamp(42px, 12vw, 64px);
  }

  .legal-card h2 {
    font-size: 22px;
  }

  .site-footer {
    padding: 24px 18px;
    gap: 14px;
    flex-direction: column;
    align-items: flex-start;
  }

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

/* ============================= */
/* Extra Small Phones */
/* ============================= */

@media (max-width: 430px) {
  .site-header {
    padding: 12px 14px;
  }

  .brand-logo {
    width: 40px;
    height: 40px;
  }

  .brand span {
    font-size: 17px;
  }

  .header-actions {
    gap: 8px;
  }

  .lang-switch button {
    min-width: 38px;
    height: 36px;
    font-size: 12px;
  }

  .menu-toggle {
    width: 40px;
    height: 40px;
    border-radius: 14px;
  }

  .menu-toggle span {
    width: 18px;
  }

  .nav-links a {
    min-height: 42px;
    font-size: 13px;
  }

  .hero {
    padding: 36px 15px 28px;
  }

  h1,
  .hero h1 {
    font-size: 56px;
  }

  .hero-text {
    font-size: 15.5px;
    line-height: 1.8;
  }

  .hero-actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .hero-card {
    padding: 24px;
  }

  .avatar-shell {
    width: 112px;
    height: 112px;
  }

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

  .section-heading h2 {
    font-size: 30px;
  }

  .premium-band {
    margin-inline: 15px;
  }
}
/* ============================= */
/* Fix Desktop Header Layout */
/* Desktop: Kubo Bot | Menu | TH/EN */
/* Mobile: Kubo Bot | TH/EN | Dropdown */
/* ============================= */

@media (min-width: 769px) {
  .site-header {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 28px !important;
    min-height: 76px !important;
    padding: 14px clamp(18px, 5vw, 72px) !important;
  }

  .header-top {
    display: contents !important;
  }

  .brand {
    order: 1;
    flex: 0 0 auto;
    width: auto !important;
  }

  .nav-links {
    order: 2;
    flex: 1 1 auto;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: clamp(16px, 2vw, 30px) !important;
    width: auto !important;
    max-height: none !important;
    overflow: visible !important;
    opacity: 1 !important;
    transform: none !important;
    padding: 0 !important;
    margin-left: auto !important;
  }

  .nav-links a {
    width: auto !important;
    min-height: auto !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    font-size: 0.94rem !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
  }

  .header-actions {
    order: 3;
    flex: 0 0 auto;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
  }

  .lang-switch {
    margin: 0 !important;
  }

  .menu-toggle {
    display: none !important;
  }
}

.metrics div {
  position: relative;
  overflow: hidden;
  transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, box-shadow;
}

.metrics div:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(45, 82, 103, 0.12);
}

.metrics div::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(121,174,202,.15),
    transparent
  );
}
/* ลบ .status-card, .status-header, .status-dot เก่าออก แล้ววางเซ็ตนี้แทน */

.status-card .status-header {
  display: flex; /* ✨ เปลี่ยนจาก inline-flex เป็น flex เพื่อดันคำว่า Bot Status ลงข้างล่าง */
  align-items: center;
  gap: 10px;
  color: var(--ink);
}

/* ส่วนของจุดไฟและแอนิเมชันอื่น ๆ ปล่อยไว้เหมือนเดิมได้เลยครับ */
.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #22c55e;
  position: relative;
  display: inline-block;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.5);
}

/* แอนิเมชันวงแหวนละอองไฟกะพริบ (Pulse Effect) */
.status-dot::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #22c55e;
  animation: statusPulse 2.5s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}

.status-dot::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #22c55e;
  animation: statusPulse 2.5s cubic-bezier(0.24, 0, 0.38, 1) infinite;
  
  /* 🚀 เพิ่มบรรทัดนี้: บังคับใช้การ์ดจอเรนเดอร์ ช่วยลดอาการแลคตอนเลื่อนจอ */
  will-change: transform, opacity; 
}

@keyframes statusPulse {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(2.4);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 0;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ดึงให้คำว่า ONLINE กลับมาสีเข้มเท่าตัวเลขใบอื่น */
#bot-status-text {
  color: var(--ink) !important;
}

/* ล็อกให้คำว่า Bot Status เป็นสีเทาจางเท่ากับตัวหนังสือใบอื่น */
.status-card > span {
  color: var(--muted) !important;
}

/* เมื่อการ์ดติดสถานะ offline ให้เปลี่ยนตัวหนังสือเป็นสีแดงจาง */
.status-card.is-offline #bot-status-text {
  color: #ef4444 !important; 
}

/* เปลี่ยนจุดไข่ปลาเป็นสีแดง และปิดเงาเรืองแสง */
.status-card.is-offline .status-dot {
  background: #ef4444 !important;
  box-shadow: none !important;
}

/* สั่งหยุดแอนิเมชันกะพริบ (วงแหวนละอองไฟวิ่ง) */
.status-card.is-offline .status-dot::before {
  animation: none !important;
}
/* 1. ขยายคำว่า ONLINE ให้ใหญ่และหนาเท่ากับตัวเลขการ์ดใบอื่น */
#bot-status-text {
  font-size: 1.75rem !important; /* ปรับเพิ่ม/ลด ตัวเลขนี้ให้เท่ากับใบอื่นได้เลยครับ (เช่น 1.5rem หรือ 24px) */
  font-weight: 700 !important;   /* เพิ่มความหนาให้เท่าตัวเลขเพื่อนๆ */
  line-height: 1.2;
}

/* 2. จัดระเบียบให้จุดไฟสีเขียวขยายตามและอยู่กึ่งกลางคู่กับตัวหนังสือที่ใหญ่ขึ้น */
.status-card .status-header {
  display: flex;
  align-items: center;
  gap: 12px;          /* เพิ่มระยะห่างระหว่างจุดกับตัวอักษร */
  margin-bottom: 6px;  /* ดันคำว่า Bot Status ข้างล่างลงไปนิดนึงให้มีช่องไฟ */
}

/* 3. ปรับขนาดจุดไฟให้ใหญ่ขึ้นอีกนิด จะได้บาลานซ์กับฟอนต์ใหม่ */
.status-card .status-dot {
  width: 14px;
  height: 14px;
}