/* หน้าตา javwow.live — เบา ไม่พึ่งฟอนต์นอกเครื่อง */
:root {
  --bg: #09090b;
  --bg-2: #111114;
  --card: #16161a;
  --line: #2a2a31;
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --accent: #e11d48;
  --accent-2: #fb7185;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --radius: 14px;
  --max: 1180px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(900px 280px at 10% -10%, rgba(225, 29, 72, .18), transparent 60%),
    var(--bg);
  color: var(--text);
  font: 16px/1.5 "Leelawadee UI", "Segoe UI", Tahoma, sans-serif;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
button, input { font: inherit; font-size: 16px; }
.skip {
  position: absolute; left: 12px; top: -40px; background: #fff; color: #000; padding: 6px 10px; z-index: 50;
}
.skip:focus { top: 8px; }
.wrap { width: min(var(--max), calc(100% - 28px)); margin: 0 auto; }
.top {
  position: sticky; top: 0; z-index: 30;
  background: rgba(9, 9, 11, .88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.bar { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.brand img { width: 40px; height: 40px; border-radius: 10px; }
.brand h1, .brand div { margin: 0; font-size: 20px; line-height: 1.1; font-weight: 700; }
.brand strong { display: block; letter-spacing: .08em; font-size: 20px; line-height: 1.1; }
.brand em { display: block; font-style: normal; color: var(--muted); font-size: 12px; font-weight: 400; }
.search { margin-left: auto; display: flex; gap: 8px; width: min(420px, 46vw); }
.search input {
  flex: 1; min-width: 0; border: 1px solid var(--line); background: #0c0c0f; color: var(--text);
  border-radius: 999px; padding: 10px 14px; outline: none;
}
.search input:focus { border-color: var(--accent); }
.search button, .tools button, .pager a {
  border: 0; background: var(--accent); color: #fff; border-radius: 999px; padding: 10px 14px; cursor: pointer; text-decoration: none;
}
.nav { display: flex; gap: 8px; overflow: auto; padding: 0 0 12px; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  flex: none; text-decoration: none; color: var(--muted); background: var(--card);
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 14px;
}
.nav a:hover, .nav a[aria-current="page"] { color: #fff; border-color: var(--accent); }
main { padding: 22px 0 48px; }
.lead { margin: 0 0 16px; }
.lead h1 { font-size: clamp(22px, 3vw, 32px); line-height: 1.25; margin: 0 0 6px; }
.lead p { margin: 0; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.card { text-decoration: none; min-width: 0; }
.thumb {
  aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; position: relative;
  box-shadow: var(--shadow);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.card h2, .card h3 {
  font-size: 14px; line-height: 1.4; margin: 8px 2px 0; font-weight: 650;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.8em;
}
.card:hover h2, .card:hover h3 { color: var(--accent-2); }
.card time { display: block; color: var(--muted); font-size: 12px; margin: 2px 2px 0; }
.card .badge-new {
  position: absolute; top: 8px; left: 8px; z-index: 2; pointer-events: none;
  color: #fff; background: linear-gradient(135deg, var(--accent-2), var(--accent));
  font-size: 11px; font-weight: 800; line-height: 1; letter-spacing: .04em;
  padding: 5px 9px; border-radius: 999px;
  box-shadow: 0 2px 10px rgba(225, 29, 72, .5), inset 0 1px 0 rgba(255, 255, 255, .22);
  animation: badge-in .38s cubic-bezier(.34, 1.56, .64, 1);
  transition: transform .2s ease;
}
@keyframes badge-in { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.card:hover .badge-new { transform: scale(1.07); }

.pager { display: flex; gap: 8px; align-items: center; justify-content: center; margin: 22px 0; flex-wrap: wrap; }
.pager span { color: var(--muted); }
.pager a.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.stage {
  position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 16px; overflow: hidden;
}
.stage video { width: 100%; height: 100%; background: #000; object-fit: contain; }
.go {
  position: absolute; inset: 0; margin: auto; width: 88px; height: 88px; border: 0; border-radius: 50%;
  background: var(--accent); color: #fff; cursor: pointer; font-weight: 700;
}
.stage .msg {
  position: absolute; inset: auto 12px 12px 12px; margin: 0; background: rgba(0,0,0,.72);
  padding: 8px 12px; border-radius: 10px; display: none;
}
.tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }
.tools button { background: #27272a; }
.tools button[aria-pressed="true"] { background: var(--accent); }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.meta a, .meta span, .meta time {
  text-decoration: none; background: var(--card); border: 1px solid var(--line);
  border-radius: 999px; padding: 4px 10px; color: var(--muted); font-size: 13px;
}
.meta .chip-new {
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  border-color: transparent; color: #fff; font-weight: 700;
}
.prose { color: #e4e4e7; font-size: 16.5px; }
.prose p { margin: 0 0 12px; }
.block { margin-top: 28px; }
.block h2 { font-size: 18px; margin: 0 0 12px; }
.dir { display: flex; flex-wrap: wrap; gap: 8px; }
.dir a {
  text-decoration: none; background: var(--card); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 10px; font-size: 14px;
}
.foot { border-top: 1px solid var(--line); color: var(--muted); padding: 22px 0 32px; font-size: 14px; }
.foot a { color: var(--text); }
.empty { color: var(--muted); }
@media (max-width: 1100px) { .grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 860px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) {
  .bar { flex-wrap: wrap; padding-top: 8px; min-height: 0; }
  .search { width: 100%; margin: 0 0 8px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .watch { margin-left: -14px; margin-right: -14px; width: calc(100% + 28px); }
  .stage { border-radius: 0; }
  .card h2, .card h3 { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
