:root {
  --bg: #0b0b0f;
  --bg-soft: #141419;
  --panel: #1a1a22;
  --line: #2a2a33;
  --text: #f4f4f6;
  --muted: #9a9aa6;
  --accent: #effe3e;
  --accent-2: #d4e62e;
  --radius: 10px;
  --header-h: 62px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

/* Keep the footer at the bottom on short pages (site only, never admin). */
body:not(.admin) { min-height: 100vh; display: flex; flex-direction: column; }
body:not(.admin) main { flex: 1 0 auto; }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }

/* ---------- header ---------- */
#site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  transition: background 0.25s ease, border-color 0.25s ease;
  border-bottom: 1px solid transparent;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0));
}
#site-header.solid { background: rgba(11, 11, 15, 0.96); border-bottom-color: var(--line); }
.header-inner {
  max-width: 1500px;
  height: 100%;
  margin: 0 auto;
  padding: 0 4vw;
  display: flex;
  align-items: center;
  gap: 26px;
}
.logo { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 19px; letter-spacing: 0.5px; }
.logo-icon { width: 34px; height: 34px; display: block; flex: 0 0 auto; }
.logo-text {
  font-family: Georgia, "Times New Roman", "Songti SC", "STSong", "SimSun", "Noto Serif SC", serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 1.5px;
}
.footer-brand .logo-icon { width: 26px; height: 26px; }
.nav { display: flex; gap: 22px; margin-left: 8px; }
.nav a { color: #d9d9e0; font-size: 15px; transition: color 0.2s; }
.nav a .nav-short { display: none; }
.nav a:hover { color: #fff; }
.header-right { margin-left: auto; display: flex; align-items: center; gap: 16px; color: #d9d9e0; }
.search-link:hover { color: #fff; }
.badge-18 {
  border: 1px solid #6a6a76;
  border-radius: 5px;
  padding: 1px 6px;
  font-size: 12px;
  font-weight: 700;
  color: #cfcfd8;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 7px;
  border: 1px solid #3a3a45;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  transition: background 0.18s, border-color 0.18s;
}
.btn:hover { background: rgba(255, 255, 255, 0.16); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #0b0b0f; }
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 40vh; display: flex; align-items: flex-end; overflow: hidden; padding-top: var(--header-h); }
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 22%;
  filter: blur(10px) brightness(0.55) saturate(1.05);
  transform: scale(1.12);
}
.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(11, 11, 15, 1) 0%, rgba(11, 11, 15, 0.72) 42%, rgba(11, 11, 15, 0.15) 70%),
    linear-gradient(0deg, var(--bg) 2%, rgba(11, 11, 15, 0) 55%);
}
.hero-body {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 40px;
  align-items: end;
  max-width: 1500px;
  width: 100%;
  margin: 0 auto;
  padding: 0 4vw 3.5vh;
}
.hero-main { display: flex; gap: 30px; align-items: flex-end; min-width: 0; }
.hero-quote {
  position: relative;
  align-self: center;
  max-width: 400px;
  min-width: 0;
  padding: 0 36px;
}
.hero-quote::before,
.hero-quote::after {
  position: absolute;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 60px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.4);
  pointer-events: none;
}
.hero-quote::before { content: "“"; top: -18px; left: 0; }
.hero-quote::after { content: "”"; bottom: -34px; right: 0; }
.hero-desc {
  margin: 0;
  color: #cfcfd8;
  font-size: 14px;
  line-height: 1.85;
  display: -webkit-box;
  -webkit-line-clamp: 7;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-poster {
  width: 150px;
  aspect-ratio: 2 / 3;
  flex: 0 0 auto;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.6);
}
.hero-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-info { max-width: 680px; padding-bottom: 6px; }
.hero-kicker { color: var(--accent-2); font-weight: 700; letter-spacing: 2px; font-size: 13px; margin: 0 0 8px; }
.hero-info h1,
.hero-info .hero-title { font-size: clamp(24px, 3.4vw, 42px); line-height: 1.05; margin: 0 0 12px; font-weight: 900; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 14px; color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.hero-btns { display: flex; gap: 12px; margin-bottom: 16px; }
.hero-info .chips { flex-wrap: nowrap; overflow: hidden; }
.footer-stats { margin: 0 0 14px; }

.hero-carousel { display: grid; align-items: stretch; touch-action: pan-y; }
.hero-slide {
  grid-area: 1 / 1;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}
.hero-slide.active { opacity: 1; pointer-events: auto; }
.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 4;
}
.hero-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: width 0.2s, background 0.2s;
}
.hero-dot:hover { background: rgba(255, 255, 255, 0.6); }
.hero-dot.active { background: var(--accent); width: 22px; }

