/* ชาวเน็ต — สัดส่วนมือถือ/คอม ให้สมดุล */
:root {
  --red: #e10600;
  --red-hot: #ff1a14;
  --black: #0a0a0a;
  --ink: #141414;
  --white: #fff;
  --line: #ebebeb;
  --meta: #8f8f8f;
  --max: 1080px;
  --article-max: 720px;
  --header-h: 56px;
  --gutter: 16px;
  --section-y: 28px;
  --radius: 4px;
  --font: "Prompt", "Sukhumvit Set", "Kanit", system-ui, sans-serif;
  --touch: 44px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button {
  font: inherit;
  border: 0;
  background: none;
  cursor: pointer;
  color: inherit;
}

ul, ol {
  margin: 0;
  padding: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ========== Header ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--black);
  height: var(--header-h);
  padding-top: env(safe-area-inset-top, 0);
}

.site-header__inner {
  max-width: var(--max);
  margin: 0 auto;
  height: var(--header-h);
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 20px 0 12px;
  background: var(--red);
  color: var(--white);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  line-height: 1;
  clip-path: polygon(
    0 0,
    86% 0,
    90% 10%,
    88% 22%,
    96% 34%,
    90% 48%,
    100% 58%,
    92% 72%,
    98% 86%,
    88% 100%,
    0 100%
  );
}

.logo span {
  display: inline-block;
}

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

/* เมนูคอม — ซ่อนบนมือถือ */
.nav-desktop,
.header-search {
  display: none;
}

.icon-btn {
  width: var(--touch);
  height: var(--touch);
  display: grid;
  place-items: center;
  color: var(--white);
  border-radius: var(--radius);
}

.icon-btn:hover,
.icon-btn:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.icon-btn svg {
  width: 22px;
  height: 22px;
}

/* ========== Breaking ========== */
.breaking {
  background: var(--black);
  border-top: 1px solid #222;
}

.breaking__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 8px var(--gutter);
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.breaking__badge {
  flex: 0 0 auto;
  background: var(--red);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 800;
  font-style: normal;
  letter-spacing: 0.04em;
  padding: 5px 8px;
  line-height: 1;
  border-radius: 2px;
}

.breaking__text {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--white);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.breaking__chev {
  flex: 0 0 auto;
  color: var(--red);
  font-weight: 800;
  font-size: 1.15rem;
  line-height: 1;
}

.breaking--compact .breaking__inner {
  padding-top: 7px;
  padding-bottom: 7px;
}

.breaking--compact .breaking__text {
  -webkit-line-clamp: 1;
  white-space: nowrap;
  display: block;
  text-overflow: ellipsis;
}

/* ========== Hero ========== */
.hero {
  position: relative;
  background: #000;
  color: var(--white);
  isolation: isolate;
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  filter: grayscale(0.35) contrast(1.06) brightness(0.82);
}

.hero__shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.45) 42%, rgba(0, 0, 0, 0.9) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.12) 60%, rgba(0, 0, 0, 0.3) 100%);
}

