@font-face {
  font-family: "Noto Sans Thai";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/iJWQBXeUZi_OHPqn4wq6hQ2_hbJ1xyN9wd43SofNWcdfKI2hX2g.woff2") format("woff2");
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}

@font-face {
  font-family: "Noto Sans Thai";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/iJWQBXeUZi_OHPqn4wq6hQ2_hbJ1xyN9wd43SofNWcdfPI2h.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;
  --bg: #0b1422;
  --surface: #101f31;
  --surface-raised: #182b40;
  --surface-hover: #20384e;
  --line: #324a60;
  --ink: #eef5fa;
  --muted: #a9bed1;
  --accent: #7de4dc;
  --gold: #f7cb7e;
  --warm: var(--gold);
  --action-bg: linear-gradient(155deg, #294d4d, #132d36 68%);
  --action-bg-hover: linear-gradient(155deg, #355c58, #1b3d44 68%);
  --action-line: #46766f;
  --action-ink: #dcfff5;
  --gold-action-bg: linear-gradient(155deg, #403327, #2d2522 75%);
  --gold-action-line: #8b6d4d;
  --gold-action-hover: #493a29;
  --display: "Baloo Thai 2", "Noto Sans Thai", system-ui, sans-serif;
  --body: "Noto Sans Thai", system-ui, sans-serif;
  --radius-sm: 14px;
  --radius-md: 22px;
  --radius-pill: 999px;
  --page-width: 1180px;
  --page-gutter: 20px;
  --header-height: 102px;
  --container: min(calc(100% - var(--page-gutter) * 2), var(--page-width));
  --ink-900: var(--ink);
  --sky-100: #1b3248;
  --leaf-100: #1a3a36;
  --leaf-600: #a9eebf;
  --orange-400: #eab574;
  --orange-500: #c68146;
  --line-blue: var(--line);
  --shadow-sm: 0 8px 22px #050b1466;
  --shadow-md: 0 22px 52px #03081096;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--header-height) + 14px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-900);
  font: 400 16px/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { max-inline-size: 100%; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
::selection { color: var(--bg); background: var(--accent); }
[hidden] { display: none !important; }

.container { width: var(--container); margin-inline: auto; }

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 105;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--bg);
  transform: translateY(calc(-100% - 18px));
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: fixed;
  z-index: 100;
  inset: 0 0 auto;
  isolation: isolate;
  color: var(--ink-900);
  background: #0d1929f2;
  backdrop-filter: blur(16px);
  transition: background 180ms ease, box-shadow 180ms ease;
}
:is(.page-home, .page-development, .page-ranking, .page-account, .page-login, .page-register, .page-forgot-password) .site-header {
  background: linear-gradient(180deg, #091322fa 8%, #0b1629e8 66%, #0b162900);
  backdrop-filter: none;
}
.site-header.is-scrolled {
  background: #0d1929f5;
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 #8eb9cf24, 0 12px 28px #050b1466;
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-height);
  gap: 18px;
}

.brand { flex: 0 0 auto; display: grid; align-items: center; justify-items: start; width: 132px; }
.brand img {
  display: block;
  width: auto;
  height: calc(var(--header-height) - 16px);
  filter: drop-shadow(0 4px 9px #0008);
}

.primary-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--ink);
  margin-left: auto;
  font-family: var(--display);
  font-weight: 700;
  font-size: 16px;
  white-space: nowrap;
}
@media (min-width: 861px) { .primary-nav > .mobile-member-entry { display:none; } }

.primary-nav > a, .downloads-trigger > a {
  position: relative;
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  padding-inline: 14px;
  border-radius: 12px;
}
.primary-nav a:hover { color: var(--ink); }
:is(.primary-nav, .downloads-trigger) > a:hover { color: var(--accent); }
:is(.primary-nav, .downloads-trigger) > a::after {
  content: "";
  position: absolute;
  inset: auto 16px 4px;
  height: 3px;
  border-radius: var(--radius-pill);
  background: var(--gold);
  transform: scaleX(0);
  transition: transform .18s ease;
}
:is(.primary-nav, .downloads-trigger) > a:hover::after,
.primary-nav [aria-current="page"]::after { transform: scaleX(1); }
.page-development .primary-nav [aria-current="page"]::after { background: var(--accent); }
.community-link { display: inline-flex; align-items: center; gap: 6px; }
.community-icon { width: 18px; height: 18px; flex: none; }
.primary-nav > .community-link--discord:hover { color: #adb6ff; }
.primary-nav > .community-link--facebook:hover { color: #8cc0ff; }
.primary-nav > .community-link:hover::after { background: currentColor; }

.downloads-trigger { display: flex; align-items: center; }
.downloads-trigger > a { padding-inline-end: 14px; }
.downloads-toggle, .language-toggle, .menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  background: none;
  border: 0;
  padding: 0;
}
.downloads-toggle { width: 22px; min-height: 34px; margin-left: -10px; border-radius: 11px; color: var(--muted); }
.downloads-toggle:hover { color: var(--accent); background: #7de4dc14; }
.chevron { display: inline-block; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-2px) rotate(45deg); transition: transform 180ms ease; }
[aria-expanded="true"] > .chevron { transform: translateY(1px) rotate(225deg); }
.downloads.is-open .downloads-trigger > a { color: var(--ink-900); }
.downloads.is-open .downloads-trigger > a::after { transform: scaleX(1); }

.download-panel {
  position: absolute;
  top: calc(100% - 10px);
  left: 50%;
  transform: translate(-50%, -8px);
  inline-size: min(880px, calc(100vw - 32px));
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  font-family: var(--body);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}
.download-panel::before {
  content: "";
  position: absolute;
  inset: -20px 0 100%;
}
.downloads.is-open .download-panel {
  transform: translate(-50%, 0);
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}
.download-heading { margin: 0 4px 12px; font-size: 13.76px; font-weight: 700; color: var(--muted); }
.download-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.download-platform {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 10px;
  border-radius: 18px;
  background: linear-gradient(145deg, var(--surface-raised), #142437 70%);
}
.download-platform-link {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 4px 12px;
  align-items: start;
  color: var(--ink);
  white-space: normal;
  padding: 10px;
  border-radius: 12px;
}
.platform-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: var(--accent);
  border-radius: 12px;
  background: #0e1c2d;
  box-shadow: var(--shadow-sm);
}
.platform-description { display: grid; gap: 2px; }
.platform-description strong { font: 800 16.32px/1.65 var(--display); }
.platform-description small { color: var(--muted); font-size: 13.44px; line-height: 1.4; font-weight: 500; }
.download-platform-link > .download-status { grid-column: 2; justify-self: start; }
.download-platform-link:hover { background: var(--surface-hover); }
.download-status {
  flex: none;
  display: inline-flex;
  color: var(--muted);
  background: #0d1b2b;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 12.16px;
  font-weight: 700;
  line-height: 1.65;
  white-space: nowrap;
}
.download-status--ready { color: var(--leaf-600); background: var(--leaf-100); }

.languages { position: relative; display: flex; align-items: center; flex: none; }
.language-toggle {
  gap: 5px;
  height: 36px;
  padding: 0 9px 0 8px;
  border-radius: var(--radius-pill);
  background: var(--surface-raised);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink-900);
  font: 700 .8rem/1 var(--body);
  letter-spacing: .03em;
  white-space: nowrap;
}
.language-toggle:hover, .language-toggle[aria-expanded="true"] { background: var(--surface-hover); color: var(--accent); }
.language-globe, .language-caret {
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}
.language-globe { width: 17px; height: 17px; }
.language-caret {
  width: 10px;
  height: 10px;
  stroke-linejoin: round;
  opacity: .7;
  transition: transform .15s ease;
}
.language-toggle[aria-expanded="true"] .language-caret { transform: rotate(180deg); }
.language-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 2;
  min-width: 150px;
  margin: 0;
  padding: 6px;
  list-style: none;
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow-md), 0 0 0 1px var(--line);
}
.language-menu button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font-size: 15.2px;
  line-height: 1.2;
  font-weight: 600;
  text-align: start;
}
.language-menu button:hover { background: var(--surface-hover); }
.language-menu button[aria-current="true"] { color: var(--accent); font-weight: 800; }
.language-menu button[aria-current="true"]::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.languages button:focus-visible { outline-width: 2px; outline-offset: 2px; }

