:root {
  --bg: #07080b;
  --surface: #101117;
  --surface-light: #171923;
  --purple: #b64dff;
  --yellow: #eaff00;
  --red: #ff3158;
  --text: #f7f8ff;
  --muted: #a7a9bb;
  --border: #343044;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans Thai", "Sarabun", system-ui, Arial, sans-serif;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 8px 14px;
  background: var(--purple);
  border-radius: 8px;
}
.skip-link:focus { top: 12px; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 76px;
  padding: 16px 6%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: rgba(5, 5, 5, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
}

.logo {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -1.5px;
  white-space: nowrap;
}
.logo { font-style: italic; font-weight: 900; letter-spacing: -1px; text-transform: uppercase; color: var(--yellow); text-shadow: 0 0 14px #f4ff1f88; }
.logo .lx { color: var(--red); text-shadow: 0 0 14px #ff2a2a99; margin: 0 1px; }
.logo span { color: var(--purple); text-shadow: 0 0 14px #b026ffaa; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.main-nav a {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  transition: color 0.2s;
}
.main-nav a:hover,
.main-nav a.active { color: var(--yellow); }

.follow-count {
  display: inline-block;
  min-width: 18px;
  padding: 0 5px;
  color: white;
  background: #b026ff;
  border-radius: 9px;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
}

/* ---------- slideshow ---------- */
.eyebrow {
  margin: 0;
  color: var(--yellow);
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 3px;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin-top: 22px;
  padding: 12px 20px;
  color: white;
  background: linear-gradient(110deg, #8a1fe0, #b026ff);
  border: 1px solid #d28cff;
  border-radius: 8px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 0 28px #b026ff29;
  transition: transform 0.2s, box-shadow 0.2s;
}
.primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 36px #b026ff55;
}

.slideshow {
  position: relative;
  border-bottom: 1px solid var(--border);
  background: #0a0a0c;
}

.slides-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.slides-track::-webkit-scrollbar { display: none; }

.slide {
  position: relative;
  flex: 0 0 100%;
  min-height: 500px;
  display: flex;
  align-items: center;
  overflow: hidden;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.slide-bg {
  position: absolute;
  inset: -40px;
  width: calc(100% + 80px);
  height: calc(100% + 80px);
  object-fit: cover;
  filter: blur(30px) saturate(1.2);
  opacity: 0.55;
}

.slide-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #050505f2 0%, #050505bb 45%, #05050566 100%),
    linear-gradient(0deg, #050505 0%, transparent 35%);
}

.slide-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1100px;
  margin: auto;
  padding: 56px 9% 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 48px;
  align-items: center;
}

.slide-cover {
  grid-column: 2;
  grid-row: 1;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid #ffffff22;
  border-radius: 14px;
  box-shadow: 0 0 70px #b026ff44, 0 20px 50px #0008;
  transform: rotate(2deg);
}
.slide-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

.slide-text { grid-column: 1; grid-row: 1; max-width: 560px; }
.slide-text h2 {
  margin: 10px 0 4px;
  font-size: clamp(30px, 5vw, 54px);
  line-height: 1.15;
  letter-spacing: -1px;
}
.slide-alt { margin: 0; color: #d6cfe6; font-size: 14px; }
.slide-text .chips { margin: 16px 0 14px; }
.slide-synopsis {
  margin: 0;
  color: #d9d0e6;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.slide-meta { margin: 12px 0 0; color: var(--muted); font-size: 12px; }

.slide-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 44px;
  height: 44px;
  transform: translateY(-50%);
  color: white;
  background: #170d26cc;
  border: 1px solid #b026ff66;
  border-radius: 50%;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s;
}
.slide-arrow:hover { background: #7a1fc4; }
.slide-arrow.prev { left: 2%; }
.slide-arrow.next { right: 2%; }

.slide-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 8px;
}
.slide-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  background: #ffffff44;
  border: 0;
  border-radius: 5px;
  cursor: pointer;
  transition: 0.25s;
}
.slide-dots button.active { width: 26px; background: var(--yellow); }

/* ---------- sections ---------- */
.block {
  max-width: 1200px;
  margin: auto;
  padding: 64px 6% 8px;
}
#stories { padding-bottom: 64px; }

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 8px 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.3;
}
.section-heading h2 span { color: var(--yellow); }

.muted {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.story-count {
  color: var(--yellow);
  font-size: 11px;
  letter-spacing: 2px;
  white-space: nowrap;
}

.text-button {
  padding: 8px 14px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}
.text-button:hover { color: var(--yellow); border-color: var(--purple); }

/* ---------- search + filters ---------- */
.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.search-box span { color: var(--yellow); font-size: 26px; }
.search-box input {
  width: 100%;
  min-width: 0;
  padding: 15px 0;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: none;
}
.search-box:focus-within { border-color: var(--purple); }

.filter-group {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-top: 16px;
}
.filter-label {
  flex: 0 0 62px;
  color: var(--muted);
  font-size: 12px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-button {
  padding: 7px 15px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  cursor: pointer;
  font-size: 12px;
  transition: 0.2s;
}
.filter-button:hover,
.filter-button.active {
  color: white;
  background: #7a1fc4;
  border-color: var(--purple);
}

/* ปุ่มพับ/ขยายหมวดหมู่ */
.filter-toggle {
  padding: 7px 15px;
  color: var(--purple);
  background: transparent;
  border: 1px dashed var(--purple);
  border-radius: 7px;
  cursor: pointer;
  font-size: 12px;
  transition: 0.2s;
}
.filter-toggle:hover { color: white; background: #7a1fc4; }
/* ตอนขยาย ถ้าหมวดเยอะมากให้เลื่อนดูในกรอบ ไม่ดันหน้าเว็บยาว */
.filters.expanded { max-height: 168px; overflow-y: auto; padding-right: 4px; }

/* ---------- story cards ---------- */
.story-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  margin-top: 26px;
}
#following-grid { margin-top: 0; }

.story-card {
  display: block;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: transform 0.2s, border-color 0.2s;
}
.story-card:hover {
  transform: translateY(-5px);
  border-color: var(--purple);
}

.story-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #1a0d2e, #5b1a9a);
}

.cover-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.badge-new {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 2px 8px;
  color: white;
  background: #ff2a2a;
  border-radius: 5px;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 1px;
  box-shadow: 0 0 14px #ff2a2a88;
}
.badge-new.inline {
  position: static;
  flex-shrink: 0;
  box-shadow: none;
}

.badge-follow {
  position: absolute;
  top: 8px;
  right: 10px;
  z-index: 2;
  color: var(--yellow);
  font-size: 18px;
  text-shadow: 0 1px 6px #000;
}

.status-pill {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 2;
  padding: 2px 9px;
  color: #f4ff66;
  background: #170d26dd;
  border: 1px solid #b026ff66;
  border-radius: 5px;
  font-size: 10px;
}
.status-pill.status-จบแล้ว { color: #bbf7d0; border-color: #4ade8066; }
.status-pill.status-จบซีซั่น { color: #bfdbfe; border-color: #60a5fa66; }
.status-pill.status-พักการแปล { color: #fde68a; border-color: #fbbf2466; }
.status-pill.static { position: static; font-size: 12px; padding: 3px 11px; }

.story-info { padding: 10px 12px 12px; }

.story-title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.story-details {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.story-category { color: var(--yellow); }
.story-genre { padding-left: 8px; border-left: 1px solid var(--border); }

.empty-state {
  padding: 50px 0;
  color: var(--muted);
  text-align: center;
}

/* ---------- latest updates ---------- */
.latest-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.latest-item,
.schedule-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px 10px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color 0.2s;
}
.latest-item:hover,
.schedule-item:hover { border-color: var(--purple); }

.latest-rank {
  width: 22px;
  color: var(--yellow);
  font-weight: bold;
  text-align: center;
}

.latest-item img,
.schedule-item img {
  width: 48px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 6px;
  background: #1a0d2e;
}

.latest-text,
.schedule-story-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.latest-text strong,
.schedule-story-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
}
.latest-text small,
.schedule-story-info small {
  color: var(--muted);
  font-size: 12px;
}

/* ---------- schedule ---------- */
.day-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.day-tab {
  padding: 8px 14px;
  color: #c8bfd5;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: 0.2s;
}
.day-tab small {
  margin-left: 6px;
  color: var(--yellow);
  font-size: 10px;
}
.day-tab:hover { border-color: var(--purple); }
.day-tab.active {
  color: white;
  background: #a21fff;
  border-color: #d28cff;
}
.day-tab.active small { color: #f4ff66; }

.schedule-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 16px;
}
.schedule-day h3 {
  margin: 0 0 10px;
  font-size: 16px;
}
.schedule-day .schedule-item { margin-bottom: 10px; }
.today-chip {
  margin-left: 6px;
  padding: 1px 8px;
  color: white;
  background: #b026ff;
  border-radius: 10px;
  font-size: 10px;
  vertical-align: middle;
}
.schedule-empty {
  margin: 0;
  padding: 14px 0;
  color: var(--muted);
  font-size: 13px;
}

/* ---------- story page ---------- */
.story-page {
  max-width: 1000px;
  margin: auto;
  padding: 36px 6% 72px;
}

.back-link {
  display: inline-block;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 13px;
}
.back-link:hover { color: var(--yellow); }

.story-page-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.story-page-side { min-width: 0; }
.story-page-side .actions { margin-top: 18px; }
.story-page-side .follow-button { width: 100%; }
.story-page-side .read-links { margin-top: 24px; }
.story-page-side .read-links h2 { font-size: 19px; }

.story-page-cover {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #1a0d2e, #5b1a9a);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 0 60px #b026ff22;
}
.story-page-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.story-page-body h1 {
  margin: 8px 0 4px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.2;
}
.alt-titles {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 22px;
}
.chip {
  padding: 3px 11px;
  color: #c8bbd8;
  background: var(--surface-light);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 12px;
}

.meta-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 26px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.meta-list dt { color: var(--muted); font-size: 12px; }
.meta-list dd { margin: 0; font-weight: 600; font-size: 14px; }

.synopsis-title { margin: 0 0 6px; font-size: 16px; }
.synopsis {
  margin: 0 0 26px;
  color: #d9d0e6;
  font-size: 14px;
  white-space: pre-line;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
}
.actions .primary-button { margin-top: 0; }

.follow-button {
  padding: 12px 20px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
}
.follow-button:hover { border-color: var(--purple); }
.follow-button.on {
  color: var(--yellow);
  border-color: var(--yellow);
  background: #e879f914;
}

.new-note {
  margin: 14px 0 0;
  color: var(--yellow);
  font-size: 13px;
}

/* ---------- footer ---------- */
.site-footer {
  padding: 34px 6% 26px;
  border-top: 1px solid var(--border);
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.site-footer p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.copyright {
  margin-top: 22px !important;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 14px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  transition: border-color 0.2s, transform 0.2s;
}
.social-link:hover { border-color: var(--purple); transform: translateY(-2px); }
.social-link .logo-img { width: 22px; height: 22px; object-fit: contain; border-radius: 5px; }
/* ปุ่มโลโก้อย่างเดียว */
.social-link.icon-only { justify-content: center; min-width: 46px; min-height: 46px; padding: 8px; }
.social-link.icon-only .logo-img { width: 28px; height: 28px; border-radius: 6px; }

.logo-img { display: block; }

/* ---------- read links (ลิงก์อ่าน) ---------- */
.read-links { margin-top: 34px; }
.read-links h2 { margin: 0 0 4px; font-size: 22px; }
.read-links-hint {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
}
.read-link-list { display: grid; gap: 12px; max-width: 460px; }

.read-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 18px;
  border-radius: 14px;
  color: var(--rl-ink);
  background: var(--rl-bg);
  transition: transform 0.2s, filter 0.2s;
}
.read-link:hover { transform: translateY(-2px); filter: brightness(1.05); }
.read-readtoon { --rl-bg: #dcb4fb; --rl-ink: #5a0fa0; }
.read-kairew   { --rl-bg: #ffc4a3; --rl-ink: #8a3412; }
.read-duckki   { --rl-bg: #ffd43b; --rl-ink: #5b4200; }

.read-link-logo {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
}
.read-link-logo:empty { display: none; }
.read-link-logo .logo-img { width: 34px; height: 34px; object-fit: contain; }
.read-link-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.read-link-text strong { font-size: 15px; letter-spacing: 0.3px; }
.read-link-text small { font-size: 12px; opacity: 0.8; }
.read-link-icon { font-size: 20px; font-weight: bold; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .site-header { flex-wrap: wrap; }
  .main-nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .slide-inner { grid-template-columns: minmax(0, 1fr) 200px; gap: 28px; }
  .story-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .story-page-grid { grid-template-columns: 220px minmax(0, 1fr); gap: 26px; }
}

@media (max-width: 640px) {
  .site-header { padding: 12px 5%; gap: 12px; }
  .logo { font-size: 23px; }
  .main-nav { gap: 18px; }

  .slide { min-height: 0; }
  .slide-inner {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 34px 6% 56px;
  }
  .slide-cover { grid-column: 1; grid-row: 1; width: 150px; margin: 0 auto; transform: none; }
  .slide-text { grid-column: 1; grid-row: 2; text-align: left; }
  .slide-shade {
    background: linear-gradient(0deg, #050505 0%, #050505cc 55%, #05050588 100%);
  }
  .slide-arrow { display: none; }

  .block { padding: 48px 5% 8px; }
  #stories { padding-bottom: 48px; }
  .section-heading { align-items: start; }

  .filter-group { flex-direction: column; gap: 6px; }
  .filter-label { flex: none; }

  .story-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .story-info { padding: 9px 10px 11px; }
  .story-title { font-size: 14px; }

  .latest-list,
  .schedule-list { grid-template-columns: 1fr; }

  .story-page { padding: 24px 5% 56px; }
  .story-page-grid { grid-template-columns: 1fr; }
  .story-page-side { max-width: 320px; margin: 0 auto; width: 100%; }
  .meta-list { grid-template-columns: 1fr; }

  .site-footer { padding: 25px 5%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ---------- ข้อมูลเรื่อง (info grid) ---------- */
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 24px;
  margin: 0 0 26px;
  padding: 0;
  list-style: none;
}
.info-grid li { display: flex; align-items: center; gap: 12px; min-width: 0; }
.info-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #e0b3ff;
  background: #2a0f4d;
  border-radius: 10px;
}
.info-text { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.info-text b { font-weight: 700; margin-right: 4px; }
.info-text .flag { vertical-align: -2px; border-radius: 2px; margin: 0 4px 0 2px; }
@media (max-width: 640px) { .info-grid { grid-template-columns: 1fr; } }

/* ---------- กระดิ่งแจ้งเตือน ---------- */
.bell-wrap { position: relative; flex-shrink: 0; }
.bell-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  transition: 0.2s;
}
.bell-button:hover { border-color: var(--purple); color: var(--yellow); }
.bell-count {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  padding: 0 5px;
  color: white;
  background: #ff2a2a;
  border-radius: 9px;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
}
.bell-panel {
  position: absolute;
  top: 50px;
  right: 0;
  z-index: 30;
  width: min(340px, 88vw);
  max-height: 70vh;
  overflow-y: auto;
  padding: 14px;
  background: var(--surface-light);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 18px 50px #000a;
}
.bell-panel[hidden] { display: none; }
.bell-panel h3 { margin: 0 0 10px; font-size: 15px; }
.bell-list { margin: 0 0 10px; padding: 0; list-style: none; }
.bell-list a { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; }
.bell-list a:hover { background: #ffffff10; }
.bell-list img { width: 40px; height: 54px; object-fit: cover; border-radius: 5px; flex-shrink: 0; }
.bell-list strong { display: block; font-size: 13px; }
.bell-list small { color: var(--muted); font-size: 12px; }
.bell-empty { margin: 8px 0 12px; color: var(--muted); font-size: 13px; text-align: center; }
.bell-note { margin: 8px 0 0; color: var(--muted); font-size: 11px; text-align: center; }
.bell-toggle {
  width: 100%;
  margin-top: 4px;
  padding: 9px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
}
.bell-toggle:hover { border-color: var(--purple); }

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 50;
  transform: translateX(-50%);
  max-width: 90vw;
  padding: 12px 20px;
  color: white;
  background: #4a1480;
  border: 1px solid var(--purple);
  border-radius: 10px;
  font-size: 14px;
  box-shadow: 0 10px 40px #000a;
}
.toast[hidden] { display: none; }
.toast a { color: inherit; }

/* ปุ่มแอดมิน (มุมขวาล่างของเว็บ) — จางๆ พื้นที่กดใหญ่ ชี้แล้วชัดขึ้น */
.admin-link {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 40;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: var(--text);
  border-radius: 50%;
  opacity: .18;
  transition: opacity .2s, background .2s;
}
.admin-link:hover, .admin-link:focus-visible { opacity: 1; background: var(--surface-light); }

.chip-page { color: var(--yellow); border-color: #f4ff1f55; background: #f4ff1f12; }



/* ---------- CASS4HER neon theme polish ---------- */
:root {
  --neon-yellow: #eaff00;
  --neon-purple: #b64dff;
  --neon-red: #ff3158;
  --surface-glass: rgba(16, 17, 23, .88);
}

body {
  background:
    radial-gradient(ellipse at 12% 0%, rgba(234, 255, 0, .045), transparent 28rem),
    radial-gradient(ellipse at 88% 8%, rgba(182, 77, 255, .075), transparent 34rem),
    var(--bg);
}

.site-header {
  background: rgba(7, 8, 11, .88);
  border-bottom-color: rgba(182, 77, 255, .22);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .22);
}

.logo {
  text-shadow: 0 0 10px rgba(234, 255, 0, .28);
}
.logo .lx {
  color: var(--neon-red);
  text-shadow: 0 0 10px rgba(255, 49, 88, .38);
}
.logo span {
  color: var(--neon-purple);
  text-shadow: 0 0 12px rgba(182, 77, 255, .32);
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--neon-yellow);
  text-shadow: 0 0 14px rgba(234, 255, 0, .18);
}

.eyebrow,
.story-count,
.story-category,
.latest-rank,
.day-tab small {
  color: var(--neon-yellow);
}

.primary-button {
  color: #090a0c;
  background: linear-gradient(105deg, var(--neon-yellow), #c8e600 48%, var(--neon-purple));
  border: 1px solid rgba(234, 255, 0, .7);
  box-shadow: 0 0 22px rgba(182, 77, 255, .14), 0 0 18px rgba(234, 255, 0, .08);
}
.primary-button:hover {
  box-shadow: 0 0 28px rgba(182, 77, 255, .22), 0 0 24px rgba(234, 255, 0, .14);
}

.slideshow {
  border-bottom-color: rgba(182, 77, 255, .22);
  background: #090a0e;
}
.slide-cover {
  border-color: rgba(182, 77, 255, .42);
  box-shadow: 0 0 42px rgba(182, 77, 255, .18), 0 18px 48px rgba(0, 0, 0, .45);
}
.slide-arrow {
  background: rgba(16, 17, 23, .9);
  border-color: rgba(182, 77, 255, .45);
}
.slide-arrow:hover { background: #56217a; }

.section-heading h2 span { color: var(--neon-purple); }
.text-button:hover { color: var(--neon-yellow); border-color: var(--neon-purple); }

.search-box {
  background: rgba(16, 17, 23, .82);
  border-color: #343044;
}
.search-box:focus-within {
  border-color: var(--neon-yellow);
  box-shadow: 0 0 0 3px rgba(234, 255, 0, .07);
}

.filter-button:hover,
.filter-button.active {
  color: #fff;
  background: rgba(182, 77, 255, .17);
  border-color: var(--neon-purple);
  box-shadow: inset 0 0 0 1px rgba(182, 77, 255, .08);
}
.filter-toggle {
  color: var(--neon-yellow);
  border-color: rgba(234, 255, 0, .45);
}
.filter-toggle:hover {
  color: #0a0b0d;
  background: var(--neon-yellow);
  border-color: var(--neon-yellow);
}

.story-card {
  background: linear-gradient(155deg, rgba(18, 19, 27, .98), rgba(12, 13, 18, .98));
  border-color: #292936;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .12);
}
.story-card:hover {
  border-color: rgba(182, 77, 255, .72);
  box-shadow: 0 10px 28px rgba(182, 77, 255, .09);
}
.story-cover {
  background: linear-gradient(135deg, #171a0c, #24133b 60%, #101117);
}
.status-pill {
  color: var(--neon-yellow);
  background: rgba(8, 9, 12, .88);
  border-color: rgba(182, 77, 255, .55);
}

.latest-item,
.schedule-item {
  background: rgba(16, 17, 23, .82);
  border-color: #292936;
}
.latest-item:hover,
.schedule-item:hover {
  border-color: rgba(182, 77, 255, .65);
  box-shadow: 0 6px 22px rgba(182, 77, 255, .07);
}

.day-tab {
  color: #c7c8d6;
  background: rgba(16, 17, 23, .82);
  border-color: #343044;
}
.day-tab:hover { border-color: var(--neon-purple); }
.day-tab.active {
  color: var(--neon-yellow);
  background: rgba(182, 77, 255, .14);
  border-color: var(--neon-purple);
  box-shadow: 0 0 16px rgba(182, 77, 255, .1);
}
.day-tab.active small { color: var(--neon-yellow); }

.site-footer {
  border-top-color: rgba(182, 77, 255, .2);
  background: rgba(7, 8, 11, .72);
}
.social-link:hover { border-color: var(--neon-yellow); }
.bell-button:hover { border-color: var(--neon-purple); color: var(--neon-yellow); }
.bell-panel {
  background: #12131b;
  border-color: rgba(182, 77, 255, .38);
}
.bell-toggle:hover { border-color: var(--neon-purple); }
.toast {
  color: #f8f8ff;
  background: #191125;
  border-color: rgba(182, 77, 255, .7);
}
.info-icon {
  color: var(--neon-yellow);
  background: #1b1b22;
  border: 1px solid rgba(182, 77, 255, .28);
}
.chip-page {
  color: var(--neon-yellow);
  border-color: rgba(234, 255, 0, .34);
  background: rgba(234, 255, 0, .07);
}
:focus-visible {
  outline-color: var(--neon-yellow);
}

/* ---------- ป๊อปอัพเลือกเพจ (ลิงก์ช่องทาง) ---------- */
button.social-link { font: inherit; color: inherit; cursor: pointer; }
body.modal-open { overflow: hidden; }
.social-popup {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 20px; background: rgba(0, 0, 0, .72); backdrop-filter: blur(6px);
}
.social-popup[hidden] { display: none; }
.social-popup-box {
  position: relative; width: min(100%, 380px); padding: 28px 24px 24px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  box-shadow: 0 0 40px rgba(176, 38, 255, .25), 0 20px 60px #000a;
}
.social-popup-box h3 { margin: 4px 0 18px; font-size: 20px; }
.social-popup-close {
  position: absolute; top: 10px; right: 12px; width: 34px; height: 34px;
  color: var(--muted); background: transparent; border: 0; border-radius: 50%;
  font-size: 24px; line-height: 1; cursor: pointer;
}
.social-popup-close:hover { color: var(--text); background: var(--surface-light); }
.social-choices { display: grid; gap: 10px; }
.social-choice {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; color: var(--text); font-weight: 700;
  background: var(--surface-light); border: 1px solid var(--border); border-radius: 12px;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.social-choice i { color: var(--yellow); font-style: normal; }
.social-choice:hover, .social-choice:focus-visible {
  border-color: var(--yellow); box-shadow: 0 0 18px rgba(244, 255, 31, .18); transform: translateY(-1px);
}