.hero__inner {
  position: relative;
  z-index: 2;
  max-width: var(--max);
  margin: 0 auto;
  padding: 40px var(--gutter) 52px;
  min-height: min(58vh, 480px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.hero__watermark {
  position: absolute;
  left: 50%;
  top: 4%;
  transform: translate(-50%, 0);
  width: min(100%, 20ch);
  text-align: center;
  font-size: clamp(2.6rem, 13vw, 5.5rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 0.9;
  color: rgba(255, 255, 255, 0.26);
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  z-index: 2;
}

.hero__copy {
  position: relative;
  z-index: 3;
  max-width: 36rem;
  padding-left: 12px;
  margin-bottom: 0;
  border-left: 4px solid var(--red);
}

.hero__label {
  margin: 0 0 8px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.78);
}

.hero__title {
  margin: 0;
  font-size: clamp(1.4rem, 5.2vw, 2.25rem);
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: -0.015em;
}

.hero__sub {
  margin: 10px 0 0;
  font-size: clamp(0.92rem, 2.6vw, 1.05rem);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.5;
  max-width: 34em;
}

.btn-read {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  min-height: 44px;
  background: var(--red);
  color: var(--white);
  font-weight: 700;
  font-size: 0.92rem;
  padding: 0 18px;
  border-radius: var(--radius);
  transition: background 0.15s ease, transform 0.15s ease;
}

.btn-read:hover {
  background: var(--red-hot);
}

.btn-read:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.btn-read svg {
  width: 14px;
  height: 14px;
}

.hero__tear {
  position: absolute;
  left: -1px;
  right: -1px;
  bottom: -1px;
  height: 16px;
  z-index: 4;
  color: var(--white);
  pointer-events: none;
  line-height: 0;
}

.hero__tear svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ========== News list ========== */
.viral {
  background: var(--white);
  padding: var(--section-y) 0 calc(var(--section-y) + 12px);
}

.viral__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.viral__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  min-height: 36px;
}

.viral__badge {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  background: var(--red);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 800;
  padding: 7px 14px 7px 11px;
  clip-path: polygon(0 0, 90% 0, 100% 50%, 90% 100%, 0 100%);
  line-height: 1;
}

.viral__heading {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.viral__all {
  display: none;
}

.viral-list {
  list-style: none;
}

.viral-item {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 16px;
  gap: 12px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  min-height: 92px;
}

.viral-list > li:last-child .viral-item {
  border-bottom: 0;
}

.viral-item__thumb {
  position: relative;
  width: 88px;
  height: 66px;
  overflow: hidden;
  background: #1a1a1a;
  flex-shrink: 0;
}

.viral-item__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.25) contrast(1.04);
}

.viral-item__rank {
  position: absolute;
  top: 0;
  left: 0;
  width: 22px;
  height: 22px;
  background: var(--red);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  z-index: 1;
}

.viral-item__body {
  min-width: 0;
}

.viral-item__title {
  margin: 0;
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1.38;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.viral-item__meta {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 8px;
  row-gap: 2px;
  font-size: 0.7rem;
  color: var(--meta);
  font-weight: 500;
  line-height: 1.3;
}

.viral-item__hot {
  color: var(--red);
  font-weight: 700;
}

.viral-item__dot::before {
  content: "·";
  margin-right: 8px;
  color: #c4c4c4;
}

.viral-item__chev {
  color: var(--red);
  font-size: 1.1rem;
  font-weight: 800;
  justify-self: end;
  line-height: 1;
}

.viral-item:hover .viral-item__title,
.viral-item:focus-visible .viral-item__title {
  color: var(--red);
}

/* ========== Article ========== */
.article {
  max-width: var(--article-max);
  margin: 0 auto;
  padding: 20px var(--gutter) 36px;
}

.article__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  margin-bottom: 8px;
  font-weight: 700;
  font-size: 0.9rem;
}

.article__back:hover {
  color: var(--red);
}

.article__kicker {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 5px 9px;
  margin-bottom: 10px;
  border-radius: 2px;
}

.article h1 {
  margin: 0 0 10px;
  font-size: clamp(1.35rem, 4.4vw, 2rem);
  line-height: 1.32;
  font-weight: 800;
  letter-spacing: -0.015em;
}

.article__meta {
  color: var(--meta);
  font-size: 0.84rem;
  margin: 0 0 18px;
  line-height: 1.4;
}

.article__cover {
  margin: 0 0 8px;
  overflow: hidden;
  background: #111;
  aspect-ratio: 16 / 9;
}

.article__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.2) contrast(1.03);
}

.article__caption {
  margin: 0 0 18px;
  font-size: 0.8rem;
  color: var(--meta);
  line-height: 1.4;
}

.article__body {
  font-size: 1.02rem;
  line-height: 1.78;
  color: #222;
}

.article__body p {
  margin: 0 0 1em;
}