.symbol { display: inline-block; position: relative; width: 17px; height: 17px; color: inherit; flex: none; }
.symbol--globe { border: 1.5px solid currentColor; border-radius: 50%; }
.symbol--globe::before { content: ""; position: absolute; inset: -1px 3px; border-inline: 1px solid currentColor; border-radius: 50%; }
.symbol--globe::after { content: ""; position: absolute; inset: 50% 0 auto; border-top: 1px solid currentColor; }
.symbol--windows { width: 19px; height: 13px; border: 1.5px solid currentColor; border-radius: 2px; margin-bottom: 3px; }
.symbol--windows::before { content: ""; position: absolute; width: 1px; height: 5px; background: currentColor; top: 100%; left: 50%; }
.symbol--windows::after { content: ""; position: absolute; width: 8px; height: 1.5px; background: currentColor; top: calc(100% + 4px); left: calc(50% - 4px); }
.symbol--mobile { width: 12px; height: 19px; border: 1.5px solid currentColor; border-radius: 4px; }
.symbol--mobile::after { content: ""; position: absolute; bottom: 2px; left: 3px; right: 3px; border-top: 1px solid currentColor; }

.header-login {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin-left: 6px;
  padding-inline: 18px;
  border: 2px solid var(--gold-action-line);
  border-radius: 12px;
  background: var(--gold-action-bg);
  color: var(--gold);
  box-shadow: inset 0 1px 0 #f7cb7e26, 0 4px 12px #050b1477;
  font: 700 14.72px/1 var(--display);
  white-space: nowrap;
}
.header-login:hover { background: var(--gold-action-hover); border-color: #c3a16a; }
.menu-toggle { display: none; }

.site-footer {
  background: #080f1a;
  color: var(--muted);
  border-top: 1px solid #263d51;
  padding-block: 28px;
  text-align: center;
}
.footer-inner { display: grid; justify-items: center; gap: 24px; }
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 22px;
  font-size: 14.4px;
}
.footer-nav a { position: relative; min-height: 24px; display: inline-flex; align-items: center; }
.footer-nav a:not(:last-of-type)::after { content: "•"; position: absolute; right: -14px; color: #68889e; }
.footer-nav a:hover { color: var(--accent); }
.footer-nav .community-link { gap: 7px; }
.footer-nav .community-icon { width: 15px; height: 15px; }
.footer-nav .community-link--discord:hover { color: #aab2ff; }
.footer-nav .community-link--facebook:hover { color: #7db5ff; }
.footer-copy { margin: 0; color: #859eb4; font-size: 12.16px; line-height: 20px; }

@media (max-width: 1199px) {
  .header-inner { gap: 16px; }
  .primary-nav > a, .downloads-trigger > a { padding-inline-start: 9px; }
  .primary-nav > a { padding-inline-end: 9px; }
}

@media (max-width: 1060px) {
  .header-inner { gap: 12px; }
  .primary-nav { font-size: 14.4px; }
  .header-login { padding-inline: 13px; }
  .brand { width: 116px; }
  .primary-nav > .community-link { padding-inline: 5px; }
}

@media (min-width: 861px) and (max-width: 1199px) {
  .primary-nav > .community-link > span:last-child {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
}

@media (min-width: 861px) and (max-width: 940px) {
  .language-toggle { padding-inline: 9px; }
  .language-code, .language-caret { display: none; }
}

@media (max-width: 860px) {
  :root { --header-height: 82px; --page-width: 720px; --page-gutter: 14px; }
  body.mobile-menu-open { overflow: hidden; }
  .header-inner { justify-content: flex-end; gap: 18px; }
  .brand { margin-right: auto; width: 128px; }
  .header-login { display: none; }
  .menu-toggle {
    position: relative;
    display: inline-flex;
    flex: 0 0 46px;
    height: 46px;
    border: 1px solid var(--line-blue);
    border-radius: var(--radius-sm);
    background: var(--surface-raised);
    color: var(--ink);
  }
  .menu-toggle:hover, .menu-toggle[aria-expanded="true"] { background: var(--surface-hover); color: var(--accent); }
  .menu-toggle span, .menu-toggle span::before, .menu-toggle span::after {
    position: absolute;
    width: 21px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform 180ms ease;
  }
  .menu-toggle span::before, .menu-toggle span::after { content: ""; left: 0; }
  .menu-toggle span::before { top: -7px; }
  .menu-toggle span::after { top: 7px; }
  .menu-toggle[aria-expanded="true"] span { background: transparent; }
  .menu-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }
  .primary-nav {
    display: none;
    align-items: stretch;
    position: fixed;
    top: calc(var(--header-height) + 12px);
    inset-inline: var(--page-gutter);
    max-height: calc(100dvh - 110px);
    overflow-y: auto;
    gap: 4px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: var(--shadow-md);
    font-size: 14.88px;
  }
  .primary-nav.is-open { display: grid; justify-content: stretch; }
  .primary-nav > a, .primary-nav > .community-link, .downloads-trigger > a { min-height: 46px; padding: 11px 14px; border-radius: 10px; }
  .primary-nav > a:hover, .downloads-trigger > a:hover { background: var(--surface-raised); }
  :is(.primary-nav, .downloads-trigger) > a::after { width: 36px; left: 14px; bottom: 8px; }
  .primary-nav .community-icon { width: 20px; height: 20px; }
  .downloads-toggle, .download-heading, .platform-description small, .download-panel::before { display: none; }
  .download-panel, .downloads.is-open .download-panel {
    position: static;
    transform: none;
    inline-size: auto;
    margin: 0;
    padding: 0 0 4px 14px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transition: none;
  }
  .download-grid { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .download-platform { padding: 4px; gap: 2px; background: transparent; }
  .download-platform-link {
    grid-template-columns: 30px minmax(0, 1fr) auto;
    gap: 5px 12px;
    align-items: center;
  }
  .platform-icon { width: 30px; height: 30px; border-radius: 9px; }
  .download-platform-link > .download-status { grid-column: 3; justify-self: end; margin: 0; }
  .language-menu { right: -1px; }
}

@media (max-width: 620px) {
  .page-home .site-header:not(.is-scrolled) { background: #0d1929f5; }
}

@media (prefers-reduced-motion: reduce) {
  .site-header, .menu-toggle span, .menu-toggle span::before, .menu-toggle span::after { transition: none; }
  .language-caret, .download-panel, .downloads-toggle .chevron, .downloads-trigger > a::after { transition: none; }
}

