/* JadeReel theme — values measured from the reference capture */
:root {
  --bg: #1a1625;
  --bg-deep: #15111e;
  --bg-panel: #1e1a2b;
  --bg-card: #2a2438;
  --input: #3a2f4b;
  --muted: #c4b5cf;
  --muted-2: #a89bb5;
  --muted-3: #7d6e8c;
  --intro: #b5a7c2;
  --pink: #ff8fb1;
  --hot: #ff4081;
  --red: #ef4444;
  --grey-text: #9ca3af;
  --light-text: #d1d5db;
  --footer-space: 360px;
}

body {
  background-color: var(--bg);
  color: #fff;
  font-family: 'Prompt', sans-serif;
  min-height: 100vh;
  position: relative;
  padding-bottom: var(--footer-space) !important;
}
@media (max-width: 767px) {
  body { --footer-space: 420px; }
}

:where(a) { color: var(--pink); }
:where(a:hover) { color: var(--hot); }

.shell {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Header */
.brand { font-weight: 700; color: #fff; }
.finder { position: relative; width: 60%; max-width: 400px; }
.finder input {
  background-color: var(--input);
  color: #fff;
  border: 0;
  border-radius: 9999px;
  padding: 0.4rem 2.5rem 0.4rem 1rem;
  width: 100%;
}
.finder input::placeholder { color: var(--muted); }
.finder input:focus { outline: none; box-shadow: 0 0 0 2px rgba(255, 64, 129, 0.4); }
.finder button {
  position: absolute;
  top: 50%;
  right: 0.5rem;
  transform: translateY(-50%);
  background: none;
  border: 0;
  color: #fff;
  padding: 0.25rem;
  line-height: 0;
}

/* Intro */
.intro { padding: 0.25rem 0 0.5rem; }
.intro-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.35rem;
  line-height: 1.35;
}
@media (min-width: 768px) { .intro-title { font-size: 1.7rem; } }
.intro-text { color: var(--intro); font-size: 0.9rem; line-height: 1.7; margin: 0; max-width: 60rem; }

/* Row headers */
.row-head {
  border-radius: 0.75rem;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(2px);
}
.row-head h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.row-head .ico {
  padding: 0.5rem;
  border-radius: 0.5rem;
  border: 1px solid;
  display: inline-flex;
}
.row-head .more {
  font-size: 0.875rem;
  padding: 0.4rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.2s ease;
}
.row-head .more:hover { filter: brightness(1.15); }

.tone-red { background: linear-gradient(to right, rgba(220,38,38,.2), rgba(239,68,68,.1)); border-color: rgba(239,68,68,.2); }
.tone-red h2 { color: #f87171; }
.tone-red .ico { background: rgba(239,68,68,.2); border-color: rgba(239,68,68,.3); color: #f87171; }

.tone-orange { background: linear-gradient(to right, rgba(234,88,12,.2), rgba(245,158,11,.1)); border-color: rgba(249,115,22,.2); }
.tone-orange h2 { color: #fb923c; }
.tone-orange .ico, .tone-orange .more { background: rgba(249,115,22,.2); border-color: rgba(249,115,22,.3); color: #fb923c; }
.tone-orange .more { color: #fdba74; }

.tone-green { background: linear-gradient(to right, rgba(22,163,74,.2), rgba(16,185,129,.1)); border-color: rgba(34,197,94,.2); }
.tone-green h2 { color: #4ade80; }
.tone-green .ico, .tone-green .more { background: rgba(34,197,94,.2); border-color: rgba(34,197,94,.3); color: #4ade80; }
.tone-green .more { color: #86efac; }

.tone-blue { background: linear-gradient(to right, rgba(37,99,235,.2), rgba(6,182,212,.1)); border-color: rgba(59,130,246,.2); }
.tone-blue h2 { color: #60a5fa; }
.tone-blue .ico, .tone-blue .more { background: rgba(59,130,246,.2); border-color: rgba(59,130,246,.3); color: #60a5fa; }
.tone-blue .more { color: #93c5fd; }

.tone-purple { background: linear-gradient(to right, rgba(147,51,234,.2), rgba(236,72,153,.1)); border-color: rgba(168,85,247,.2); }
.tone-purple h2 { color: #c084fc; }
.tone-purple .ico, .tone-purple .more { background: rgba(168,85,247,.2); border-color: rgba(168,85,247,.3); color: #c084fc; }
.tone-purple .more { color: #d8b4fe; }

.tone-gray { background: linear-gradient(to right, rgba(75,85,99,.2), rgba(100,116,139,.1)); border-color: rgba(107,114,128,.2); }
.tone-gray h2, .tone-gray .ico, .tone-gray .more { color: #d1d5db; }
.tone-gray .ico, .tone-gray .more { background: rgba(107,114,128,.2); border-color: rgba(107,114,128,.3); }

/* Poster grid */
.posters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}
@media (min-width: 768px) {
  .posters { grid-template-columns: repeat(6, 1fr); gap: 1rem; }
}
.poster {
  position: relative;
  overflow: hidden;
  border-radius: 0.5rem;
  display: flex;
  flex-direction: column;
}
.poster a, .poster a:hover, .poster a:focus { text-decoration: none; color: #fff; }
.poster img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 0.5rem;
  transition: transform 0.3s ease;
}
.poster:hover img { transform: scale(1.05); }
.poster .name {
  position: relative;
  padding: 0.5rem;
  background: var(--bg);
  color: #fff;
  font-size: 0.875rem;
  text-align: center;
  border-bottom-left-radius: 0.5rem;
  border-bottom-right-radius: 0.5rem;
}
@media (min-width: 768px) {
  .poster .name { padding: 0.75rem; }
  .poster:hover img { transform: scale(1.08); }
}
@media (min-width: 1024px) {
  .poster img { transition: transform 0.4s ease, filter 0.3s ease; }
  .poster:hover img { filter: brightness(1.1); }
}

.badge-lang {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  color: #fff;
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 0.375rem;
  font-weight: 500;
  line-height: 1.5;
  box-shadow: 0 2px 4px rgba(0,0,0,.2);
  border: 1px solid rgba(255,255,255,.2);
}
.badge-lang.dub { background: linear-gradient(to right, #2563eb, #3b82f6); }
.badge-lang.sub { background: linear-gradient(to right, #16a34a, #22c55e); }

/* Pills */
.pill {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  text-decoration: none;
  border: 1px solid;
  transition: background 0.2s;
}
.pill:hover { filter: brightness(1.2); }
.pill.red { background: rgba(239,68,68,.2); color: #fca5a5; border-color: rgba(239,68,68,.3); }
.pill.indigo { background: rgba(99,102,241,.2); color: #a5b4fc; border-color: rgba(99,102,241,.3); }
.pill.violet { background: rgba(139,92,246,.2); color: #c4b5fd; border-color: rgba(139,92,246,.3); }
.pill.blue { background: rgba(59,130,246,.2); color: #93c5fd; border-color: rgba(59,130,246,.3); }
.pill.green { background: rgba(34,197,94,.2); color: #86efac; border-color: rgba(34,197,94,.3); }
.pill.emerald { background: rgba(16,185,129,.2); color: #6ee7b7; border-color: rgba(16,185,129,.3); }
.pill.orange { background: rgba(249,115,22,.2); color: #fdba74; border-color: rgba(249,115,22,.3); }

/* Info section */
.about {
  background-color: rgba(17,24,39,.3);
  backdrop-filter: blur(2px);
  padding: 2rem 1rem;
  position: relative;
  box-shadow: 0 var(--footer-space) 0 rgba(17,24,39,.3);
}
.about-title {
  font-size: 1.75rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1.5rem;
  background: linear-gradient(to right, #f87171, #f472b6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.about-body { color: var(--light-text); font-size: 0.95rem; line-height: 1.85; text-align: left; }
.about-body p { margin: 0 0 1rem; }
.about-body h3 { font-size: 1.1rem; font-weight: 600; color: #fbbf24; margin: 1.5rem 0 0.6rem; }
.about-body a { color: #f87171; text-decoration: underline; text-underline-offset: 3px; }
.about-body a:hover { color: #fca5a5; }
.genres { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.25rem 0 1.25rem; }
.genres .pill { text-decoration: none; }

.qa {
  background-color: rgba(31,41,55,.5);
  border: 1px solid rgba(55,65,81,.5);
  border-radius: 0.5rem;
  padding: 1.5rem;
  height: 100%;
}
.qa h4 { margin-bottom: 0.75rem; font-weight: 600; }
.qa p { color: var(--light-text); font-size: 0.875rem; line-height: 1.6; margin: 0; }
.qa.green h4 { color: #4ade80; }
.qa.blue h4 { color: #60a5fa; }
.qa.purple h4 { color: #c084fc; }
.qa.red h4 { color: #f87171; }

/* Footer */
.site-foot {
  background: var(--bg-deep);
  color: var(--muted);
  padding: 2rem 0 6rem;
  font-family: 'Prompt', sans-serif;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  margin: 0;
}
.foot-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 1.25rem;
}
.foot-brand {
  flex: 0 1 auto;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
}
.foot-brand:hover { color: inherit; text-decoration: none; }
.foot-logo { width: 72px; height: 72px; flex-shrink: 0; border-radius: 50%; display: block; }
.foot-name { font-size: 1.5rem; font-weight: 700; color: #fff; line-height: 1.2; }
.foot-tag { color: var(--muted-2); font-size: 0.875rem; margin-top: 0.25rem; }
.foot-links { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; }
.foot-links a { color: var(--muted); text-decoration: none; font-size: 0.95rem; transition: color 0.15s; }
.foot-links a:hover { color: var(--pink); }
@media (max-width: 767px) {
  .foot-top { flex-direction: column; align-items: stretch; gap: 1.25rem; }
  .foot-brand { align-self: flex-start; }
  .foot-links { justify-content: center; gap: 0.6rem 1.25rem; font-size: 0.9rem; }
}
.foot-copy { text-align: center; color: var(--muted-3); font-size: 0.85rem; }
.foot-copy strong { color: var(--muted); }

/* Bottom menu */
.dock {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--bg);
  border-top: 1px solid var(--input);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0.5rem 0;
  z-index: 100;
}
.dock a {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--grey-text);
  text-decoration: none;
  font-size: 0.75rem;
  line-height: 1.5;
}
.dock a.on, .dock a:hover { color: var(--hot); }
.dock svg { width: 1.5rem; height: 1.5rem; margin-bottom: 0.25rem; display: block; }

/* News pop-up */
.news-veil {
  position: fixed;
  inset: 0;
  z-index: 1060;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
  background: rgba(0,0,0,.6);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.news-veil.open { display: flex; animation: veil-in 0.3s ease-out; }
.news-veil.closing { animation: veil-out 0.3s ease-in; }
@keyframes veil-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes veil-out { from { opacity: 1; } to { opacity: 0; } }
.news {
  background: var(--bg);
  border: 1px solid #2d2740;
  border-radius: 14px;
  width: 100%;
  max-width: 500px;
  max-height: 92vh;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,.6);
  display: flex;
  flex-direction: column;
  color: #fff;
  font-family: 'Prompt', sans-serif;
  animation: news-pop 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.05s both;
}
@keyframes news-pop {
  from { opacity: 0; transform: scale(0.94) translateY(12px); }
  to { opacity: 1; transform: none; }
}
.news-head { padding: 16px 20px; display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.news-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); box-shadow: 0 0 10px var(--red); flex-shrink: 0; }
.news-title { font-size: 19px; font-weight: 700; color: #fff; flex: 1; margin: 0; line-height: 1.3; }
.news-x { background: none; border: 0; color: #888; cursor: pointer; padding: 4px; line-height: 0; flex-shrink: 0; transition: color 0.2s; }
.news-x:hover { color: #fff; }
.news-body { padding: 20px; overflow-y: auto; flex: 1; }
.news-body::-webkit-scrollbar { width: 4px; }
.news-body::-webkit-scrollbar-thumb { background: #333; border-radius: 2px; }
.news-banners { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.news-banner {
  display: block;
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.2s, opacity 0.2s;
}
.news-banner:hover { transform: scale(1.02); opacity: 0.92; }
.news-banner img { width: 100%; height: auto; display: block; }
.news-label {
  font-size: 12px;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}
.news-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.news-link {
  background: #2b2640;
  border: 1px solid #3b3654;
  border-radius: 12px;
  padding: 14px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  color: #fff;
  transition: all 0.2s;
}
.news-link:hover { background: #36304f; border-color: var(--red); color: #fff; }
.news-ico { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.news-ico svg { width: 18px; height: 18px; }
.news-ico.fb { background: #1877f2; }
.news-ico.tt { background: #000; border: 1px solid #444; }
.news-ico.li { background: #00b900; }
.news-link span { font-size: 13px; font-weight: 500; color: #fff; line-height: 1.5; }
.news-foot { padding: 4px 20px 20px; flex-shrink: 0; background: var(--bg); }
.news-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  cursor: pointer;
  user-select: none;
  padding: 4px 2px;
  width: fit-content;
}
.news-check input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.news-box {
  width: 20px;
  height: 20px;
  border: 1.5px solid #5a5575;
  border-radius: 6px;
  background: var(--bg);
  position: relative;
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.news-box::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 6px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.18s ease;
}
.news-check:hover .news-box { border-color: var(--red); }
.news-check input:checked + .news-box { background: var(--red); border-color: var(--red); }
.news-check input:checked + .news-box::after { transform: rotate(45deg) scale(1); }
.news-check input:focus-visible + .news-box { outline: 2px solid var(--red); outline-offset: 2px; }
.news-check .lbl { font-size: 14px; color: #aaa; line-height: 1.5; transition: color 0.2s; }
.news-check input:checked ~ .lbl { color: #fff; }
.news-ok {
  background: var(--red);
  color: #fff;
  border: 0;
  width: 100%;
  padding: 15px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.5;
  cursor: pointer;
  transition: background 0.2s;
  font-family: 'Prompt', sans-serif;
}
.news-ok:hover { background: #dc2626; }
.news-ok:active { background: #b91c1c; }

/* Series page extras */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  text-decoration: none;
  border: 1px solid;
  transition: filter 0.2s, transform 0.2s;
}
.chip:hover { filter: brightness(1.25); transform: translateY(-1px); }
.chip.rose { background: rgba(244,63,94,.2); color: #fda4af; border-color: rgba(244,63,94,.35); }
.chip.pink { background: rgba(236,72,153,.2); color: #f9a8d4; border-color: rgba(236,72,153,.35); }
.chip.blue { background: rgba(59,130,246,.2); color: #93c5fd; border-color: rgba(59,130,246,.35); }
.stars { display: inline-flex; gap: 2px; line-height: 1; }
.toast {
  position: fixed;
  left: 50%;
  bottom: 90px;
  transform: translateX(-50%);
  background: #2a2438;
  color: #fff;
  border: 1px solid rgba(255,255,255,.1);
  padding: 0.6rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  z-index: 200;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.toast.show { opacity: 1; }
@keyframes rise-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

[hidden] { display: none !important; }

/* ===== New pages (category, watch, history, profile, info) ===== */
.chip.indigo { background: rgba(99,102,241,.2); color: #a5b4fc; border-color: rgba(99,102,241,.35); }
.chip.purple { background: rgba(168,85,247,.2); color: #d8b4fe; border-color: rgba(168,85,247,.35); }
.chip.amber { background: rgba(245,158,11,.2); color: #fcd34d; border-color: rgba(245,158,11,.35); }
.chip.green { background: rgba(34,197,94,.2); color: #86efac; border-color: rgba(34,197,94,.35); }
.chip.teal { background: rgba(20,184,166,.2); color: #5eead4; border-color: rgba(20,184,166,.35); }
.chip.orange { background: rgba(249,115,22,.2); color: #fdba74; border-color: rgba(249,115,22,.35); }

.crumbs { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; font-size: 0.85rem; color: var(--muted-3); margin: 0.25rem 0 1rem; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: #fff; }
.crumbs b { color: #e5e7eb; font-weight: 500; }

.cat-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
@media (min-width: 560px) { .cat-cards { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .cat-cards { gap: 0.75rem; } }
.cat-card {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 0.5rem;
  min-height: 56px; border-radius: 0.5rem; padding: 0.5rem 0.7rem; color: #fff; text-decoration: none;
  transition: transform .25s ease, box-shadow .25s ease;
}
.cat-card:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.35); }
.cat-card .cat-ico { width: 1.5rem; height: 1.5rem; grid-row: 1 / span 2; }
.cat-card .cat-name { font-weight: 500; font-size: 0.9rem; line-height: 1.25; align-self: end; }
.cat-card .cat-count { font-size: 0.7rem; opacity: .85; line-height: 1.3; align-self: start; }
.cat-card.on { outline: 2px solid #fff; outline-offset: 2px; }
.cat-card:last-child { grid-column: span 2; }
@media (min-width: 560px) { .cat-card:last-child { grid-column: auto; } }
.g-new { background: linear-gradient(135deg, #4ade80, #16a34a); }
.g-popular { background: linear-gradient(135deg, #ef4444, #b91c1c); }
.g-thai { background: linear-gradient(135deg, #60a5fa, #2563eb); }
.g-sub { background: linear-gradient(135deg, #fbbf24, #d97706); }
.g-all { background: linear-gradient(135deg, #a855f7, #7e22ce); }
.cat-sub { color: var(--red); font-size: 1.05rem; font-weight: 500; margin: 1rem 0 0.6rem; }
.pill .pill-n { opacity: .7; font-size: 0.68rem; }
.pill.on { box-shadow: 0 0 0 2px rgba(255,255,255,.55); }
.count-tag { font-size: 0.8rem; color: #d1d5db; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 9999px; padding: 0.2rem 0.7rem; white-space: nowrap; }
.cat-desc { color: var(--grey-text); font-size: 0.85rem; margin: -0.25rem 0 0.75rem; line-height: 1.6; }
.empty-note { text-align: center; color: var(--grey-text); padding: 2.5rem 1rem; }

/* Watch */
.watch-wrap { max-width: 1100px; margin: 0 auto; padding: 1rem; }
.watch-grid { display: grid; gap: 1.5rem; }
@media (min-width: 768px) { .watch-grid { grid-template-columns: minmax(260px, 380px) 1fr; align-items: start; } }
.player {
  position: relative; aspect-ratio: 9 / 16; width: 100%; max-height: 78vh; margin: 0 auto;
  border-radius: 0.75rem; overflow: hidden; background: #000; box-shadow: 0 20px 25px -5px rgba(0,0,0,.4);
}
.pl-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.75); transition: filter .3s; }
.player.playing .pl-bg { filter: brightness(1); }
.pl-top { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; padding: 0.75rem; font-size: 0.85rem; background: linear-gradient(to bottom, rgba(0,0,0,.6), transparent); }
.pl-demo { background: rgba(239,68,68,.85); border-radius: 9999px; padding: 0 0.6rem; font-size: 0.7rem; line-height: 1.6rem; }
.pl-big { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgba(0,0,0,.35); border: 0; border-radius: 50%; color: #fff; padding: 0.5rem; line-height: 0; transition: opacity .2s, transform .2s; }
.pl-big:hover { transform: translate(-50%, -50%) scale(1.06); }
.player.playing .pl-big { opacity: 0; pointer-events: none; }
.pl-bar { position: absolute; left: 0; right: 0; bottom: 0; padding: 0.75rem; background: linear-gradient(to top, rgba(0,0,0,.75), transparent); }
.pl-track { height: 6px; border-radius: 3px; background: rgba(255,255,255,.25); cursor: pointer; margin-bottom: 0.5rem; }
.pl-fill { height: 100%; width: 0; border-radius: 3px; background: var(--red); }
.pl-ctrls { display: flex; align-items: center; gap: 0.75rem; }
.pl-ctrls button { background: none; border: 0; color: #fff; font-size: 1.1rem; padding: 0.15rem 0.3rem; cursor: pointer; }
.pl-ctrls button:hover { color: var(--red); }
.pl-time { margin-left: auto; font-size: 0.8rem; color: #e5e7eb; font-variant-numeric: tabular-nums; }
.badge-lang.static { position: static; display: inline-block; }
.w-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.25rem; border-radius: 0.5rem; padding: 0.6rem 1rem; font-weight: 500; font-size: 0.9rem; text-decoration: none; border: 1px solid transparent; color: #fff; cursor: pointer; transition: background .2s; font-family: inherit; }
.w-btn.sm { padding: 0.35rem 0.8rem; font-size: 0.8rem; }
.w-btn.red { background: var(--red); }
.w-btn.red:hover { background: #dc2626; color: #fff; }
.w-btn.blue { background: #3b82f6; }
.w-btn.blue:hover { background: #2563eb; }
.w-btn.ghost { background: #2a2438; border-color: rgba(255,255,255,.1); color: #d1d5db; }
.w-btn.ghost:hover { background: #3a2f4b; color: #fff; }
.auto-next { font-size: 0.8rem; color: var(--grey-text); display: inline-flex; align-items: center; gap: 0.35rem; cursor: pointer; }
.auto-next input { accent-color: var(--red); }
.ep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 0.4rem; max-height: 340px; overflow-y: auto; padding-right: 4px; }
.ep { background: #2a2438; border: 1px solid rgba(255,255,255,.06); color: #d1d5db; border-radius: 0.4rem; padding: 0.45rem 0; font-size: 0.85rem; cursor: pointer; font-family: inherit; }
.ep:hover { background: #3a2f4b; color: #fff; }
.ep.seen { color: #86efac; border-color: rgba(34,197,94,.35); }
.ep.on { background: var(--red); color: #fff; border-color: var(--red); }
.empty-box { text-align: center; color: var(--grey-text); padding: 3rem 1rem; display: flex; flex-direction: column; align-items: center; gap: 0.75rem; }
.empty-box .empty-ico { width: 3rem; height: 3rem; color: #4b4560; }
.empty-box p { margin: 0; }

/* History */
.hist-list { display: grid; gap: 0.75rem; }
@media (min-width: 768px) { .hist-list { grid-template-columns: repeat(2, 1fr); gap: 1rem; } }
.hist-item { display: flex; gap: 0.85rem; background: #221c30; border: 1px solid rgba(255,255,255,.06); border-radius: 0.75rem; padding: 0.75rem; }
.hist-poster { flex: 0 0 84px; }
.hist-poster img { width: 84px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 0.5rem; display: block; }
.hist-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.hist-title { color: #fff; font-weight: 600; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist-title:hover { color: #f87171; }
.hist-meta { font-size: 0.78rem; color: var(--grey-text); }
.hist-bar { height: 4px; background: rgba(255,255,255,.1); border-radius: 2px; overflow: hidden; }
.hist-bar span { display: block; height: 100%; background: linear-gradient(to right, #ef4444, #f472b6); }
.hist-actions { display: flex; gap: 0.5rem; margin-top: auto; }

/* Profile */
.shell.narrow { max-width: 720px; }
.profile-card { display: flex; align-items: center; gap: 1rem; margin: 0.5rem 0 1rem; padding: 1.25rem; border-radius: 0.75rem; background: linear-gradient(to right, rgba(220,38,38,.2), rgba(236,72,153,.1)); border: 1px solid rgba(239,68,68,.2); }
.pf-avatar { width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; font-weight: 700; background: linear-gradient(135deg, #34d399, #047857); color: #fde68a; flex-shrink: 0; }
.pf-name { font-size: 1.3rem; font-weight: 700; }
.pf-sub { color: var(--muted-2); font-size: 0.85rem; }
.pf-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin-bottom: 1rem; }
.pf-stats div { background: #2a2438; border-radius: 0.5rem; padding: 0.75rem; text-align: center; }
.pf-stats b { display: block; font-size: 1.35rem; }
.pf-stats span { font-size: 0.8rem; color: var(--grey-text); }
.pf-box { background: #221c30; border: 1px solid rgba(255,255,255,.06); border-radius: 0.75rem; padding: 1rem; margin-bottom: 1rem; }
.pf-box h2 { font-size: 1rem; font-weight: 600; color: #d1d5db; margin: 0 0 0.75rem; }
.pf-form { display: flex; gap: 0.5rem; }
.pf-form input, .contact-form input, .contact-form textarea { flex: 1; min-width: 0; background: var(--input); color: #fff; border: 0; border-radius: 0.5rem; padding: 0.55rem 0.85rem; font-family: inherit; }
.pf-form input:focus, .contact-form input:focus, .contact-form textarea:focus { outline: none; box-shadow: 0 0 0 2px rgba(255,64,129,.4); }
.pf-row { display: flex; justify-content: space-between; align-items: center; padding: 0.55rem 0; border-top: 1px solid rgba(255,255,255,.05); cursor: pointer; margin: 0; }
.pf-box h2 + .pf-row { border-top: 0; }
.switch { appearance: none; -webkit-appearance: none; width: 42px; height: 24px; border-radius: 12px; background: #3a2f4b; position: relative; cursor: pointer; transition: background .2s; flex-shrink: 0; margin: 0; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch:checked { background: var(--red); }
.switch:checked::after { transform: translateX(18px); }
.pf-link { display: flex; justify-content: space-between; width: 100%; padding: 0.65rem 0; color: #e5e7eb; text-decoration: none; border: 0; border-top: 1px solid rgba(255,255,255,.05); background: none; font-family: inherit; font-size: 1rem; text-align: left; cursor: pointer; }
.pf-box h2 + .pf-link { border-top: 0; }
.pf-link:hover { color: #fff; }
.pf-link span { color: var(--muted-3); }
.pf-link.danger { color: #fca5a5; }

/* Info pages */
.doc-page { max-width: 820px; margin: 0 auto; padding: 1rem 1.25rem 2rem; min-height: 70vh; }
.doc-title { font-size: 1.625rem; font-weight: 700; margin: 0 0 0.5rem; line-height: 1.3; }
@media (min-width: 768px) { .doc-title { font-size: 1.875rem; } }
.doc-meta { color: var(--muted-2); font-size: 0.85rem; margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.doc-body { background: rgba(255,255,255,.025); border: 1px solid rgba(255,255,255,.06); border-radius: 1rem; padding: 1.5rem 1.25rem; color: #e8e2ed; line-height: 1.85; }
@media (min-width: 768px) { .doc-body { padding: 2rem; } }
.doc-body h2 { font-size: 1.2rem; font-weight: 700; color: #fff; margin: 1.75rem 0 0.6rem; }
.doc-body > :first-child, .doc-body .art:first-child h2 { margin-top: 0; }
.doc-body p { margin: 0 0 1rem; }
.doc-body ul { padding-left: 1.5rem; margin: 0 0 1rem; }
.art { padding-bottom: 1rem; margin-bottom: 1rem; border-bottom: 1px solid rgba(255,255,255,.06); }
.art:last-child { border-bottom: 0; margin-bottom: 0; }
.contact-form { display: grid; gap: 0.75rem; margin-bottom: 1rem; }
.contact-form label { display: grid; gap: 0.3rem; font-size: 0.9rem; color: #d1d5db; }
.contact-done { color: #86efac; margin: 0; }

/* ---------- Member system (Toffee Member) ---------- */
.acct { display: inline-flex; align-items: center; gap: 6px; margin-left: 10px; padding: 7px 12px; border-radius: 9999px;
  background: var(--input); color: #fff; text-decoration: none; font-size: 0.875rem; white-space: nowrap; flex: none; transition: background .15s; }
.acct:hover { background: #4a3d5e; color: #fff; }
.acct img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; margin: -3px 0 -3px -6px; }
.acct .acct-bal { color: var(--pink); font-weight: 600; }
@media (max-width: 576px) { .acct .acct-t { display: none; } .acct { padding: 7px 9px; } .acct img { margin: -3px; } }

.pf-member { border-radius: 14px; padding: 18px; margin-bottom: 14px;
  background: linear-gradient(120deg, #3b1d5e, #7c3aed 60%, #ff4081); color: #fff; box-shadow: 0 8px 24px rgba(124,58,237,.25); }
.pfm-title { font-size: 1.15rem; font-weight: 600; }
.pfm-text { margin: 4px 0 12px; font-size: 0.9rem; color: #ede4ff; }
.pfm-login { display: inline-block; background: #fff; color: #5b21b6; font-weight: 600; padding: 9px 18px; border-radius: 9999px; text-decoration: none; }
.pfm-login:hover { color: #5b21b6; filter: brightness(.95); }
.pfm-user { display: flex; align-items: center; gap: 14px; }
.pfm-user img, .pfm-ava { width: 58px; height: 58px; border-radius: 50%; border: 3px solid rgba(255,255,255,.7); object-fit: cover; background: #ffffff33; display: grid; place-items: center; font-size: 1.5rem; font-weight: 700; flex: none; }
.pfm-name { font-size: 1.1rem; font-weight: 600; line-height: 1.3; }
.pfm-no { font-size: 0.8rem; color: #e9dcff; }
.pfm-bal { margin-left: auto; text-align: right; }
.pfm-bal b { display: block; font-size: 1.4rem; line-height: 1.1; }
.pfm-bal span { font-size: 0.75rem; color: #e9dcff; }
.pfm-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.pfm-actions a, .pfm-actions button { flex: 1; min-width: 110px; text-align: center; padding: 9px 10px; border-radius: 10px; border: 0; font: inherit; font-size: 0.9rem; cursor: pointer; text-decoration: none; }
.pfm-actions .primary { background: #fff; color: #5b21b6; font-weight: 600; }
.pfm-actions .ghost { background: #ffffff26; color: #fff; }
.pfm-actions .ghost:hover { background: #ffffff3d; color: #fff; }
.pfm-sync { margin-top: 10px; font-size: 0.78rem; color: #e9dcff; }
