@font-face {
  font-family: Kanit;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/kanit-thai-400.woff2") format("woff2");
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}

@font-face {
  font-family: Kanit;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/kanit-latin-400.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;
}

@font-face {
  font-family: Kanit;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/kanit-thai-600.woff2") format("woff2");
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}

@font-face {
  font-family: Kanit;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/kanit-latin-600.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;
}

@font-face {
  font-family: "Russo One";
  font-weight: 400;
  font-display: swap;
  src: url("fonts/russo-one-latin.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  --surface: #111;
  --line: #373737;
  --accent: #ffd323;
  --red: #e24236;
  --text: #f5f4ef;
  --muted: #c4c4c4;
  --gutter: 0.75rem;
  --side-ad-width: clamp(4.5rem, 8.5vw, 7.5rem);
  --dock-bottom: max(0.375rem, env(safe-area-inset-bottom));
  --dock-width: min(37.5rem, 100vw - 1.5rem);
  --dock-close-space: 2.125rem;
  --dock-row-height: calc(var(--dock-width) * 0.15 + var(--dock-close-space) + 2px);
  --dock-clearance: 0px;
  font-family: Kanit, "Noto Sans Thai", system-ui, sans-serif;
  scroll-behavior: smooth;
  scroll-padding-block: 0.75rem max(1rem, var(--dock-clearance));
}

:root:has(.floating-ad--wide:not([hidden])) {
  --dock-clearance: calc(var(--dock-row-height) + var(--dock-bottom) + 1rem);
}

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

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  padding-bottom: var(--dock-clearance);
  background: #000;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.45;
}

h1, h2, p, dl, dd {
  margin: 0;
}

h1, h2, dt, strong {
  font-weight: 600;
}

a {
  color: inherit;
}