/* ---------- chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid #3a3a45;
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 13px;
  color: #cfcfd8;
  background: rgba(255, 255, 255, 0.04);
  transition: all 0.18s;
  white-space: nowrap;
  flex: 0 0 auto;
}
.chip:hover { border-color: #6a6a76; color: #fff; }
.chip.active { background: var(--accent); border-color: var(--accent); color: #0b0b0f; }

/* ---------- rows ---------- */
.rows { padding: 10px 0 60px; }
.row { margin: 30px 0; }
.row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 4vw;
  margin-bottom: 12px;
}
.row-head h2 { font-size: 21px; margin: 0; font-weight: 800; }
.row-more { color: var(--muted); font-size: 13px; }
.row-more:hover { color: #fff; }
.row-wrap { position: relative; }
.row-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 4px 4vw 10px;
}
.row-track::-webkit-scrollbar { display: none; }
.row-nav {
  position: absolute;
  top: 28%;
  z-index: 5;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(20, 20, 25, 0.85);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 0.2s, background 0.2s;
}
.row-wrap:hover .row-nav { opacity: 1; }
.row-nav:hover { background: var(--accent); color: #0b0b0f; }
.row-nav.prev { left: 1vw; }
.row-nav.next { right: 1vw; }

/* ---------- poster card ---------- */
.card { flex: 0 0 auto; width: 176px; }
.grid .card { width: auto; }
.card-poster {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover .card-poster { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(0, 0, 0, 0.55); }
.card-poster img { width: 100%; height: 100%; object-fit: cover; }
.card-noimg { display: grid; place-items: center; height: 100%; color: var(--muted); font-size: 13px; }
.card-soon {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 6px;
  padding: 2px 7px;
  backdrop-filter: blur(4px);
  background: rgba(229, 9, 20, 0.9);
  color: #fff;
}
.card-brief {
  margin: 3px 0 0;
  font-size: 12px;
  line-height: 1.45;
  max-height: calc(1.45em * 3);
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-title { margin-top: 9px; font-size: 14px; font-weight: 600; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.card-eps {
  position: absolute;
  right: 8px;
  bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.65);
  color: #e8e8ef;
  backdrop-filter: blur(4px);
}

/* ---------- grids / pages ---------- */
.page { max-width: 1500px; margin: 0 auto; padding: calc(var(--header-h) + 28px) 4vw 70px; }
.page-title { font-size: 28px; font-weight: 900; margin: 0 0 20px; }
.section-title { font-size: 19px; font-weight: 800; margin: 28px 0 14px; }
/* Fixed column counts (2/3/5/6 — deliberately never 4 or >6) so a 30-item page
   always fills whole rows at every width. Each breakpoint keeps cards ~150px+. */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; }
@media (min-width: 520px)  { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 885px)  { .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (min-width: 1080px) { .grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.empty { color: var(--muted); padding: 40px 0; text-align: center; }

/* ---------- filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.filter-search,
.filter-select {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 7px;
  padding: 9px 12px;
  font-size: 14px;
}
.filter-search { flex: 1; min-width: 180px; }
.tagbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.result-line { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 40px 0 0; color: var(--muted); }

/* ---------- rank ---------- */
.rank-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rank-item { display: flex; align-items: center; gap: 16px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; padding: 10px 16px; }
.rank-no { width: 34px; text-align: center; font-size: 20px; font-weight: 900; color: var(--muted); }
.rank-no.top { color: var(--accent); }
.rank-cover { width: 46px; height: 66px; border-radius: 6px; overflow: hidden; background: var(--panel); flex: 0 0 auto; }
.rank-cover img { width: 100%; height: 100%; object-fit: cover; }
.rank-info { min-width: 0; flex: 1; }
.rank-title { font-weight: 700; font-size: 16px; }
.rank-title:hover { color: var(--accent-2); }
.rank-meta { color: var(--muted); font-size: 13px; margin: 3px 0 0; }
.rank-plays { color: #ffd166; font-weight: 700; font-size: 14px; }

/* ---------- search ---------- */
.search-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.search-top .page-title { margin: 0; }
.search-close {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--text);
  font-size: 17px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.16s;
}
.search-close:hover { border-color: var(--accent); background: var(--accent); color: #0b0b0f; }
.search-hero { display: flex; gap: 10px; margin-bottom: 26px; }
.search-hero input {
  flex: 1;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 9px;
  padding: 14px 16px;
  font-size: 16px;
}

/* ---------- watch (detail) ---------- */
.watch {
  max-width: 1500px;
  margin: 0 auto;
  padding: calc(var(--header-h) + 20px) 4vw 40px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 12px 34px;
  align-items: start;
}
.watch-comments {
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 4vw;
}
.watch-stage { position: sticky; top: calc(var(--header-h) + 14px); }
.watch-side { min-width: 0; }
.crumbs {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin: 0;
  padding: 9px 16px;
  font-size: 15px;
  letter-spacing: 0.2px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.crumbs a { color: #c5c5d0; transition: color 0.18s; }
.crumbs a:hover { color: #fff; }
.crumbs .sep { color: #5a5a66; font-size: 14px; }
.crumbs .cur { color: #fff; font-weight: 700; }
.crumbs + .page-title { margin-top: 22px; }
.watch-title { font-size: 26px; font-weight: 900; margin: 0 0 12px; line-height: 1.25; }
.side-h2 { font-size: 16px; font-weight: 800; margin: 22px 0 10px; }
.watch-desc { color: #cfcfd8; font-size: 14px; line-height: 1.8; margin: 0; white-space: pre-line; }
.ep-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.watch-related { margin-top: 24px; }
.tag-orig { color: #ffd166; }

.now-playing {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}
.now-center { grid-column: 2; display: flex; align-items: baseline; justify-content: center; gap: 10px; }
#ep-prev { justify-self: start; }
#ep-next { justify-self: end; }
.ep-nav[hidden] { display: none; }
.ep-nav {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.16s;
}
.ep-nav:hover:not(:disabled) { border-color: var(--accent); color: #fff; }
.ep-nav:disabled { opacity: 0.4; cursor: not-allowed; }
.player-frame {
  position: relative;
  margin: 0 auto;
  width: min(100%, 440px);
  aspect-ratio: var(--ar, 9 / 16);
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  transition: width 0.25s ease, height 0.25s ease;
}
.player-frame.landscape { width: 100%; }
.player-frame video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.player-mask { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 18px; background: rgba(0, 0, 0, 0.55); }
.player-ep { margin: 0; font-size: 15px; color: #d9d9e0; }

.ep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); gap: 8px; }
.ep-grid.scroll { max-height: 46vh; overflow-y: auto; padding-right: 6px; }
.ep-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 4px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  transition: all 0.16s;
}
.ep-btn small { color: var(--muted); font-size: 11px; font-weight: 400; }
.ep-btn:hover:not(:disabled):not(.active) { border-color: var(--accent); color: #fff; }
.ep-btn.active { background: var(--accent); border-color: var(--accent); color: #0b0b0f; }
.ep-btn.active:hover:not(:disabled) { background: var(--accent-2); color: #0b0b0f; }
.ep-btn.active small { color: rgba(11, 11, 15, 0.72); }
.ep-btn.soon { opacity: 0.55; cursor: not-allowed; }
.ep-btn.soon small { color: var(--accent-2); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: #08080b; margin-top: 40px; }
.footer-inner { max-width: 1500px; margin: 0 auto; padding: 40px 4vw; color: var(--muted); font-size: 13px; }
.footer-brand { color: var(--text); font-family: Georgia, "Times New Roman", "Songti SC", "STSong", "SimSun", "Noto Serif SC", serif; font-weight: 700; font-size: 19px; letter-spacing: 1px; display: flex; align-items: center; gap: 9px; margin: 0 0 10px; }
.footer-note { max-width: 680px; margin: 0 0 14px; line-height: 1.7; }
.footer-links { display: flex; gap: 18px; margin: 0 0 16px; }
.footer-links a:hover { color: #fff; }
.footer-copy { margin: 0; }

/* ---------- misc ---------- */
.notfound { min-height: 60vh; display: grid; place-content: center; text-align: center; gap: 10px; padding-top: var(--header-h); }
.notfound h1 { font-size: 64px; margin: 0; color: var(--accent); }
.prose { max-width: 820px; }
.prose h1 { font-size: 30px; }
.prose h2 { font-size: 20px; margin-top: 30px; }
.prose li { margin: 6px 0; }
.muted { color: var(--muted); }

@media (max-width: 1080px) {
  .watch { grid-template-columns: 1fr; gap: 22px; }
  .watch-stage { position: static; }
  .ep-grid.scroll { max-height: none; overflow: visible; }
  .hero-body { grid-template-columns: 1fr; }
  .hero-quote { display: none; }
}

@media (max-width: 780px) {
  :root { --header-h: 60px; }
  .header-inner { flex-wrap: nowrap; align-content: center; row-gap: 5px; column-gap: 12px; }
  .header-right { order: 1; }
  .nav { flex-basis: auto; order: 0; margin-left: 8px; gap: 14px; justify-content: flex-start; }
  .nav a:not(.mobile) { display: none; }
  .nav a .nav-label { display: none; }
  .nav a .nav-short { display: inline; }
  .nav a { font-size: 14px; }
  .logo-text { font-size: 19px; letter-spacing: 0.5px; }
  .logo-icon { width: 30px; height: 30px; }
  .hero-main { gap: 16px; }
  .hero-poster { width: 110px; }
  .hero-meta { display: none; }
  .card { width: 132px; }
  .row-nav { display: none; }
  .hero { min-height: 32vh; }
  .watch-title { font-size: 21px; }
}

/* ---------- 18+ age gate ---------- */
.age-gate {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(5, 5, 8, 0.94);
  backdrop-filter: blur(8px);
}
html.age-ok .age-gate { display: none; }
/* Lock scrolling only on the front site while the gate is up (admin bodies are
   .admin and never render the gate). */
html:not(.age-ok) body:not(.admin) { overflow: hidden; }
.age-gate-box {
  width: 100%;
  max-width: 460px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 30px 28px;
  text-align: center;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
}
.age-gate-badge {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  color: var(--accent);
  font-weight: 900;
  font-size: 15px;
  margin-bottom: 14px;
}
.age-gate-box h2 { margin: 0 0 12px; font-size: 20px; }
.age-gate-box p { color: var(--muted); font-size: 14px; line-height: 1.7; margin: 0 0 22px; }
.age-gate-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* APP download link in the header nav */
.nav a.cta { color: var(--accent); font-weight: 700; }
.nav a.cta:hover { color: var(--accent-2); }

/* --- v2: login + daily episode gate --- */
.header-right .auth-link{font-size:13px;color:var(--muted);text-decoration:none;margin-right:12px;white-space:nowrap}
.header-right .auth-link:hover{color:#0b0b0f}
.play-start{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:5;width:72px;height:72px;border-radius:50%;border:0;background:rgba(0,0,0,.55);color:#fff;font-size:28px;line-height:72px;text-align:center;cursor:pointer;backdrop-filter:blur(4px)}
.play-start:hover{background:rgba(0,0,0,.75)}
.play-gate{position:absolute;inset:0;z-index:6;display:flex;align-items:center;justify-content:center;background:rgba(6,6,10,.86);padding:16px}
.play-gate[hidden]{display:none}
.play-gate-box{max-width:340px;text-align:center;color:#fff}
.play-gate-badge{display:inline-block;background:#e5484d;color:#fff;font-weight:700;border-radius:6px;padding:2px 8px;font-size:12px;margin-bottom:10px}
.play-gate-box h3{margin:0 0 8px;font-size:18px}
.play-gate-box p{margin:0 0 16px;color:#c9ccd1;font-size:14px;line-height:1.6}
.play-gate-actions{display:flex;gap:10px;justify-content:center;flex-wrap:wrap}
.play-gate-actions a{display:inline-block;padding:9px 16px;border-radius:8px;text-decoration:none;font-size:14px}
.play-gate-actions a.primary{background:#e5484d;color:#fff}
.play-gate-actions a.secondary{border:1px solid #4a4f57;color:#e6e8eb}

/* points / wallet */
.balance-chip { display: inline-flex; align-items: center; gap: 4px; margin-right: 10px; padding: 5px 10px; border-radius: 999px; background: #f5c542; color: #1a1a1a; font-weight: 700; font-size: 13px; text-decoration: none; white-space: nowrap; }

/* account menu */
.user-menu-wrap{position:relative;display:inline-flex;align-items:center}
.user-menu{position:absolute;right:0;top:calc(100% + 8px);min-width:148px;background:#17181d;border:1px solid rgba(255,255,255,.12);border-radius:10px;padding:6px;display:flex;flex-direction:column;box-shadow:0 14px 34px rgba(0,0,0,.5);z-index:80}
.user-menu a{padding:9px 12px;border-radius:7px;color:#e8e9ec;font-size:13px;text-decoration:none;white-space:nowrap}
.user-menu a:hover{background:rgba(255,255,255,.08)}
.user-menu[hidden]{display:none}

/* mobile header: logo + short nav + account must fit on one 60px row */
@media (max-width: 780px) {
  .header-inner { gap: 8px; padding: 0 3vw; }
  .nav { gap: 10px; margin-left: 2px; }
  .nav a { font-size: 13px; }
  .header-right { gap: 6px; }
  .header-right .auth-link {
    margin-right: 0; font-size: 12px; display: inline-block; max-width: 88px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle;
  }
  .balance-chip { margin-right: 0; padding: 3px 7px; font-size: 12px; }
  .logo-text { font-size: 17px; }
  .logo-icon { width: 28px; height: 28px; }
}
@media (max-width: 400px) {
  .balance-chip { display: none; }
  .nav { gap: 8px; }
  .nav a { font-size: 12.5px; }
  .header-right .auth-link { max-width: 74px; }
}

/* avatar + account menu */
.avatar-btn{width:34px;height:34px;padding:0;border:1px solid rgba(255,255,255,.18);border-radius:50%;background:#101116;overflow:hidden;cursor:pointer;display:inline-grid;place-items:center;transition:border-color .15s}
.avatar-btn:hover{border-color:var(--accent)}
.avatar-btn:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.avatar-btn img{width:100%;height:100%;display:block;object-fit:cover}
.user-menu-head{padding:6px 12px 8px;margin-bottom:4px;border-bottom:1px solid rgba(255,255,255,.08);color:var(--muted);font-size:12px;text-align:left;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* the hidden attribute must win over display rules from component classes */
[hidden] { display: none !important; }

/* user center */
.account-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: start; }
.account-side { position: sticky; top: calc(var(--header-h) + 20px); background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.account-user { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.account-avatar { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg-soft); object-fit: cover; flex: 0 0 auto; }
.account-avatar-lg { width: 96px; height: 96px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg-soft); object-fit: cover; flex: 0 0 auto; }
.account-user-meta { display: flex; flex-direction: column; min-width: 0; }
.account-user-meta b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-user-meta .muted { font-size: 11px; }
.account-nav { display: flex; flex-direction: column; gap: 2px; }
.account-nav a { padding: 9px 10px; border-radius: 8px; color: var(--muted); font-size: 14px; text-decoration: none; }
.account-nav a:hover { background: rgba(255,255,255,.06); color: var(--text); }
.account-nav a.active { background: var(--accent); color: #0b0b0f; font-weight: 700; }
.account-main { min-width: 0; min-height: 420px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.account-main h1 { margin: 0 0 16px; font-size: 22px; }
.account-main h2 { margin: 24px 0 10px; font-size: 17px; }
.account-profile { display: flex; gap: 18px; align-items: center; margin-bottom: 22px; }
.account-facts { display: grid; gap: 8px; }
.account-facts p { margin: 0; display: flex; gap: 10px; font-size: 14px; }
.account-facts p .muted { min-width: 64px; }
.account-form { max-width: 420px; display: grid; gap: 12px; margin-top: 22px; }
.account-form label { font-size: 13px; color: var(--muted); }
.account-form input { width: 100%; margin-top: 6px; padding: 11px 13px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; }
.account-form input:focus { border-color: var(--accent); outline: none; }
.account-form button { justify-self: start; padding: 10px 20px; border: 0; border-radius: 9px; background: var(--accent); color: #0b0b0f; font-weight: 700; cursor: pointer; }
.account-form button:disabled { opacity: .55; cursor: default; }
.history-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.history-card { display: flex; gap: 12px; padding: 10px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: inherit; transition: border-color .15s; }
.history-card:hover { border-color: var(--accent); }
.history-card img { width: 72px; height: 96px; border-radius: 8px; object-fit: cover; flex: 0 0 auto; background: var(--panel); }
.history-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.history-title { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-info .muted { font-size: 12px; }
.history-time { font-size: 11px; color: var(--muted); }
.history-cta { margin-top: auto; color: var(--accent); font-size: 12px; font-weight: 700; }
.account-empty { text-align: center; padding: 50px 10px; color: var(--muted); }
.account-empty .btn-primary { display: inline-block; margin-top: 12px; }
@media (max-width: 780px) {
  .account-layout { grid-template-columns: 1fr; gap: 14px; }
  .account-side { position: static; padding: 10px; }
  .account-user { display: none; }
  .account-nav { flex-direction: row; overflow-x: auto; gap: 6px; }
  .account-nav a { white-space: nowrap; padding: 8px 12px; }
  .account-main { padding: 16px; min-height: 320px; }
  .account-profile { gap: 12px; }
  .account-avatar-lg { width: 64px; height: 64px; }
  .history-grid { grid-template-columns: 1fr; }
}

/* favorites */
.watch-actions{display:flex;gap:10px;margin:8px 0 10px}
.favorite-btn{display:inline-flex;align-items:center;gap:6px;padding:8px 16px;border-radius:9px;border:1px solid var(--line);background:transparent;color:var(--text);font-weight:600;cursor:pointer}
.favorite-btn svg{width:14px;height:14px;fill:currentColor;flex:0 0 auto}
.favorite-btn:hover{border-color:var(--accent);color:var(--accent)}
.favorite-btn.active{background:var(--accent);border-color:var(--accent);color:#0b0b0f}

/* refined points chip */
.balance-chip{display:inline-flex;align-items:center;gap:6px;height:32px;margin-right:8px;padding:0 11px 0 8px;border-radius:999px;border:1px solid rgba(239,254,62,.28);background:linear-gradient(180deg,rgba(239,254,62,.14),rgba(239,254,62,.05));color:var(--text);font-weight:700;font-size:13px;font-variant-numeric:tabular-nums;text-decoration:none;white-space:nowrap;transition:border-color .15s,background .15s}
.balance-chip:hover{border-color:var(--accent);background:linear-gradient(180deg,rgba(239,254,62,.2),rgba(239,254,62,.08))}
.balance-chip svg{width:18px;height:18px;color:var(--accent);flex:0 0 auto}
@media (max-width:780px){.balance-chip{height:30px;padding:0 9px 0 6px;font-size:12px;margin-right:0}.balance-chip svg{width:16px;height:16px}}
@media (max-width:400px){.balance-chip{display:none!important}}

/* refined empty states */
.account-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:48px 20px;min-height:340px;gap:4px}
.account-empty-icon{width:64px;height:64px;border-radius:50%;display:grid;place-items:center;background:radial-gradient(circle at 50% 35%,rgba(239,254,62,.18),rgba(239,254,62,.04));border:1px solid rgba(239,254,62,.22);color:var(--accent);margin-bottom:12px}
.account-empty-icon svg{width:30px;height:30px}
.account-empty h3{margin:0;color:var(--text);font-size:17px}
.account-empty p{margin:6px 0 0;color:var(--muted);font-size:13.5px;line-height:1.7;max-width:320px}
.account-empty-cta{display:inline-flex;align-items:center;gap:8px;margin-top:18px;padding:10px 20px;border-radius:999px;background:var(--accent);color:#0b0b0f;font-weight:700;font-size:14px;text-decoration:none;transition:background .15s,transform .06s}
.account-empty-cta:hover{background:var(--accent-2)}
.account-empty-cta:active{transform:translateY(1px)}
.account-empty-cta span{font-size:16px;line-height:1}

/* mobile branding: keep the wordmark, drop the 18+ badge to save space */
@media (max-width: 780px) {
  .badge-18 { display: none; }
  .logo-text { display: inline; white-space: nowrap; }
}

/* search at the end of the nav + a visible login pill */
.nav .search-link{display:inline-flex;align-items:center;justify-content:center;color:#d9d9e0}
.nav .search-link:hover{color:#fff}
.header-right .auth-link{display:inline-flex;align-items:center;justify-content:center;height:32px;padding:0 14px;margin-right:0;border-radius:999px;background:var(--accent);color:#0b0b0f;font-size:13px;font-weight:700;text-decoration:none;white-space:nowrap;transition:background .15s}
.header-right .auth-link:hover{background:var(--accent-2);color:#0b0b0f}
@media (max-width:780px){.header-right .auth-link{height:30px;padding:0 12px;font-size:12.5px;max-width:none}}

/* points received toasts */
.toast-root{position:fixed;right:20px;bottom:20px;z-index:1000;display:flex;flex-direction:column;gap:10px;width:min(380px,calc(100vw - 40px));pointer-events:none}
.toast{pointer-events:auto;position:relative;display:flex;align-items:flex-start;gap:12px;padding:14px 40px 14px 14px;border-radius:14px;border:1px solid rgba(239,254,62,.3);background:linear-gradient(180deg,rgba(32,32,40,.98),rgba(20,20,25,.98));box-shadow:0 18px 48px rgba(0,0,0,.55);animation:toast-in .22s ease-out}
.toast-icon{width:38px;height:38px;flex:0 0 auto;border-radius:50%;display:grid;place-items:center;background:radial-gradient(circle at 50% 35%,rgba(239,254,62,.3),rgba(239,254,62,.06));border:1px solid rgba(239,254,62,.4);color:var(--accent)}
.toast-icon svg{width:22px;height:22px}
.toast-copy{flex:1;min-width:0}
.toast-head{display:flex;align-items:baseline;justify-content:space-between;gap:10px}
.toast-title{font-size:13px;font-weight:600;color:var(--muted)}
.toast-total{font-size:20px;font-weight:900;line-height:1.1;color:var(--accent);font-variant-numeric:tabular-nums;letter-spacing:-.3px}
.toast-lines{display:flex;flex-wrap:wrap;gap:3px 12px;margin-top:5px;font-size:12.5px;color:var(--text)}
.toast-lines span{color:var(--muted)}
.toast-link{display:inline-block;margin-top:8px;color:var(--accent);font-size:12.5px;font-weight:700}
.toast-link:hover{color:var(--accent-2)}
.toast-close{position:absolute;top:6px;right:6px;width:26px;height:26px;display:grid;place-items:center;padding:0;border:0;border-radius:50%;background:transparent;color:var(--muted);font-size:18px;line-height:1}
.toast-close:hover{background:rgba(255,255,255,.08);color:#fff}
.toast-out{opacity:0;transform:translateY(8px);transition:opacity .2s ease,transform .2s ease}
@keyframes toast-in{from{opacity:0;transform:translateY(10px) scale(.98)}to{opacity:1;transform:none}}
@media (max-width:780px){.toast-root{left:12px;right:12px;bottom:12px;width:auto}.toast{padding:13px 40px 13px 13px}.toast-total{font-size:18px}}
@media (prefers-reduced-motion: reduce){.toast{animation:none}.toast-out{transition:none}}

/* /account/points: wallet hero, earn strip, invite card, ledger */
.wallet-hero{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:24px;margin:0 0 16px;border:1px solid rgba(239,254,62,.22);border-radius:16px;background:radial-gradient(120% 160% at 0% 0%,rgba(239,254,62,.12),rgba(239,254,62,.02) 55%,transparent),var(--bg-soft)}
.wallet-hero-label{display:block;color:var(--muted);font-size:12.5px;letter-spacing:.4px}
.wallet-hero-balance{display:flex;align-items:center;gap:10px;margin:4px 0 2px;font-size:44px;font-weight:900;line-height:1.05;letter-spacing:-1px;font-variant-numeric:tabular-nums}
.wallet-coin{width:30px;height:30px;color:var(--accent);flex:0 0 auto}
.wallet-price{display:flex;align-items:baseline;flex-wrap:wrap;gap:7px;color:var(--muted);font-size:13px}
.wallet-price-now{color:var(--text);font-weight:600}
.wallet-price s{color:var(--muted);font-size:12.5px}
.wallet-price em{padding:2px 8px;border-radius:999px;border:1px solid rgba(239,254,62,.35);background:rgba(239,254,62,.14);color:var(--accent);font-size:11.5px;font-style:normal;font-weight:700}
.wallet-hero-actions{display:flex;flex-direction:column;gap:8px;min-width:150px;flex:0 0 auto}
.wallet-cta{display:inline-flex;align-items:center;justify-content:center;height:38px;padding:0 18px;border-radius:999px;font-size:13.5px;font-weight:700;white-space:nowrap;transition:background .15s,border-color .15s,color .15s}
.wallet-cta.primary{background:var(--accent);color:#0b0b0f}
.wallet-cta.primary:hover{background:var(--accent-2)}
.wallet-cta.secondary{border:1px solid var(--line);color:var(--text)}
.wallet-cta.secondary:hover{border-color:var(--accent);color:var(--accent)}
.earn-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:0 0 18px}
.earn-card{display:flex;flex-direction:column;gap:2px;padding:13px 15px;border:1px solid var(--line);border-radius:12px;background:var(--bg-soft)}
.earn-card span{color:var(--muted);font-size:12.5px}
.earn-card b{color:var(--accent);font-size:17px;font-variant-numeric:tabular-nums}
.earn-card small{color:var(--muted);font-size:11.5px}
.invite-card{padding:20px;margin:0 0 22px;border:1px solid rgba(239,254,62,.3);border-radius:14px;background:linear-gradient(180deg,rgba(239,254,62,.09),rgba(239,254,62,.03)),var(--bg-soft)}
#invite{scroll-margin-top:calc(var(--header-h) + 16px)}
.invite-head h2{margin:0;font-size:17px}
.invite-head p{margin:6px 0 14px;color:var(--muted);font-size:13px;line-height:1.6}
.invite-field{display:flex;align-items:center;gap:8px;padding:4px 4px 4px 12px;border:1px solid var(--line);border-radius:10px;background:var(--bg)}
.invite-input{flex:1;min-width:0;padding:8px 0;border:0;background:transparent;color:var(--text);font-size:13px;font-family:inherit}
.invite-input:focus{outline:none}
.copy-btn{flex:0 0 auto;height:34px;padding:0 14px;border:0;border-radius:8px;background:var(--accent);color:#0b0b0f;font-size:13px;font-weight:700;line-height:1;transition:background .15s}
.copy-btn:hover{background:var(--accent-2)}
.copy-btn.copied{background:var(--accent-2)}
.ledger-head{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin:0 0 4px}
.ledger-head h2{margin:0;font-size:17px}
.ledger-list{list-style:none;margin:0;padding:0;border-top:1px solid var(--line)}
.ledger-list li{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:12px;padding:11px 2px;border-bottom:1px solid var(--line);font-size:13.5px}
.ledger-type{font-weight:500}
.ledger-when{color:var(--muted);font-size:12px;font-variant-numeric:tabular-nums;white-space:nowrap}
.ledger-list .plus{color:#5ee293;font-weight:800;font-variant-numeric:tabular-nums}
.ledger-list .minus{color:#ff8a8a;font-weight:800;font-variant-numeric:tabular-nums}
@media (max-width:780px){
  .wallet-hero{flex-direction:column;align-items:stretch;gap:16px;padding:20px}
  .wallet-hero-balance{font-size:38px}
  .wallet-coin{width:26px;height:26px}
  .wallet-hero-actions{flex-direction:row;min-width:0}
  .wallet-cta{flex:1;padding:0 12px}
  .earn-grid{grid-template-columns:1fr}
  .earn-card{flex-direction:row;align-items:center;justify-content:space-between;padding:11px 14px}
  .earn-card small{display:none}
  .invite-card{padding:16px}
}
@media (max-width:520px){
  .ledger-list li{grid-template-columns:minmax(0,1fr) auto;gap:3px 10px}
  .ledger-type{grid-column:1}
  .ledger-when{grid-column:1;font-size:11.5px}
  .ledger-list .plus,.ledger-list .minus{grid-column:2;grid-row:1 / span 2;align-self:center}
  .invite-field{padding-left:10px}
  .copy-btn{padding:0 11px}
}

/* pricing disclosure: watching costs points, current promo vs original price */
.watch-price{margin:0 0 12px;padding:10px 12px;border:1px solid rgba(239,254,62,.24);border-radius:11px;background:linear-gradient(180deg,rgba(239,254,62,.08),rgba(239,254,62,.02))}
.watch-price-top{display:flex;flex-wrap:wrap;align-items:baseline;gap:8px}
.watch-price-main{color:var(--text);font-size:13.5px}
.watch-price-main b{font-size:22px;font-weight:900;color:var(--accent);line-height:1}
.watch-price-old{color:var(--muted);font-size:12.5px}
.watch-price-off{padding:2px 8px;border-radius:999px;border:1px solid rgba(239,254,62,.35);background:rgba(239,254,62,.14);color:var(--accent);font-size:12px;font-weight:700}
.watch-price-note{margin:6px 0 0;color:var(--muted);font-size:12.5px;line-height:1.6}
.now-center{flex-direction:column;align-items:center;gap:2px}
.now-price{font-size:12px;color:var(--muted);white-space:nowrap}

/* daily check-in card */
.checkin-card{margin:0 0 18px;padding:20px;border:1px solid rgba(239,254,62,.28);border-radius:14px;background:linear-gradient(180deg,rgba(239,254,62,.1),rgba(239,254,62,.03)),var(--bg-soft)}
.checkin-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:16px}
.checkin-head h2{margin:0;font-size:17px}
.checkin-head p{margin:5px 0 0;color:var(--muted);font-size:12.5px}
.checkin-btn{flex:0 0 auto;height:38px;padding:0 18px;border:0;border-radius:999px;background:var(--accent);color:#0b0b0f;font-size:13.5px;font-weight:800;line-height:1;cursor:pointer;transition:background .15s}
.checkin-btn:hover:not(:disabled){background:var(--accent-2)}
.checkin-btn:disabled{background:rgba(239,254,62,.18);color:var(--muted);cursor:default}
.checkin-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px}
.checkin-day{display:flex;flex-direction:column;align-items:center;gap:3px;padding:10px 4px;border:1px solid var(--line);border-radius:10px;background:var(--bg);text-align:center;transition:border-color .15s,background .15s}
.checkin-day-label{color:var(--muted);font-size:11.5px;white-space:nowrap}
.checkin-day b{color:var(--text);font-size:14px;font-weight:800;font-variant-numeric:tabular-nums}
.checkin-day small{color:var(--muted);font-size:11px;white-space:nowrap}
.checkin-day.claimed{border-color:rgba(239,254,62,.32);background:rgba(239,254,62,.07)}
.checkin-day.claimed b,.checkin-day.claimed small{color:var(--accent)}
.checkin-day.today{border-color:var(--accent);background:rgba(239,254,62,.14);box-shadow:inset 0 0 0 1px rgba(239,254,62,.25)}
.checkin-day.grand .checkin-day-label{color:var(--accent)}
.checkin-progress{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:12px;color:var(--muted);font-size:12.5px}
.checkin-next{color:var(--accent);font-weight:700}
.checkin-card.is-done .checkin-progress{color:var(--muted)}
.balance-chip{position:relative}
.balance-chip.has-checkin::after{content:"";position:absolute;top:4px;right:5px;width:7px;height:7px;border-radius:50%;background:#ff5a5f;box-shadow:0 0 0 2px var(--bg)}
@media (max-width:600px){
  .checkin-card{padding:16px}
  .checkin-head{flex-direction:column;gap:12px}
  .checkin-btn{width:100%}
  .checkin-days{grid-template-columns:repeat(4,minmax(0,1fr))}
  .checkin-day:nth-child(7){grid-column:span 2}
  .checkin-progress{flex-direction:column;align-items:flex-start;gap:4px}
}

/* point notice message + ledger note */
.toast-note{flex:0 0 100%;color:var(--text);font-size:12px;line-height:1.55;margin-top:1px}
.ledger-note{display:block;color:var(--muted);font-size:11.5px;font-weight:400;margin-top:2px;line-height:1.5}

/* in-app browser guidance on /login */
.inapp-page{min-height:60vh;display:flex;align-items:center;justify-content:center;padding:44px 4vw}
.inapp-card{width:100%;max-width:500px;padding:34px 30px;border:1px solid var(--line);border-radius:18px;background:var(--bg-soft);text-align:center;box-shadow:0 24px 60px rgba(0,0,0,.35)}
.inapp-icon{display:grid;place-items:center;width:54px;height:54px;margin:0 auto;border-radius:50%;border:1px solid rgba(239,254,62,.35);background:rgba(239,254,62,.12);color:var(--accent);font-size:24px;font-weight:900}
.inapp-card h1{margin:16px 0 8px;font-size:22px}
.inapp-lead{margin:0 auto 18px;max-width:400px;color:var(--muted);font-size:14px;line-height:1.75}
.inapp-steps{max-width:340px;margin:0 auto 22px;padding-left:22px;text-align:left;color:var(--text);font-size:14px;line-height:1.9}
.inapp-steps li::marker{color:var(--accent);font-weight:700}
.inapp-steps b{color:var(--accent)}
.inapp-actions{display:flex;flex-direction:column;align-items:center;gap:12px}
.inapp-actions .copy-btn{min-width:132px;height:42px;padding:0 20px;font-size:14px}
.inapp-continue{color:var(--muted);font-size:12.5px;text-decoration:underline;text-underline-offset:3px}
.inapp-continue:hover{color:var(--text)}
.inapp-note{margin:20px 0 0;color:var(--muted);font-size:12px;line-height:1.65}
@media (max-width:600px){
  .inapp-page{padding:28px 14px}
  .inapp-card{padding:26px 20px}
  .inapp-card h1{font-size:20px}
}

/* comments */
.comments{margin:28px 0 24px;padding:22px;border:1px solid var(--line);border-radius:16px;background:var(--bg-soft)}
.comments-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex-wrap:wrap}
.comments-controls{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:14px 0 0;flex-wrap:wrap}
.comments-title{margin:0;font-size:20px;font-weight:800;display:flex;align-items:baseline;gap:6px}
.comments-total{color:var(--muted);font-size:13px;font-weight:500}
.comments-head-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.comment-select-wrap{display:inline-flex;align-items:center;gap:6px;color:var(--muted);font-size:11.5px}
.comment-select{appearance:none;-webkit-appearance:none;width:auto;background:var(--bg);border:1px solid var(--line);color:var(--text);border-radius:8px;padding:7px 24px 7px 10px;font:inherit;font-size:12.5px;cursor:pointer;background-image:linear-gradient(45deg,transparent 50%,var(--muted) 50%),linear-gradient(135deg,var(--muted) 50%,transparent 50%);background-position:calc(100% - 13px) 50%,calc(100% - 9px) 50%;background-size:5px 5px,5px 5px;background-repeat:no-repeat;transition:border-color .15s,color .15s}
.comment-select:hover,.comment-select:focus{border-color:var(--accent);color:var(--accent);outline:none}
.comment-select option{background:var(--bg);color:var(--text)}
[data-comment-count]{color:inherit;opacity:.65;font-size:11px}
.comment-form{display:flex;align-items:flex-start;gap:11px;margin:12px 0 10px;padding:12px;border:1px solid var(--line);border-radius:13px;background:var(--bg)}
.comment-avatar{flex:0 0 auto;border-radius:50%;background:var(--bg-soft);object-fit:cover}
.comment-form-main{flex:1;min-width:0}
.comment-form textarea{display:block;width:100%;min-height:78px;resize:vertical;border:0;outline:none;background:transparent;color:var(--text);font:inherit;font-size:14px;line-height:1.7;padding:2px 0}
.comment-form textarea::placeholder{color:var(--muted)}
.comment-form-foot{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:7px;padding-top:9px;border-top:1px solid var(--line)}
.comment-target-wrap{display:inline-flex;align-items:center;gap:6px;color:var(--muted);font-size:11.5px;margin-right:auto}
.comment-target-label{white-space:nowrap}
.comment-target-value{color:var(--text);font-weight:700}
.comment-target-toggle{border:0;background:transparent;color:var(--accent);font:inherit;font-size:11.5px;padding:0;cursor:pointer;border-bottom:1px dotted currentColor}
.comment-target-toggle:hover{color:var(--accent-2)}
.comment-count{color:var(--muted);font-size:11.5px;font-variant-numeric:tabular-nums}
.comment-submit{height:34px;padding:0 16px;border:0;border-radius:999px;background:var(--accent);color:#0b0b0f;font:inherit;font-size:13px;font-weight:800;cursor:pointer;transition:background .15s}
.comment-submit:hover:not(:disabled){background:var(--accent-2)}
.comment-submit:disabled{opacity:.55;cursor:default}
.comment-login{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:18px 0 10px;padding:14px 16px;border:1px dashed var(--line);border-radius:12px;color:var(--muted);font-size:13px}
.comment-login-btn{flex:0 0 auto;padding:7px 15px;border-radius:999px;background:var(--accent);color:#0b0b0f;font-size:12.5px;font-weight:800}
.comment-login-btn:hover{background:var(--accent-2)}
.comment-msg{margin:10px 0 0;padding:9px 12px;border-radius:9px;font-size:12.5px;line-height:1.6}
.comment-msg.error{border:1px solid rgba(255,138,138,.35);background:rgba(255,90,95,.1);color:#ffb3b3}
.comment-msg.ok{border:1px solid rgba(94,226,147,.3);background:rgba(94,226,147,.08);color:#8ff0b5}
.comments-list{border-top:1px solid var(--line)}
.comment-item{display:flex;align-items:flex-start;gap:11px;padding:15px 2px;border-bottom:1px solid var(--line)}
.comment-item.is-mine{background:linear-gradient(90deg,rgba(239,254,62,.045),transparent 55%)}
.comment-body{flex:1;min-width:0}
.comment-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:12px;color:var(--muted)}
.comment-user{color:var(--text);font-size:13px;font-weight:700}
.comment-badge{padding:1px 7px;border-radius:999px;border:1px solid var(--line);background:var(--bg);color:var(--muted);font-size:10.5px;white-space:nowrap}
.comment-time{font-size:11px;color:var(--muted);white-space:nowrap}
.comment-text{margin:6px 0 8px;color:var(--text);font-size:13.5px;line-height:1.75;white-space:pre-wrap;overflow-wrap:anywhere}
.comment-side{display:flex;flex-direction:column;align-items:flex-end;gap:10px;flex:0 0 auto;margin-left:auto}
.comment-side-meta{display:inline-flex;align-items:center;gap:8px}
.comment-like{display:inline-flex;align-items:center;justify-content:center;gap:4px;min-width:44px;height:34px;padding:0 10px;border:1px solid var(--line);border-radius:999px;background:var(--bg);color:var(--muted);font:inherit;font-size:12.5px;cursor:pointer;transition:border-color .15s,color .15s,background .15s}
.comment-like:hover:not(:disabled){border-color:var(--accent);color:var(--accent)}
.comment-like.active{border-color:var(--accent);background:rgba(239,254,62,.12);color:var(--accent);font-weight:700}
.comment-like:disabled{cursor:default;opacity:.55}
.comment-like.active:disabled{opacity:1}
.comment-like-icon::before{content:"♡";font-size:16px;line-height:1}
.comment-like.active .comment-like-icon::before{content:"♥"}
.comment-report{border:0;background:transparent;color:var(--muted);font:inherit;font-size:11px;cursor:pointer;padding:0}
.comment-report:hover{color:#ff9a9a}
#comment-form-anchor{scroll-margin-top:calc(var(--header-h) + 14px)}
.comment-empty,.comment-loading{padding:24px 4px;color:var(--muted);font-size:13px;text-align:center}
.comments-more{display:block;width:100%;margin:12px 0 0;padding:10px;border:1px solid var(--line);border-radius:10px;background:var(--bg);color:var(--text);font:inherit;font-size:13px;cursor:pointer}
.comments-more:hover:not(:disabled){border-color:var(--accent);color:var(--accent)}
.comments-more:disabled{opacity:.6;cursor:default}
@media (max-width:640px){
  .comments{padding:16px;margin-top:20px}
  .comments-head{gap:10px}
  .comments-title{font-size:18px}
  .comments-controls{gap:8px;margin-top:10px}
  .comment-form{padding:10px}
  .comment-form-foot{gap:6px;flex-wrap:nowrap}
  .comment-target-wrap{width:auto;min-width:0;margin-right:auto}
  .comment-count{margin-left:0;flex:0 0 auto}
  .comment-submit{width:auto;flex:0 0 auto;padding:0 14px}
  .comment-login{flex-direction:column;align-items:flex-start}
  .comment-login-btn{width:100%;text-align:center}
  .comment-time{margin-left:0}
}

/* contextual comment quota + rules hover */
.comments-sub{display:flex;align-items:center;gap:8px;flex-wrap:wrap;position:relative}
.comment-context-text{color:var(--text);font-size:12.5px;line-height:1.5}
.comment-context-text:empty{display:none}
.comment-rules-tip{position:relative;display:inline-flex;align-items:center;gap:4px;color:var(--muted);font-size:11.5px;line-height:1.5;cursor:help;border-radius:6px;outline:none}
.comment-rules-tip:hover,.comment-rules-tip:focus{color:var(--accent)}
.comment-rules-tip:focus-visible{box-shadow:0 0 0 2px rgba(239,254,62,.25)}
.comment-rules-icon{display:inline-grid;place-items:center;width:15px;height:15px;border-radius:50%;border:1px solid currentColor;font-size:10px;font-weight:800;line-height:1;flex:0 0 auto}
.comment-rules-label{border-bottom:1px dotted currentColor}
.comment-rules-pop{position:absolute;left:0;top:calc(100% + 9px);z-index:30;width:min(340px,calc(100vw - 44px));padding:13px 15px;border:1px solid var(--line);border-radius:11px;background:var(--bg);box-shadow:0 16px 38px rgba(0,0,0,.42);color:var(--text);font-size:12px;font-weight:400;line-height:1.7;white-space:normal;opacity:0;visibility:hidden;transform:translateY(-3px);transition:opacity .15s,transform .15s,visibility .15s;pointer-events:none}
.comment-rules-pop::before{content:"";position:absolute;left:16px;top:-5px;width:8px;height:8px;border-left:1px solid var(--line);border-top:1px solid var(--line);background:var(--bg);transform:rotate(45deg)}
.comments-head-meta .comment-rules-pop{left:auto;right:0}
.comments-head-meta .comment-rules-pop::before{left:auto;right:16px}

.comment-rules-tip:hover .comment-rules-pop,.comment-rules-tip:focus .comment-rules-pop,.comment-rules-tip:focus-within .comment-rules-pop{opacity:1;visibility:visible;transform:none;pointer-events:auto}
.comment-rules-pop b{display:block;margin-bottom:6px;color:var(--text);font-size:12.5px}
.comment-rules-line{display:block;color:var(--muted)}
.comment-rules-line + .comment-rules-line{margin-top:4px}
@media (max-width:640px){
  .comments-head-meta{align-items:flex-start}
  .comment-rules-pop{left:auto;right:0}
  .comment-rules-pop::before{left:auto;right:16px}
}