.article__body h2 {
  margin: 1.4em 0 0.55em;
  font-size: 1.18rem;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.article__body ul {
  margin: 0 0 1.15em;
  padding-left: 1.15em;
}

.article__body li {
  margin-bottom: 0.45em;
}

.article__figure {
  margin: 1.25em 0 1.35em;
}

.article__figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #111;
  filter: grayscale(0.15) contrast(1.03);
}

.article__figure figcaption {
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--meta);
  line-height: 1.45;
}

.article__sources {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 0.86rem;
  color: #666;
  line-height: 1.55;
}

.article__sources a {
  color: var(--red);
  font-weight: 600;
}

.related {
  margin-top: 32px;
  padding-top: 4px;
}

.related__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.related__heading {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
}

.related__list {
  list-style: none;
}

.related__item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 16px;
  gap: 10px;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  min-height: 52px;
}

.related__list > li:last-child .related__item {
  border-bottom: 0;
}

.related__item:hover .related__title {
  color: var(--red);
}

.related__tag {
  background: var(--red);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 800;
  padding: 4px 7px;
  white-space: nowrap;
  border-radius: 2px;
}

.related__title {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.35;
}

.related__chev {
  color: var(--red);
  font-weight: 800;
  justify-self: end;
}

/* ========== Footer ========== */
.site-footer {
  background: #080808;
  color: #9a9a9a;
  font-size: 0.86rem;
  margin-top: 4px;
}

.site-footer__accent {
  height: 3px;
  background: var(--red);
}

.site-footer__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 22px var(--gutter) 16px;
  display: grid;
  gap: 12px;
}

.site-footer__top {
  display: grid;
  gap: 14px;
  justify-items: start;
}

.logo--footer {
  min-height: 32px;
  font-size: 0.98rem;
  padding: 0 18px 0 11px;
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
}

.site-footer__nav a {
  color: #cfcfcf;
  font-weight: 700;
  font-size: 0.88rem;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
}

.site-footer__nav a:hover,
.site-footer__nav a:focus-visible {
  color: var(--white);
  outline: none;
}

.site-footer__text {
  margin: 0;
  line-height: 1.5;
  color: #7e7e7e;
  font-size: 0.8rem;
}

.site-footer__bottom {
  border-top: 1px solid #1d1d1d;
  background: #050505;
}

.site-footer__bottom-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 12px var(--gutter) calc(14px + env(safe-area-inset-bottom, 0px));
}

.site-footer__bottom-inner p {
  margin: 0;
  font-size: 0.76rem;
  color: #666;
}

/* ========== Drawer / search ========== */
.search-panel {
  display: none;
  position: fixed;
  inset: calc(var(--header-h) + env(safe-area-inset-top, 0px)) 0 0;
  background: rgba(8, 8, 8, 0.97);
  color: var(--white);
  z-index: 40;
  padding: 20px var(--gutter) 32px;
  overflow-y: auto;
}

.drawer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 60;
}

body.is-menu-open .drawer,
body.is-search-open .search-panel {
  display: block;
}

body.is-menu-open,
body.is-search-open {
  overflow: hidden;
}

.drawer__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  cursor: pointer;
  animation: drawerFade 0.22s ease;
}

.drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(86vw, 360px);
  background: linear-gradient(180deg, #111 0%, #0a0a0a 100%);
  color: var(--white);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  padding:
    calc(14px + env(safe-area-inset-top, 0px))
    16px
    calc(16px + env(safe-area-inset-bottom, 0px));
  animation: drawerSlide 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid #242424;
}

.drawer__brand {
  display: grid;
  gap: 2px;
}

.drawer__brand-mark {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  padding: 0 12px 0 8px;
  background: var(--red);
  color: #fff;
  font-weight: 800;
  font-size: 0.92rem;
  clip-path: polygon(0 0, 88% 0, 100% 50%, 88% 100%, 0 100%);
}

.drawer__brand-sub {
  color: #8f8f8f;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding-left: 2px;
}

