/* ===== โทเคน: สีเน้นมีสีเดียว (เขียวจอเทอร์มินัล) ใช้กับสถานะ / ปุ่มหลัก / ตัวเลขสำคัญเท่านั้น ===== */
:root {
  color-scheme: dark;
  --bg: #0a0c0b;
  --bg-raise: #0f1211;
  --panel: #121614;
  --panel-2: #181d1b;
  --line: #222a27;
  --line-2: #2f3934;
  --text: #e8ede9;
  --muted: #a3aea8;
  --faint: #717d77;
  --accent: #43e089;
  --accent-hover: #62ee9f;
  --accent-ink: #03140a;
  --accent-soft: rgba(67, 224, 137, 0.1);
  --accent-line: rgba(67, 224, 137, 0.38);
  --grid: rgba(255, 255, 255, 0.035);

  --font: "Geist", "Anuphan", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", "Anuphan", ui-monospace, "Cascadia Code", Consolas, monospace;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
  --r-xl: 20px;
  --r-lg: 16px;
  --r: 12px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img,
video {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

p,
dl,
dd,
figure {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

.icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: currentColor;
}

.k {
  color: var(--accent);
}

/* ===== ปุ่ม ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  max-width: 100%;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 11px;
  font: 600 15.5px/1.2 var(--font);
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s var(--ease);
}

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

.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn--primary:hover {
  background: var(--accent-hover);
}

.btn--ghost {
  background: transparent;
  border-color: var(--line-2);
  color: var(--text);
}

.btn--ghost:hover {
  background: var(--panel-2);
  border-color: var(--faint);
}

.btn--sm {
  min-height: 38px;
  padding: 0 14px;
  font-size: 14px;
  border-radius: 9px;
}

.btn--lg {
  min-height: 52px;
  padding: 0 22px;
}

.btn__mono {
  font-family: var(--mono);
  font-weight: 500;
}

.btn.is-copied {
  border-color: var(--accent-line);
}

.btn--primary.is-copied {
  background: var(--text);
  color: var(--bg);
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.icon-btn:hover {
  color: var(--text);
  border-color: var(--faint);
}

/* ===== ป้ายสถานะรับงาน ===== */
.status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font: 500 12.5px/1 var(--mono);
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.status:hover {
  border-color: var(--accent-line);
}

.status .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.4s var(--ease) infinite;
}

.status.is-closed .dot {
  background: var(--faint);
  animation: none;
}

.status__short {
  display: none;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(67, 224, 137, 0.5);
  }
  70%,
  100% {
    box-shadow: 0 0 0 8px rgba(67, 224, 137, 0);
  }
}

/* ===== แถบบน ===== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 12, 11, 0.78);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.topbar.is-scrolled {
  border-bottom-color: var(--line);
}

.topbar__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  font: 500 15px/1 var(--mono);
  text-decoration: none;
  white-space: nowrap;
}

.brand__user {
  color: var(--accent);
}

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

.brand__caret {
  width: 0.55em;
  height: 1.1em;
  margin-left: 5px;
  background: var(--accent);
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.nav {
  display: flex;
  gap: 2px;
  margin-left: 12px;
}

.nav a {
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 15px;
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}

.nav a:hover {
  color: var(--text);
  background: var(--panel);
}

.nav a[aria-current="true"] {
  color: var(--text);
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.nav-toggle {
  display: none;
}

/* ===== หัวเว็บ ===== */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
  align-items: center;
  gap: clamp(32px, 6vw, 72px);
  padding-block: clamp(48px, 8vw, 104px) clamp(32px, 5vw, 56px);
}

.hero__label {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-bottom: 22px;
  font: 500 13.5px/1.4 var(--mono);
  color: var(--muted);
}

.hero__title {
  max-width: 15ch;
  font-size: clamp(38px, 6vw, 74px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.hero__title em {
  font-style: normal;
  color: var(--accent);
}

.hero__lede {
  max-width: 56ch;
  margin-top: 24px;
  color: var(--muted);
  font-size: clamp(17px, 1.5vw, 19px);
}

.hero__lede strong {
  color: var(--text);
  font-weight: 600;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 28px;
  font: 500 13px/1.4 var(--mono);
  color: var(--faint);
}

.hero__meta li {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.hero__meta li::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 1px;
  background: var(--line-2);
}

.avatar {
  position: relative;
  justify-self: end;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background:
    radial-gradient(circle at 55% 62%, rgba(67, 224, 137, 0.1), transparent 58%),
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 28px 28px,
    var(--bg-raise);
  overflow: hidden;
}

.avatar::before,
.avatar::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  border: 2px solid var(--accent);
  opacity: 0.7;
}

.avatar::before {
  top: 14px;
  left: 14px;
  border-right: 0;
  border-bottom: 0;
}

.avatar::after {
  right: 14px;
  bottom: 14px;
  border-left: 0;
  border-top: 0;
}

.avatar img {
  width: 100%;
  height: 100%;
  padding: 8% 6% 12%;
  object-fit: contain;
  filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.55));
}