button {
  font: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.shell {
  width: min(66rem, 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 10;
  inset: 0.5rem auto auto 0.5rem;
  transform: translateY(-180%);
  padding: 0.4rem 0.75rem;
  background: var(--accent);
  color: #090909;
}

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

.masthead {
  border-top: 3px solid var(--red);
  border-bottom: 1px solid #272727;
  background: #090909;
}

.masthead__identity {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding-block: 0.65rem;
}

.brand {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: clamp(0.4rem, 1vw, 0.7rem);
  padding-inline-end: 0.2rem;
  font-family: "Russo One", Kanit, system-ui, sans-serif;
  text-decoration: none;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: clamp(1.75rem, 4.5vw, 2.6rem);
  aspect-ratio: 1;
  border: 1px solid #f9a629;
  border-radius: 0.4rem 0.15rem;
  background: linear-gradient(150deg, #6f1d12, #240b09 65%, #100504);
  box-shadow: inset 0 0 0 2px #811b14, 0 2px 0 #50200e, 0 0 0.5rem #b6291b80;
  color: #ffe5a1;
  font-size: clamp(0.8rem, 2.5vw, 1.22rem);
  line-height: 1;
  text-shadow: 0 1px 0 #311007;
  transform: skewX(-8deg);
}

.brand__name {
  color: #fff7e2;
  font-size: clamp(1.45rem, 4.8vw, 3rem);
  letter-spacing: -0.055em;
  line-height: 1.12;
  text-shadow: 0 2px 0 #aa3a25, 0 4px 0 #4f160d, 0 0 0.6em #d33a275c;
  transform: skewX(-8deg);
  white-space: nowrap;
}

.brand__name span {
  display: inline-block;
  margin-inline-start: 0.055em;
  color: #ffd35c;
  letter-spacing: -0.04em;
  text-shadow: none;
  filter: drop-shadow(0 2px 0 #983708) drop-shadow(0 0 0.12em #ff6b24aa);
}

@supports (background-clip: text) {
  .brand__name span {
    background: linear-gradient(#fff3b0 10%, #ffd65d 44%, #f8a519 45%, #ffd24d 88%);
    background-clip: text;
    color: transparent;
    -webkit-text-stroke: 0.35px #ffe6a3;
  }
}

.masthead__summary {
  min-width: 0;
  color: var(--accent);
  font-size: clamp(0.7rem, 2.6vw, 0.875rem);
  overflow-wrap: anywhere;
  text-align: end;
}

.primary-nav {
  display: flex;
  flex-wrap: wrap;
  border: 1px solid #393939;
  background: #171717;
}

.primary-nav a {
  display: grid;
  place-items: center;
  min-height: 2.375rem;
  padding: 0.25rem 0.8rem;
  border-inline-end: 1px solid #393939;
  font-size: 0.9375rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}

.primary-nav a:hover {
  background: #29200a;
  color: var(--accent);
}

.primary-nav a[aria-current] {
  background: var(--accent);
  color: #0b0b0b;
}

.primary-nav a:focus-visible {
  outline-offset: -3px;
}

.primary-nav a[aria-current]:focus-visible {
  outline-color: #202020;
}

.masthead__strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.375rem;
  margin-block: 0.375rem 0.5rem;
}

.ticker {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) auto;
  border: 1px solid #303030;
  background: #080808;
  font-size: 0.875rem;
}

.ticker__label {
  display: grid;
  place-items: center;
  padding: 0.2rem 0.55rem;
  border-inline-end: 1px solid #492723;
  background: #290e0c;
  color: #ffe082;
  font-weight: 600;
}

.ticker__window {
  align-self: center;
  overflow: hidden;
  padding: 0.2rem 0.5rem;
  color: var(--muted);
}

.ticker__text {
  overflow-wrap: anywhere;
}

.ticker[data-moving="true"] .ticker__text {
  position: relative;
  width: max-content;
  animation: ticker-scroll 22s linear infinite;
}

@keyframes ticker-scroll {
  0%, 12%, 100% {
    left: 0;
    transform: none;
  }

  52% {
    left: 0;
    transform: translateX(-110%);
  }

  52.01% {
    left: 100%;
    transform: none;
  }
}

.ticker__toggle, .banner-toggle {
  min-height: 2rem;
  border: 1px solid var(--line);
  background: #151515;
  color: var(--accent);
  cursor: pointer;
}

.ticker__toggle:hover, .banner-toggle:hover {
  background: #29200a;
}

.ticker__toggle:focus-visible, .banner-toggle:focus-visible, .ad__close:focus-visible {
  outline-offset: -3px;
}

.ticker__toggle {
  display: grid;
  place-items: center;
  min-width: 2rem;
  padding: 0;
  border-width: 0 0 0 1px;
}

.banner-toggle {
  padding: 0.1rem 0.55rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.ticker__symbol {
  width: 0;
  height: 0;
  border-block: 0.275rem solid transparent;
  border-inline-start: 0.42rem solid currentColor;
}

.ticker[data-moving="true"] .ticker__symbol {
  width: 0.48rem;
  height: 0.6rem;
  border: 0;
  border-inline: 2px solid currentColor;
}

.portal {
  display: grid;
  grid-template-areas:
    "about sidebar"
    "banners sidebar"
    "details sidebar";
  grid-template-columns: minmax(0, 2.75fr) minmax(0, 1fr);
  align-items: start;
  gap: 0.6rem 1.25rem;
  padding-block: 0.625rem 1.25rem;
}

.profile {
  grid-area: about;
  min-width: 0;
  border: 1px solid var(--line);
  border-left: 3px solid var(--red);
  padding: 0.4rem 0.625rem;
  background: #090909;
}

.profile__identity {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 0.75rem;
}

.profile h1 {
  color: var(--accent);
  font-size: 1.25rem;
  line-height: 1.15;
}

.profile__role, .profile__motto {
  color: var(--muted);
  font-size: 0.875rem;
}

.profile__motto {
  margin-top: 0.15rem;
}

.banner-section {
  grid-area: banners;
  min-width: 0;
}

.section-strip {
  padding: 0.2rem 0.55rem;
  border: 1px solid #373737;
  border-left: 3px solid var(--red);
  background: #151515;
  color: var(--accent);
  font-size: 1rem;
  line-height: 1.4;
}

.section-strip--muted {
  border-left-color: #535353;
  color: var(--muted);
}

.banner-stack {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.375rem;
}

.banner {
  display: block;
  min-width: 0;
  border: 2px solid #383838;
  background: #000;
  text-decoration: none;
}

.banner picture, .banner img {
  display: block;
  width: 100%;
}

.banner img {
  height: auto;
  object-fit: contain;
}

.banner:nth-child(3n + 1) {
  border-color: #dcae0a;
}

.banner:nth-child(3n + 2) {
  border-color: #be3127;
}

.banner:hover, .banner:focus-visible {
  border-color: #fff0aa;
}

.banner:hover img {
  filter: brightness(1.07);
}

.portal-sidebar {
  grid-area: sidebar;
  display: grid;
  min-width: 0;
  gap: 0.625rem;
}

.side-ads, .portal-details {
  display: grid;
  min-width: 0;
  gap: 0.55rem;
}

.portal-details {
  grid-area: details;
}

.panel {
  border: 1px solid #272727;
  background: var(--surface);
}

.panel .section-strip {
  border-top: 0;
  border-right: 0;
}

.detail-list > div {
  display: grid;
  grid-template-columns: minmax(7rem, 0.45fr) minmax(0, 1fr);
  gap: 0.125rem 0.5rem;
  padding: 0.35rem 0.625rem;
}

.detail-list > div + div {
  border-top: 1px solid #262626;
}

.detail-list dd, .prose p {
  color: var(--muted);
}

.prose p {
  padding: 0.5rem 0.625rem;
}

.ad {
  border: 1px solid #525252;
  background: #000;
}

.ad__space {
  display: block;
  width: 100%;
  max-width: var(--ad-width, 100%);
  margin-inline: auto;
  aspect-ratio: var(--ad-ratio);
  background: #000;
}

.ad__space img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ad--rail-square {
  --ad-ratio: 300 / 250;
  border-color: #584817;
}

.ad--rail-tall {
  --ad-ratio: 270 / 540;
  border-color: #622823;
}

.ad--inline {
  --ad-width: 45.5rem;
  --ad-ratio: 728 / 90;
}

.floating-ad {
  position: fixed;
  z-index: 4;
  bottom: var(--dock-bottom);
  box-shadow: 0 0 0 1px #141414;
}

.floating-ad--side {
  --ad-ratio: 120 / 360;
  width: var(--side-ad-width);
}

.floating-ad--left {
  left: max(0.5rem, env(safe-area-inset-left));
}

.floating-ad--right {
  right: max(0.5rem, env(safe-area-inset-right));
}

.floating-ad--wide {
  --ad-ratio: 600 / 90;
  left: 50%;
  width: var(--dock-width);
  transform: translateX(-50%);
}

.ad__close {
  position: absolute;
  right: -1px;
  bottom: calc(100% + 0.125rem);
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid #686868;
  border-radius: 0.16rem;
  background: #161616;
  color: #fff;
  font: 1.65rem/1 system-ui, sans-serif;
  cursor: pointer;
}

.ad__close:hover {
  border-color: var(--accent);
  background: #211704;
  color: var(--accent);
}

.site-footer {
  border-block: 1px solid #292929;
  background: #0a0a0a;
  color: var(--muted);
}

.site-footer__inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  padding-block: 0.75rem;
  font-size: 0.875rem;
}

.site-footer strong, .site-footer a {
  color: var(--accent);
}

@media (min-width: 75rem) {
  :root {
    --gutter: calc(var(--side-ad-width) + 1.25rem);
  }
}

@media (width < 75rem), (height < 31rem) {
  .floating-ad--side {
    display: none;
  }
}

@media (max-width: 48rem), (height < 31rem) {
  :root {
    --dock-close-space: 0px;
    --dock-width: min(20rem, 100vw - 1.25rem);
    --dock-row-height: max(2.75rem, calc(var(--dock-width) * 0.15 + 2px));
  }

  .floating-ad--wide {
    min-height: var(--dock-row-height);
  }

  .floating-ad--wide .ad__close {
    top: -1px;
    bottom: auto;
    width: 2.75rem;
    height: 2.75rem;
  }
}

@media (max-width: 48rem) {
  .portal {
    grid-template-areas: "about" "banners" "sidebar" "details";
    grid-template-columns: minmax(0, 1fr);
  }

  .portal-sidebar .banner-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .side-ads {
    display: none;
  }
}

@media (max-width: 38rem) {
  .primary-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .primary-nav a {
    min-height: 2.75rem;
    padding-inline: 0.25rem;
    font-size: 0.875rem;
    line-height: 1.2;
  }

  .primary-nav a:nth-child(3n) {
    border-inline-end: 0;
  }

  .primary-nav a:nth-child(-n + 3) {
    border-bottom: 1px solid var(--line);
  }

  .detail-list > div {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  :root {
    scroll-behavior: auto;
  }
}