.drawer__close {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #1a1a1a;
  color: #fff;
  border: 1px solid #2e2e2e;
}

.drawer__close svg {
  width: 18px;
  height: 18px;
}

.drawer__close:hover,
.drawer__close:focus-visible {
  background: #242424;
  outline: none;
}

.drawer__nav {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  overflow-y: auto;
  flex: 1 1 auto;
  padding-bottom: 12px;
}

.drawer__link {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #141414;
  border: 1px solid #222;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.drawer__link:active {
  transform: scale(0.985);
}

.drawer__link:hover,
.drawer__link:focus-visible {
  background: #1a1a1a;
  border-color: #333;
  outline: none;
}

.drawer__link--hot {
  background: linear-gradient(135deg, #1a0808 0%, #141414 55%);
  border-color: #3a1515;
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.drawer__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 8px;
  background: var(--red);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  border-radius: 999px;
}

.drawer__link-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.drawer__link-text strong {
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.3;
  color: #fff;
}

.drawer__link-text small {
  font-size: 0.75rem;
  color: #8a8a8a;
  font-weight: 500;
  line-height: 1.3;
}

.drawer__chev {
  color: var(--red);
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
}

.drawer__foot {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid #222;
}

.drawer__foot p {
  margin: 0;
  color: #6f6f6f;
  font-size: 0.75rem;
  font-weight: 600;
}

@keyframes drawerFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes drawerSlide {
  from { transform: translateX(18px); opacity: 0.7; }
  to { transform: translateX(0); opacity: 1; }
}

.search-panel form {
  max-width: 560px;
  margin: 28px auto 0;
  display: flex;
  gap: 8px;
}

.search-panel input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  background: #171717;
  border: 1px solid #333;
  color: var(--white);
  padding: 0 14px;
  font: inherit;
  border-radius: var(--radius);
}

.search-panel button[type="submit"] {
  min-height: 48px;
  background: var(--red);
  color: var(--white);
  padding: 0 16px;
  border-radius: var(--radius);
  font-weight: 700;
  white-space: nowrap;
}

/* ========== Tablet ========== */
@media (min-width: 640px) {
  :root {
    --gutter: 22px;
    --section-y: 34px;
  }

  .breaking__text {
    font-size: 0.88rem;
    -webkit-line-clamp: 1;
    white-space: nowrap;
    display: block;
    text-overflow: ellipsis;
  }

  .viral-item {
    grid-template-columns: 112px minmax(0, 1fr) 18px;
    gap: 16px;
    padding: 16px 0;
  }

  .viral-item__thumb {
    width: 112px;
    height: 78px;
  }

  .viral-item__title {
    font-size: 1.02rem;
  }

  .viral-item__meta {
    font-size: 0.76rem;
  }
}