.avatar figcaption {
  position: absolute;
  left: 14px;
  bottom: 14px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(10, 12, 11, 0.82);
  font: 500 12px/1 var(--mono);
  color: var(--muted);
}

@media (prefers-reduced-motion: no-preference) {
  .hero > * {
    animation: rise 0.7s var(--ease) both;
  }

  .hero > :nth-child(2) {
    animation-delay: 0.1s;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

/* ===== แผงตัวเลขสด ===== */
.monitor {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--panel);
  overflow: hidden;
}

.monitor__bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font: 500 12.5px/1 var(--mono);
  color: var(--faint);
}

.monitor__dots {
  display: inline-flex;
  gap: 6px;
}

.monitor__dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line-2);
}

.monitor__file {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  color: var(--accent);
  white-space: nowrap;
}

.live::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 2.4s var(--ease) infinite;
}

.live[data-state="loading"],
.live[data-state="snapshot"] {
  color: var(--faint);
}

.live[data-state="loading"]::before,
.live[data-state="snapshot"]::before {
  animation: none;
}

.monitor__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 2.75fr);
}

.monitor__game {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 20px;
  border-right: 1px solid var(--line);
}

.monitor__game img {
  width: 56px;
  height: 56px;
  flex: none;
  border-radius: 12px;
}

.monitor__name {
  font-weight: 600;
  font-size: 17px;
  line-height: 1.35;
}

.monitor__sub {
  margin-top: 2px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

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

.stat {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 22px 20px;
  border-right: 1px solid var(--line);
}

.stat:last-child {
  border-right: 0;
}

.stat dt,
.game__stats dt {
  font: 500 12px/1.3 var(--mono);
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat dd {
  font: 600 clamp(24px, 2.7vw, 34px)/1 var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.stat--now dd {
  color: var(--accent);
}

.monitor__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  font: 500 12.5px/1.4 var(--mono);
  color: var(--faint);
}

/* ===== หัวข้อ section ===== */
.section {
  padding-top: clamp(72px, 10vw, 128px);
}

.section__head {
  max-width: 780px;
  margin-bottom: clamp(28px, 4vw, 44px);
}

.kicker {
  margin-bottom: 16px;
  font: 500 13px/1 var(--mono);
  color: var(--accent);
}

.section__head h2 {
  font-size: clamp(30px, 4.2vw, 48px);
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.section__lede {
  max-width: 62ch;
  margin-top: 16px;
  color: var(--muted);
  font-size: 18px;
}

/* ===== เคส RCA ===== */
.shots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.shot,
.media__zoom,
.game__media {
  padding: 0;
  border: 0;
  background: var(--bg-raise);
  cursor: zoom-in;
}

.shot {
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.shot:hover img {
  transform: scale(1.02);
}

/* เคส 4 ใบ เรียง 2x2 (จอเล็กกว่า 880px เหลือคอลัมน์เดียว) */
.cases {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.case {
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 3vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--panel);
}

.case__label {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 500 12.5px/1 var(--mono);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.case__letter {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--accent-line);
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent);
}

.case h3 {
  margin-top: 16px;
  font-size: clamp(24px, 2.6vw, 30px);
  letter-spacing: -0.025em;
}

.case__lede {
  max-width: 60ch;
  margin-top: 12px;
  font-size: 17.5px;
}

.case__points {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.case__points li {
  position: relative;
  max-width: 64ch;
  padding-left: 22px;
  color: var(--muted);
  font-size: 16px;
}

.case__points li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.78em;
  width: 9px;
  height: 2px;
  background: var(--accent);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.tags li {
  padding: 7px 10px;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  font: 500 12.5px/1 var(--mono);
  color: var(--muted);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-top: auto;
  padding-top: 22px;
}

.metric {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-raise);
}

.metric__v {
  display: block;
  font: 600 24px/1.1 var(--mono);
  color: var(--accent);
  white-space: nowrap;
}

.metric__k {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}

/* ===== การ์ดผลงาน ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 16px;
}

.card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--panel);
  overflow: hidden;
  transition: border-color 0.2s;
}

.card:hover {
  border-color: var(--line-2);
}

.media {
  position: relative;
  aspect-ratio: 16 / 9;
  min-height: 188px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-raise);
  overflow: hidden;
}

.media > video,
.media > iframe,
.media__play,
.media__zoom,
.cover,
.diagram {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.media video,
.media__play img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media__zoom img {
  width: 100%;
  height: 100%;
  padding: 14px;
  object-fit: contain;
}

.media__play {
  display: grid;
  place-items: center;
  padding: 0;
  background: none;
  cursor: pointer;
}

.media__play img {
  position: absolute;
  inset: 0;
  transition: transform 0.5s var(--ease), opacity 0.2s;
}

.media__play:hover img {
  transform: scale(1.02);
}

.media__btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(10, 12, 11, 0.8);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  font-size: 14.5px;
  font-weight: 600;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.media__btn .icon {
  fill: currentColor;
}

.media__play:hover .media__btn,
.media__play:focus-visible .media__btn {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.cover {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  background:
    radial-gradient(90% 80% at 100% 0%, rgba(67, 224, 137, 0.08), transparent 60%),
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 24px 24px,
    var(--bg-raise);
}

.cover__title {
  max-width: 12ch;
  font-size: clamp(24px, 2.4vw, 30px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.cover__note {
  margin-top: 10px;
  font: 500 12px/1 var(--mono);
  color: var(--faint);
}

/* แผนภาพขั้นตอน (การ์ดที่ยังไม่มีคลิป) */
.diagram {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 16px 18px;
  background:
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 24px 24px,
    var(--bg-raise);
}

.diagram__cap {
  margin-bottom: 10px;
  font: 500 11px/1 var(--mono);
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.diagram ol {
  display: grid;
  gap: 6px;
}

.diagram li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border: 1px solid var(--line-2);
  border-radius: 7px;
  background: rgba(18, 22, 20, 0.92);
  font: 500 12.5px/1.3 var(--mono);
}

.diagram li:last-child {
  border-color: var(--accent-line);
  color: var(--accent);
}

.diagram .n {
  flex: none;
  color: var(--accent);
  font-size: 11px;
}

.card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 20px 20px 22px;
}

.card__kicker {
  font: 500 12px/1.3 var(--mono);
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.card__title {
  font-size: 20px;
  letter-spacing: -0.015em;
}

.card__desc {
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.55;
}

.card .tags {
  margin-top: auto;
  padding-top: 8px;
}

/* ===== เกมเต็ม ===== */
.games {
  display: grid;
  gap: 16px;
}

.game {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--panel);
  overflow: hidden;
}

.game__media {
  display: block;
  position: relative;
  min-height: 240px;
  border-right: 1px solid var(--line);
}

.game__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game__media--contain img {
  padding: 16px;
  object-fit: contain;
}

.game__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: clamp(22px, 3vw, 36px);
}

.game__body h3 {
  font-size: clamp(22px, 2.3vw, 28px);
  letter-spacing: -0.02em;
}

.game__desc {
  color: var(--muted);
  font-size: 16px;
}

.game__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 4px;
}

.game__stats dd {
  margin-top: 6px;
  font: 600 22px/1 var(--mono);
  font-variant-numeric: tabular-nums;
}

.game__stats div:first-child dd {
  color: var(--accent);
}

.game__link {
  align-self: flex-start;
  margin-top: 6px;
}

/* การ์ดเกมใหญ่ (Born Anywhere): วิดีโอ + ภาพ ซ้าย, ข้อมูล ขวา, จุดเด่น 3 ข้อเต็มความกว้างข้างล่าง */
.game--feature {
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
}

.game__gallery {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: clamp(14px, 2vw, 20px);
  border-right: 1px solid var(--line);
  background:
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 24px 24px,
    var(--bg-raise);
}

.game__video {
  position: relative;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  background: var(--bg);
  overflow: hidden;
}

.game__video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.game__thumb {
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--bg);
  overflow: hidden;
  cursor: zoom-in;
  transition: border-color 0.15s;
}

.game__thumb:hover {
  border-color: var(--faint);
}

.game__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.game__thumb:hover img {
  transform: scale(1.03);
}

.game__head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.game__icon {
  width: 56px;
  height: 56px;
  flex: none;
  border-radius: 12px;
}

.game__head .card__kicker {
  margin-bottom: 6px;
}

.role {
  display: inline-flex;
  align-self: flex-start;
  border: 1px solid var(--accent-line);
  border-radius: 8px;
  overflow: hidden;
  font: 500 12.5px/1 var(--mono);
}