/* ========== Desktop ========== */
@media (min-width: 900px) {
  :root {
    --header-h: 68px;
    --gutter: 28px;
    --section-y: 40px;
  }

  .site-header {
    border-bottom: 1px solid #1c1c1c;
  }

  .site-header__inner {
    gap: 20px;
  }

  .logo {
    min-height: 38px;
    font-size: 1.18rem;
    padding: 0 22px 0 14px;
    flex: 0 0 auto;
  }

  .nav-desktop {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    gap: 4px;
    min-width: 0;
  }

  .nav-desktop__link {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 40px;
    padding: 0 14px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    border-radius: 3px;
    white-space: nowrap;
    transition: color 0.15s ease, background 0.15s ease;
  }

  .nav-desktop__link::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 7px;
    height: 2px;
    background: var(--red);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.18s ease;
  }

  .nav-desktop__link:hover,
  .nav-desktop__link:focus-visible {
    color: var(--white);
    background: rgba(255, 255, 255, 0.04);
    outline: none;
  }

  .nav-desktop__link:hover::after,
  .nav-desktop__link:focus-visible::after {
    transform: scaleX(1);
  }

  .nav-desktop__link--hot {
    margin-left: 6px;
    color: var(--white);
    background: var(--red);
  }

  .nav-desktop__link--hot::after {
    display: none;
  }

  .nav-desktop__link--hot:hover,
  .nav-desktop__link--hot:focus-visible {
    background: var(--red-hot);
    color: var(--white);
  }

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

  .header-search {
    display: flex;
    align-items: center;
    width: min(240px, 22vw);
    height: 40px;
    background: #161616;
    border: 1px solid #2a2a2a;
    border-radius: 999px;
    overflow: hidden;
    transition: border-color 0.15s ease, background 0.15s ease;
  }

  .header-search:focus-within {
    border-color: #444;
    background: #1a1a1a;
  }

  .header-search input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: 0;
    background: transparent;
    color: var(--white);
    padding: 0 4px 0 14px;
    font: inherit;
    font-size: 0.86rem;
    outline: none;
  }

  .header-search input::placeholder {
    color: #777;
  }

  .header-search button {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    color: #ddd;
    flex: 0 0 auto;
  }

  .header-search button:hover {
    color: var(--white);
  }

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

  .icon-btn--mobile-only {
    display: none;
  }

  .hero__inner {
    min-height: min(64vh, 580px);
    padding: 72px var(--gutter) 64px;
  }

  .hero__tear {
    height: 18px;
  }

  .hero__watermark {
    font-size: clamp(4.2rem, 8.5vw, 7.5rem);
    top: 8%;
    transform: translate(-50%, 0);
    color: rgba(255, 255, 255, 0.18);
  }

  .hero__copy {
    max-width: 40rem;
    padding-left: 16px;
  }

  .viral__heading {
    font-size: 1.28rem;
  }

  .viral-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 40px;
  }

  .viral-list > li {
    border-bottom: 1px solid var(--line);
  }

  .viral-list > li .viral-item {
    border-bottom: 0;
    min-height: 108px;
    padding: 18px 0;
  }

  /* แถวสุดท้ายถ้าเหลือคี่ ให้กินเต็มแถว */
  .viral-list > li:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    max-width: calc(50% - 20px);
  }

  .viral-item {
    grid-template-columns: 132px minmax(0, 1fr) 20px;
    gap: 18px;
  }

  .viral-item__thumb {
    width: 132px;
    height: 90px;
  }

  .viral-item__rank {
    width: 24px;
    height: 24px;
    font-size: 0.8rem;
  }

  .viral-item__title {
    font-size: 1.08rem;
  }

  .viral-item__meta {
    font-size: 0.78rem;
  }

  .article {
    padding: 28px var(--gutter) 56px;
  }

  .article__body {
    font-size: 1.06rem;
  }

  .related__title {
    font-size: 0.98rem;
  }

  .site-footer__inner {
    padding-top: 24px;
    padding-bottom: 18px;
  }

  .site-footer__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
  }

  .site-footer__nav {
    gap: 6px 18px;
  }

  .site-footer__bottom-inner {
    padding-top: 12px;
    padding-bottom: 14px;
  }

  .search-panel {
    padding-top: 28px;
  }
}

@media (min-width: 1100px) {
  .nav-desktop {
    gap: 6px;
  }

  .nav-desktop__link {
    padding: 0 16px;
    font-size: 0.95rem;
  }

  .nav-desktop__link::after {
    left: 16px;
    right: 16px;
  }

  .header-search {
    width: 260px;
  }
}

@media (min-width: 1200px) {
  .hero__inner {
    min-height: 560px;
  }
}

@media (max-width: 380px) {
  .logo {
    font-size: 0.98rem;
    padding: 0 16px 0 10px;
  }

  .viral-item {
    grid-template-columns: 76px minmax(0, 1fr) 14px;
    gap: 10px;
  }

  .viral-item__thumb {
    width: 76px;
    height: 58px;
  }

  .viral-item__title {
    font-size: 0.88rem;
  }

  .related__item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .related__chev {
    display: none;
  }
}