.role__k {
  padding: 8px 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.role__v {
  padding: 8px 12px;
  border-left: 1px solid var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

.game__desc strong {
  color: var(--text);
  font-weight: 600;
}

.game__points {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.game__points li {
  padding: 22px clamp(18px, 2.4vw, 26px);
  border-right: 1px solid var(--line);
}

.game__points li:last-child {
  border-right: 0;
}

.game__points h4 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.game__points p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.game__points .game__metric {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-raise);
}

.game__metric-v {
  display: block;
  font: 600 22px/1.1 var(--mono);
  color: var(--accent);
  white-space: nowrap;
}

.game__metric-k {
  display: block;
  margin-top: 6px;
  font-size: 13.5px;
  line-height: 1.4;
}

.game__credit {
  grid-column: 1 / -1;
  padding: 12px clamp(18px, 2.4vw, 26px);
  border-top: 1px solid var(--line);
  font: 500 12.5px/1.5 var(--mono);
  color: var(--muted);
}

.game__credit a {
  color: var(--text);
  text-decoration-color: var(--line-2);
  text-underline-offset: 3px;
}

.game__credit a:hover {
  color: var(--text);
}

/* ===== จ้างงาน ===== */
.hire {
  padding-block: clamp(72px, 10vw, 128px);
}

.hire__panel {
  padding: clamp(24px, 5vw, 56px);
  border: 1px solid var(--accent-line);
  border-radius: var(--r-xl);
  background:
    radial-gradient(110% 90% at 100% 0%, rgba(67, 224, 137, 0.08), transparent 55%),
    var(--panel);
}

.hire h2 {
  font-size: clamp(32px, 4.6vw, 56px);
  letter-spacing: -0.035em;
}

.hire__lede {
  max-width: 54ch;
  margin-top: 14px;
  color: var(--muted);
  font-size: 18px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 36px;
}

.steps li {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--bg-raise);
}

.steps__n {
  font: 500 12.5px/1 var(--mono);
  color: var(--accent);
}

.steps h3 {
  margin-top: 12px;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.steps p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 15px;
}

.contact {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

/* ===== ท้ายเว็บ / ป๊อปอัป ===== */
.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-block: 28px 40px;
  border-top: 1px solid var(--line);
  font: 500 13px/1.4 var(--mono);
  color: var(--faint);
}

.foot a {
  color: var(--muted);
  text-decoration: none;
}

.foot a:hover {
  color: var(--text);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 80;
  max-width: calc(100% - 32px);
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--text);
  color: var(--bg);
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.4;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
  transform: translateX(-50%);
  animation: toast-in 0.25s var(--ease);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, 8px);
  }
}

.lightbox {
  max-width: min(1200px, 94vw);
  max-height: 92vh;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}

.lightbox::backdrop {
  background: rgba(5, 6, 6, 0.88);
}

.lightbox img {
  max-width: min(1200px, 94vw);
  max-height: 86vh;
  width: auto;
  height: auto;
  border: 1px solid var(--line-2);
  border-radius: 12px;
}

.lightbox__close {
  position: absolute;
  top: -50px;
  right: 0;
  background: var(--panel);
  color: var(--text);
}

/* ===== จอกลาง / มือถือ ===== */
@media (max-width: 980px) {
  .monitor__grid {
    grid-template-columns: 1fr;
  }

  .monitor__game {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

  /* จอกลาง: วิดีโอขึ้นบนเต็มกว้าง ไม่งั้นคอลัมน์ซ้ายสั้นกว่าข้อความแล้วเหลือที่ว่าง */
  .game--feature {
    grid-template-columns: 1fr;
  }

  .game__gallery {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 880px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .avatar {
    justify-self: start;
    max-width: 300px;
  }

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

@media (max-width: 820px) {
  .nav-toggle {
    display: inline-grid;
  }

  .nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 4px var(--gutter) 12px;
    border-bottom: 1px solid var(--line);
    background: var(--bg);
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    padding: 14px 2px;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    font-size: 17px;
  }

  .nav a:last-child {
    border-bottom: 0;
  }

  .nav a:hover {
    background: none;
  }
}

@media (max-width: 760px) {
  .monitor__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat:nth-child(2) {
    border-right: 0;
  }

  .stat:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

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

  .game__media {
    aspect-ratio: 16 / 9;
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 600px) {
  .shots,
  .steps {
    grid-template-columns: 1fr;
  }

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

  .game__points li {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .game__points li:last-child {
    border-bottom: 0;
  }

  .game__thumbs {
    gap: 8px;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 16px;
  }

  .topbar .status__long {
    display: none;
  }

  .topbar .status__short {
    display: inline;
  }

  .hero__actions .btn,
  .contact .btn {
    width: 100%;
  }

  .stat {
    padding: 18px 16px;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
