/*
 * Mobile UI (< 768px). Loaded with media="(max-width: 767px)" after every other
 * stylesheet, so it only has to out-rank the legacy !important rules, never desktop.
 *
 * Tokens: ground #0B0B0F · surface #15151C · raised #1D1D26 · line #22222C
 *         text #F4F4F6 · secondary #A1A1AA · muted #8E8E99 · brand #1A6DFF · link #5B9BFF
 */

:root {
  --m-bg: #0B0B0F;
  --m-surface: #15151C;
  --m-raised: #1D1D26;
  --m-raised-2: #34343F;
  --m-line: #22222C;
  --m-line-soft: #1C1C24;
  --m-text: #F4F4F6;
  --m-text-2: #A1A1AA;
  --m-muted: #8E8E99;
  --m-brand: #1A6DFF;
  --m-link: #5B9BFF;
  --m-font: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --m-safe-b: env(safe-area-inset-bottom, 0px);
  --m-tabbar-h: 60px;
}

/* ---------- Base ---------- */
html#xc body.big-container {
  background: var(--m-bg) !important;
  color: var(--m-text);
  font-family: var(--m-font) !important;
  padding: 0 0 calc(var(--m-tabbar-h) + var(--m-safe-b)) !important;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
html.m-locked, html.m-locked body { overflow: hidden !important; }
html#xc body .container { max-width: 100% !important; padding: 0 !important; overflow-x: hidden; }
html#xc body .content, html#xc body .main-content, html#xc body .main-container { margin: 0 !important; padding: 0 !important; width: 100% !important; max-width: 100% !important; }
.m-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.m-grow { flex: 1 1 auto; }

/* Legacy chrome replaced by the mobile shell */
html#xc body nav#siteNav,
html#xc body nav.bottom-nav#bottomNav,
html#xc body .search-overlay,
html#xc body .sidebar,
html#xc body .sidebar-overlay,
html#xc body .scroll-btn,
html#xc body .site-footer { display: none !important; }

/* Shared bits */
.m-shell svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.m-icon-btn {
  width: 44px; height: 44px; padding: 0; border: 0; background: transparent; color: var(--m-text);
  display: inline-flex; align-items: center; justify-content: center; border-radius: 22px; cursor: pointer;
}
.m-icon-btn:active { background: var(--m-raised); }
.m-btn {
  height: 44px; padding: 0 18px; border: 0; border-radius: 12px; font: 600 15px/1 var(--m-font);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; text-decoration: none;
}
.m-btn-sm { height: 32px; padding: 0 16px; border-radius: 16px; font-size: 13px; }
.m-btn-lg { height: 50px; font-size: 16px; width: 100%; }
.m-btn-primary { background: var(--m-brand); color: #fff; }
.m-btn-primary:active { background: #1659D1; }
.m-btn-light { background: var(--m-text); color: var(--m-bg); }
.m-btn-ghost { background: transparent; color: #D4D4D8; width: 100%; font-weight: 500; }
.m-link-btn { height: 32px; border: 0; background: transparent; color: var(--m-text-2); font: 13px var(--m-font); cursor: pointer; }
.m-logo { display: inline-flex; align-items: center; gap: 8px; min-width: 0; color: var(--m-text) !important; text-decoration: none !important; font: 700 16px/1 var(--m-font); letter-spacing: -0.4px; }
.m-logo > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-logo-mark { width: 26px; height: 26px; border-radius: 7px; background: var(--m-brand); display: inline-flex; align-items: center; justify-content: center; }
.m-shell .m-logo-mark svg { width: 12px; height: 12px; fill: #fff; stroke: #fff; stroke-width: 1.5; }

/* ---------- Top: install banner + app bar + section tabs ---------- */
html#xc body .m-top {
  display: block; position: sticky; top: 0; z-index: 9990;
  background: rgba(11, 11, 15, 0.97);
  -webkit-backdrop-filter: saturate(140%) blur(12px); backdrop-filter: saturate(140%) blur(12px);
  transition: transform 0.22s ease;
}
html#xc body .m-top.is-hidden { transform: translateY(-100%); }

.m-appbanner[hidden] { display: none !important; }
.m-appbanner { display: flex; align-items: center; gap: 10px; height: 64px; padding: 0 12px 0 4px; background: var(--m-surface); border-bottom: 1px solid var(--m-line); }
.m-appbanner-close { width: 32px; height: 44px; border: 0; background: transparent; color: var(--m-muted); display: flex; align-items: center; justify-content: center; padding: 0; }
.m-appbanner-close svg { width: 16px; height: 16px; }
.m-appbanner .m-logo-mark { width: 40px; height: 40px; border-radius: 10px; }
.m-shell .m-appbanner .m-logo-mark svg { width: 16px; height: 16px; }
.m-appbanner-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.m-appbanner-text strong { font: 600 14px/1.3 var(--m-font); color: var(--m-text); }
.m-appbanner-text span { font: 12px/1.3 var(--m-font); color: var(--m-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.m-appbar { height: 52px; display: flex; align-items: center; padding: 0 4px 0 16px; }

.m-sections { display: flex; gap: 22px; height: 42px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--m-line-soft); }
.m-sections::-webkit-scrollbar { display: none; }
.m-sections a {
  flex-shrink: 0; display: flex; align-items: center; height: 42px; box-sizing: border-box;
  color: var(--m-muted) !important; text-decoration: none !important; font: 600 14px/1 var(--m-font); white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.m-sections a.is-active { color: var(--m-text) !important; border-bottom-color: var(--m-text); }

/* ---------- Bottom tab bar ---------- */
html#xc body .m-tabbar {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 9990;
  height: calc(var(--m-tabbar-h) + var(--m-safe-b)); padding-bottom: var(--m-safe-b); box-sizing: border-box;
  background: rgba(11, 11, 15, 0.97); border-top: 1px solid var(--m-line-soft);
  -webkit-backdrop-filter: saturate(140%) blur(12px); backdrop-filter: saturate(140%) blur(12px);
}
.m-tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--m-muted) !important; text-decoration: none !important; font: 500 10.5px/1 var(--m-font);
}
.m-tabbar a.is-active { color: var(--m-text) !important; }

/* ---------- Side menu ---------- */
html#xc body .m-drawer { display: block; position: fixed; inset: 0; z-index: 10010; }
html#xc body .m-drawer[hidden], html#xc body .m-search[hidden], html#xc body .m-sheet-wrap[hidden] { display: none !important; }
.m-scrim { position: absolute; inset: 0; width: 100%; border: 0; padding: 0; background: rgba(0, 0, 0, 0.6); opacity: 0; transition: opacity 0.2s ease; cursor: default; }
.is-open > .m-scrim { opacity: 1; }
.m-drawer-panel {
  position: absolute; top: 0; bottom: 0; left: 0; width: min(304px, 84vw);
  display: flex; flex-direction: column; background: #121218; border-right: 1px solid var(--m-line);
  transform: translateX(-100%); transition: transform 0.22s ease;
}
.m-drawer.is-open .m-drawer-panel { transform: none; }
.m-drawer-head { height: 60px; flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 8px 0 20px; }
.m-drawer-head .m-icon-btn { color: var(--m-text-2); }
.m-drawer-body { flex: 1 1 auto; overflow-y: auto; padding: 4px 12px 16px; display: flex; flex-direction: column; gap: 16px; }
.m-menu { list-style: none; margin: 0; padding: 0; }
.m-menu a {
  height: 44px; padding: 0 12px; border-radius: 10px; display: flex; align-items: center; gap: 14px;
  color: #E4E4E7 !important; text-decoration: none !important; font: 500 15px/1 var(--m-font);
}
.m-menu a.is-active { background: var(--m-raised); color: var(--m-text) !important; }
.m-menu svg { width: 20px; height: 20px; }
.m-install-card[hidden] { display: none !important; }
.m-install-card {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; text-align: left; cursor: pointer;
  border-radius: 12px; background: #172033; border: 1px solid #22324F; color: var(--m-text); font-family: var(--m-font);
}
.m-install-card-icon { width: 36px; height: 36px; flex-shrink: 0; border-radius: 9px; background: var(--m-brand); display: flex; align-items: center; justify-content: center; color: #fff; }
.m-shell .m-install-card-icon svg { width: 18px; height: 18px; stroke-width: 2; }
.m-install-card-text { display: flex; flex-direction: column; gap: 2px; }
.m-install-card-text strong { font: 600 14px/1.3 var(--m-font); }
.m-install-card-text span { font: 12px/1.3 var(--m-font); color: var(--m-text-2); }
.m-drawer-foot { flex-shrink: 0; padding: 14px 24px calc(20px + var(--m-safe-b)); border-top: 1px solid var(--m-line); display: flex; flex-direction: column; gap: 10px; font: 12px/1.4 var(--m-font); color: var(--m-muted); }
.m-drawer-links { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.m-drawer-links a { color: var(--m-text-2) !important; font-size: 12.5px; text-decoration: none !important; }

/* ---------- Search sheet ---------- */
html#xc body .m-search { display: flex; flex-direction: column; position: fixed; inset: 0; z-index: 10020; background: var(--m-bg); opacity: 0; transition: opacity 0.18s ease; }
html#xc body .m-search.is-open { opacity: 1; }
.m-search-bar { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 16px; margin: 0; }
.m-search-field { flex: 1 1 auto; height: 42px; border-radius: 12px; background: var(--m-raised); border: 1px solid var(--m-raised-2); display: flex; align-items: center; gap: 8px; padding: 0 12px; color: var(--m-text-2); box-sizing: border-box; }
.m-shell .m-search-field svg { width: 18px; height: 18px; }
.m-search-field input {
  flex: 1 1 auto; min-width: 0; height: 40px; border: 0 !important; outline: 0; padding: 0 !important; margin: 0;
  background: transparent !important; color: var(--m-text) !important; font: 16px var(--m-font) !important; -webkit-appearance: none; appearance: none;
}
.m-search-field input::placeholder { color: var(--m-muted); }
.m-search-field input::-webkit-search-cancel-button { -webkit-appearance: none; }
.m-search-cancel { height: 44px; padding: 0 8px; border: 0; background: transparent; color: var(--m-text); font: 500 15px var(--m-font); cursor: pointer; }
.m-search-body { flex: 1 1 auto; overflow-y: auto; padding: 8px 16px 24px; display: flex; flex-direction: column; gap: 24px; }
.m-search-body h2 { margin: 0; color: var(--m-text) !important; font: 700 15px/1.3 var(--m-font) !important; }
.m-search-head { display: flex; align-items: center; justify-content: space-between; height: 32px; }
.m-search-recent[hidden] { display: none !important; }
.m-recent-list, .m-trending-list { list-style: none; margin: 0; padding: 0; }
.m-recent-list li { display: flex; align-items: center; height: 48px; }
.m-recent-list a { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 12px; color: var(--m-text) !important; text-decoration: none !important; font: 15px var(--m-font); }
.m-recent-list a span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-shell .m-recent-list a svg { width: 18px; height: 18px; color: var(--m-muted); }
.m-recent-remove { margin-right: -10px; color: var(--m-muted); }
.m-shell .m-recent-remove svg { width: 16px; height: 16px; stroke-width: 2; }
.m-search-trending { display: flex; flex-direction: column; gap: 6px; }
.m-trending-list a { height: 46px; display: flex; align-items: center; gap: 14px; border-bottom: 1px solid var(--m-line-soft); color: var(--m-text) !important; text-decoration: none !important; font: 15px var(--m-font); }
.m-rank { width: 20px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--m-muted); }
.m-rank.is-top { color: var(--m-link); }
.m-term { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-shell .m-trending-list svg { width: 16px; height: 16px; color: var(--m-muted); }

/* ---------- Install sheets ---------- */
html#xc body .m-sheet-wrap { display: block; position: fixed; inset: 0; z-index: 10030; }
.m-sheet-wrap [data-m-platform] { display: none; }
.m-sheet-wrap[data-platform="android"] [data-m-platform="android"],
.m-sheet-wrap[data-platform="ios"] [data-m-platform="ios"] { display: flex; }
.m-sheet {
  position: absolute; left: 0; right: 0; bottom: 0; flex-direction: column; gap: 22px;
  padding: 8px 20px calc(24px + var(--m-safe-b)); background: var(--m-surface); border-top: 1px solid var(--m-line);
  border-radius: 20px 20px 0 0; color: var(--m-text); font-family: var(--m-font);
  transform: translateY(100%); transition: transform 0.24s ease;
}
.m-sheet-wrap.is-open .m-sheet { transform: none; }
.m-sheet-card { left: 12px; right: 12px; bottom: calc(96px + var(--m-safe-b)); padding: 20px; gap: 20px; border: 1px solid var(--m-line); border-radius: 18px; transform: translateY(12px); opacity: 0; transition: transform 0.2s ease, opacity 0.2s ease; }
.m-sheet-wrap.is-open .m-sheet-card { transform: none; opacity: 1; }
.m-sheet-grabber { align-self: center; width: 36px; height: 4px; border-radius: 2px; background: #3A3A46; }
.m-sheet-head { display: flex; align-items: center; gap: 14px; }
.m-sheet-head > div { flex: 1 1 auto; display: flex; flex-direction: column; gap: 3px; }
.m-sheet h2 { margin: 0; color: var(--m-text) !important; font: 700 19px/1.25 var(--m-font) !important; letter-spacing: -0.3px; }
.m-sheet-card h2 { font-size: 17px !important; }
.m-sheet-head p { margin: 0; color: var(--m-text-2); font: 13px/1.35 var(--m-font); }
.m-sheet-x { align-self: flex-start; margin: -10px -12px 0 0; color: var(--m-text-2); }
.m-shell .m-sheet-x svg { width: 18px; height: 18px; stroke-width: 2; }
.m-app-icon { width: 56px; height: 56px; flex-shrink: 0; border-radius: 14px; background: var(--m-brand); display: flex; align-items: center; justify-content: center; }
.m-app-icon-sm { width: 48px; height: 48px; border-radius: 12px; }
.m-shell .m-app-icon svg { width: 24px; height: 24px; fill: #fff; stroke: #fff; stroke-width: 1.2; }
.m-perks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.m-perks li { display: flex; gap: 14px; align-items: flex-start; }
.m-shell .m-perks svg { width: 20px; height: 20px; color: var(--m-link); margin-top: 1px; }
.m-perks li > span { display: flex; flex-direction: column; gap: 2px; }
.m-perks strong { font: 600 15px/1.3 var(--m-font); }
.m-perks li > span > span { font: 13px/18px var(--m-font); color: var(--m-text-2); }
.m-sheet-actions { display: flex; flex-direction: column; gap: 4px; }
.m-steps { list-style: none; margin: 0; padding: 0; border-radius: 12px; background: var(--m-raised); }
.m-steps li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid #2A2A35; font: 14px/20px var(--m-font); }
.m-steps li:last-child { border-bottom: 0; }
.m-steps li > span:nth-child(2) { flex: 1 1 auto; }
.m-step-n { width: 22px; font-weight: 700; color: var(--m-muted); }
.m-shell .m-steps svg { width: 20px; height: 20px; color: var(--m-link); }
.m-ios-pointer { position: absolute; left: 0; right: 0; bottom: calc(20px + var(--m-safe-b)); flex-direction: column; align-items: center; gap: 6px; color: var(--m-link); font: 600 12px var(--m-font); pointer-events: none; }
.m-shell .m-ios-pointer svg { width: 24px; height: 36px; stroke-width: 2.2; }

/* ---------- Toast ---------- */
.m-toast {
  position: fixed; left: 50%; bottom: calc(var(--m-tabbar-h) + var(--m-safe-b) + 16px); z-index: 10040;
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none; transition: opacity 0.18s, transform 0.18s;
  padding: 10px 16px; border-radius: 10px; background: var(--m-text); color: var(--m-bg); font: 600 14px var(--m-font);
}
.m-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* =====================================================================
   Page content (scraped markup)
   ===================================================================== */

/* ---------- Section headers + filter chips ---------- */
html#xc body .headline {
  display: flex !important; flex-direction: column !important; align-items: stretch !important; gap: 12px !important;
  padding: 16px 16px 12px !important; margin: 0 !important; background: none !important; border: 0 !important; float: none !important;
}
html#xc body .headline h1, html#xc body .headline h2 {
  margin: 0 !important; padding: 0 !important; color: var(--m-text) !important;
  font: 700 17px/1.35 var(--m-font) !important; letter-spacing: -0.2px; text-transform: none !important;
}
html#xc body .headline h2 a, html#xc body .headline h1 a { color: inherit !important; text-decoration: none !important; }
html#xc body .headline .icon::before, html#xc body .headline h2 .icon::before { display: none !important; }
html#xc body .headline > a.more, html#xc body .headline .button { color: var(--m-text-2) !important; font: 500 13px var(--m-font) !important; }

.m-chips { display: flex; gap: 8px; margin: 0 -16px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
.m-chips::-webkit-scrollbar { display: none; }
html#xc body .m-chips .sort { display: contents !important; }
html#xc body .m-chips .sort > .icon { display: none !important; }
html#xc body .m-chips .sort > strong,
html#xc body .m-chips .sort ul li a,
html#xc body .m-chips .sort ul li span {
  flex-shrink: 0; height: 32px !important; padding: 0 14px !important; border-radius: 16px !important; box-sizing: border-box;
  display: inline-flex !important; align-items: center; white-space: nowrap;
  background: var(--m-raised) !important; color: #D4D4D8 !important; border: 0 !important;
  font: 500 13px/1 var(--m-font) !important; text-decoration: none !important; cursor: pointer;
}
html#xc body .m-chips .sort > strong { background: var(--m-text) !important; color: var(--m-bg) !important; }
html#xc body .m-chips .sort > strong::after { display: none !important; }
html#xc body .m-chips .sort ul {
  display: contents !important; position: static !important; visibility: visible !important; opacity: 1 !important;
  list-style: none !important; margin: 0 !important; padding: 0 !important; background: none !important; box-shadow: none !important;
}
html#xc body .m-chips .sort ul li { display: contents !important; }

/* ---------- Video grid ---------- */
html#xc body .box, html#xc body div.box { padding: 0 !important; margin: 0 !important; background: none !important; border: 0 !important; }
html#xc body .list-videos, html#xc body .list-albums, html#xc body .list-categories {
  display: block !important; padding: 0 !important; margin: 0 !important; width: 100% !important; gap: 0 !important;
}
html#xc body .list-videos .margin-fix,
html#xc body .list-albums .margin-fix,
html#xc body .list-categories .margin-fix {
  display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 18px 10px !important;
  padding: 4px 16px 8px !important; margin: 0 !important; width: 100% !important; box-sizing: border-box !important;
}
html#xc body .list-videos .margin-fix > .ad-container,
html#xc body .list-videos .margin-fix > .ad-between-videos { grid-column: 1 / -1; margin: 4px 0 !important; }

html#xc body .list-videos .item,
html#xc body .list-albums .item,
html#xc body .list-categories .item {
  width: auto !important; max-width: none !important; min-width: 0 !important; flex: none !important;
  margin: 0 !important; padding: 0 !important; float: none !important; background: none !important;
  border: 0 !important; box-shadow: none !important; display: block !important;
}
html#xc body .list-videos .item > a,
html#xc body .list-albums .item > a { display: flex !important; flex-direction: column; gap: 8px; padding: 0 !important; color: var(--m-text) !important; text-decoration: none !important; }
html#xc body .list-categories a.item { display: flex !important; flex-direction: column; gap: 8px; color: var(--m-text) !important; text-decoration: none !important; }

html#xc body .list-videos .item .img,
html#xc body .list-albums .item .img,
html#xc body .list-categories .item .img {
  position: relative !important; display: block !important; width: 100% !important; height: auto !important; padding: 0 !important; margin: 0 !important;
  border-radius: 10px !important; overflow: hidden !important; background: var(--m-raised) !important; box-shadow: none !important;
}
html#xc body .list-videos .item .img { aspect-ratio: 16 / 9; }
html#xc body .list-albums .item .img { aspect-ratio: 3 / 4; }
html#xc body .list-categories .item .img { aspect-ratio: 4 / 3; border-radius: 12px !important; }
html#xc body .list-videos .item .img img,
html#xc body .list-albums .item .img img,
html#xc body .list-categories .item .img img {
  position: absolute !important; inset: 0; width: 100% !important; height: 100% !important; max-width: none !important;
  object-fit: cover; transform: none !important; border-radius: 0 !important;
}
html#xc body .list-videos .item .img video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* badges */
html#xc body .item .img .is-hd {
  position: absolute !important; left: 6px !important; top: 6px !important; right: auto !important; bottom: auto !important; z-index: 2;
  height: 18px; padding: 0 5px !important; border-radius: 4px !important; background: rgba(0, 0, 0, 0.62) !important;
  color: #fff !important; font: 700 10px/18px var(--m-font) !important; letter-spacing: 0.3px; box-shadow: none !important;
}
html#xc body .list-videos .item .img .duration-overlay,
html#xc body .item .img .m-count {
  position: absolute !important; right: 6px !important; bottom: 6px !important; left: auto !important; top: auto !important; z-index: 2;
  height: 18px; padding: 0 5px !important; border-radius: 4px !important; background: rgba(0, 0, 0, 0.72) !important;
  color: #fff !important; font: 600 11px/18px var(--m-font) !important; font-variant-numeric: tabular-nums;
}
html#xc body .item .img [class^="ico-fav"], html#xc body .item .img [class*=" ico-fav"],
html#xc body .list-videos .item .rating, html#xc body .list-albums .item .rating { display: none !important; }

/* text */
html#xc body .list-videos .item .title,
html#xc body .list-albums .item .title,
html#xc body .list-categories .item .title {
  margin: 0 !important; padding: 0 !important; color: var(--m-text) !important; height: auto !important; max-height: none !important;
  font: 500 13px/18px var(--m-font) !important; white-space: normal !important; text-align: left !important;
  display: -webkit-box !important; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden !important;
}
html#xc body .list-categories .item .title { font-weight: 600 !important; font-size: 14px !important; -webkit-line-clamp: 1; }
html#xc body .list-videos .item .wrap,
html#xc body .list-albums .item .wrap { display: none !important; }
html#xc body .list-videos .item .wrap:last-of-type {
  display: flex !important; flex-wrap: wrap; align-items: center; gap: 0 !important; margin: -4px 0 0 !important; padding: 0 !important;
  color: var(--m-muted) !important; font: 12px/16px var(--m-font) !important; justify-content: flex-start !important;
}
html#xc body .list-videos .item .wrap .added, html#xc body .list-videos .item .wrap .views {
  display: inline !important; padding: 0 !important; order: 0 !important; color: inherit !important; font: inherit !important;
}
html#xc body .list-videos .item .wrap .views { order: 1 !important; }
html#xc body .list-videos .item .wrap .added { order: 2 !important; }
html#xc body .list-videos .item .wrap .views::before, html#xc body .list-videos .item .wrap .added::before { content: none !important; display: none !important; }
html#xc body .list-videos .item .wrap .views + .added::before,
html#xc body .list-videos .item .wrap .views ~ .added::before { content: '·' !important; display: inline !important; margin: 0 5px; font-family: inherit !important; }
html#xc body .list-videos .item .added em { font-style: normal !important; }

html#xc body .list-categories .item .wrap {
  display: flex !important; align-items: center; gap: 6px; margin: -4px 0 0 !important; padding: 0 !important;
  color: var(--m-muted) !important; font: 12px/16px var(--m-font) !important;
}
html#xc body .list-categories .item .wrap .rating { display: inline-flex !important; align-items: center; gap: 4px; color: var(--m-muted) !important; font: inherit !important; background: none !important; padding: 0 !important; }
html#xc body .list-categories .item .wrap .rating::before { content: '·'; margin-right: 2px; }
html#xc body .list-categories .item .wrap .rating_circle { display: none !important; }
html#xc body .list-categories .item .wrap .videos { padding: 0 !important; color: inherit !important; }
html#xc body .list-categories .item .wrap .videos::before { display: none !important; }

/* ---------- Pagination / load more ---------- */
html#xc body .pagination { margin: 16px 0 8px !important; padding: 0 16px !important; }
html#xc body .pagination-holder { overflow-x: auto; scrollbar-width: none; }
html#xc body .pagination-holder ul { display: flex !important; justify-content: center; gap: 6px; margin: 0 !important; padding: 0 !important; list-style: none; }
html#xc body .pagination-holder li { display: block !important; margin: 0 !important; float: none !important; }
html#xc body .pagination-holder li.first, html#xc body .pagination-holder li.last, html#xc body .pagination-holder li.jump,
html#xc body .pagination .xnpj-go { display: none !important; }
html#xc body .pagination-holder li a, html#xc body .pagination-holder li span {
  min-width: 40px; height: 40px; padding: 0 12px !important; box-sizing: border-box; border-radius: 20px !important;
  display: inline-flex !important; align-items: center; justify-content: center;
  background: var(--m-raised) !important; color: #D4D4D8 !important; border: 0 !important;
  font: 600 14px/1 var(--m-font) !important; text-decoration: none !important; box-shadow: none !important;
}
html#xc body .pagination-holder li.page-current span { background: var(--m-text) !important; color: var(--m-bg) !important; }
html#xc body .pagination-holder li.prev span, html#xc body .pagination-holder li.next span { opacity: 0.45; }
html#xc body .load-more { margin: 16px 16px 8px !important; }
html#xc body .load-more a {
  display: flex !important; align-items: center; justify-content: center; height: 44px; border-radius: 12px !important;
  background: transparent !important; border: 1px solid #2A2A35 !important; color: var(--m-text) !important;
  font: 600 14px var(--m-font) !important; text-decoration: none !important;
}

/* ---------- Related videos / albums tabs ---------- */
html#xc body .related-videos, html#xc body .related-albums { margin: 20px 0 0 !important; padding: 0 !important; }
html#xc body .related-videos .list-sort, html#xc body .related-albums .list-sort {
  display: flex !important; gap: 8px !important; margin: 0 0 12px !important; padding: 0 16px !important; flex-wrap: nowrap !important; overflow-x: auto;
}
html#xc body .related-videos .list-sort a, html#xc body .related-albums .list-sort a,
html#xc body .related-videos .list-sort span, html#xc body .related-albums .list-sort span {
  flex: none !important; min-width: 0 !important; height: 32px; padding: 0 14px !important; border-radius: 16px !important;
  background: var(--m-raised) !important; color: #D4D4D8 !important; border: 0 !important; box-shadow: none !important; transform: none !important;
  font: 600 13px/32px var(--m-font) !important; white-space: nowrap;
}
html#xc body .related-videos .list-sort span, html#xc body .related-albums .list-sort span,
html#xc body .related-videos .list-sort a.active, html#xc body .related-albums .list-sort a.active { background: var(--m-text) !important; color: var(--m-bg) !important; }
html#xc body .related-videos .list-sort span::before, html#xc body .related-albums .list-sort span::before,
html#xc body .related-videos .list-sort a::before, html#xc body .related-albums .list-sort a::before { display: none !important; content: none !important; }

/* Related videos read better as a list: thumbnail left, text right */
html#xc body .related-videos .list-videos .margin-fix { grid-template-columns: 1fr !important; gap: 14px !important; }
html#xc body .related-videos .list-videos .item > a { display: grid !important; grid-template-columns: 156px minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: 12px; row-gap: 4px; }
html#xc body .related-videos .list-videos .item .img { grid-row: 1 / span 2; border-radius: 8px !important; }
html#xc body .related-videos .list-videos .item .title { font-size: 13.5px !important; line-height: 19px !important; padding-top: 1px !important; }
html#xc body .related-videos .list-videos .item .wrap:last-of-type { margin: 0 !important; align-self: start; }

/* ---------- Video page ---------- */
html#xc body .content.video-detail > .headline,
html#xc body .content.video-detail > .info-content { display: none !important; }
html#xc body .block-video { margin: 0 !important; width: 100% !important; }
html#xc body .block-video .video-holder { padding: 0 !important; margin: 0 !important; }
html#xc body .block-video .player, html#xc body .block-video .player-holder { border-radius: 0 !important; }
html#xc body .m-vinfo { display: flex; flex-direction: column; gap: 14px; padding: 14px 16px 0; }
.m-vinfo .m-vtitle { margin: 0; color: var(--m-text); font: 600 18px/24px var(--m-font); letter-spacing: -0.2px; }
.m-vactions { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.m-vactions button, .m-vactions a {
  flex-shrink: 0; height: 36px; padding: 0 14px; border: 0; border-radius: 18px; background: var(--m-raised);
  color: var(--m-text) !important; font: 600 13px var(--m-font); display: inline-flex; align-items: center; gap: 6px; text-decoration: none !important; cursor: pointer;
}
.m-vactions svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.m-tags { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.m-tags::-webkit-scrollbar, .m-vactions::-webkit-scrollbar { display: none; }
.m-tags a {
  flex-shrink: 0; height: 30px; padding: 0 12px; border-radius: 15px; border: 1px solid #2A2A35; box-sizing: border-box;
  display: inline-flex; align-items: center; white-space: nowrap; color: #D4D4D8 !important; font: 500 12.5px var(--m-font); text-decoration: none !important;
}

/* ---------- Album page ---------- */
html#xc body .content > .info-content {
  display: flex !important; flex-wrap: nowrap !important; gap: 8px !important; overflow-x: auto; scrollbar-width: none;
  padding: 0 16px 12px !important; margin: 0 !important;
}
html#xc body .content > .info-content a {
  flex-shrink: 0; height: 30px; padding: 0 12px !important; border-radius: 15px !important; border: 1px solid #2A2A35 !important;
  background: transparent !important; color: #D4D4D8 !important; font: 500 12.5px/28px var(--m-font) !important; white-space: nowrap; transform: none !important;
}
html#xc body .content > .headline h1 { font-size: 20px !important; line-height: 26px !important; }
html#xc body .block-album { margin: 0 !important; }
html#xc body .block-album .album-holder { background: none !important; border-radius: 0 !important; }
html#xc body .block-album .images {
  display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 0 4px !important; margin: 0 !important;
}
html#xc body .block-album .images > a, html#xc body .block-album .images .item {
  display: block !important; position: relative; aspect-ratio: 3 / 4; width: auto !important; height: auto !important;
  margin: 0 !important; padding: 0 !important; float: none !important; overflow: hidden; border-radius: 4px; background: var(--m-raised);
}
html#xc body .block-album .images img { position: absolute; inset: 0; width: 100% !important; height: 100% !important; max-width: none !important; object-fit: cover; }
html#xc body .block-album .album-info { padding: 14px 16px 0 !important; background: none !important; }
html#xc body .block-album .album-info .info-holder, html#xc body .block-album .album-info .tab-content { background: none !important; padding: 0 !important; border: 0 !important; }
html#xc body .block-album #tab_album_info, html#xc body .block-album #tab_album_info * { color: var(--m-text-2) !important; font-family: var(--m-font) !important; font-size: 13px !important; }
html#xc body .block-album #tab_album_info .item { display: inline-flex !important; gap: 4px; margin: 0 12px 6px 0 !important; padding: 0 !important; }
html#xc body .block-album #tab_album_info em, html#xc body .block-album #tab_album_info strong { color: var(--m-text) !important; font-style: normal; }

/* ---------- Ads keep breathing room ---------- */
html#xc body .ad-container { margin: 12px auto !important; padding: 0 16px; box-sizing: border-box; }

/* ---------- Tags / search clouds ---------- */
html#xc body .tags-cloud, html#xc body .search-cloud { padding: 8px 16px 16px !important; display: flex; flex-wrap: wrap; gap: 8px; }
html#xc body .tags-cloud a, html#xc body .search-cloud a {
  height: 32px; padding: 0 12px !important; margin: 0 !important; border-radius: 16px; box-sizing: border-box;
  display: inline-flex !important; align-items: center; background: var(--m-raised) !important; color: #D4D4D8 !important;
  font: 500 13px var(--m-font) !important; text-decoration: none !important;
}

/* ---------- Resets against legacy global rules ---------- */
/* main.ejs styles every <nav> as a fixed top bar; the shell's navs must opt out */
html#xc body .m-shell nav, html#xc body nav.m-shell {
  top: auto; width: auto; box-shadow: none; border-left: 0; border-right: 0; background-color: transparent;
}
html#xc body .m-top .m-sections { position: static; padding: 0 16px; z-index: auto; }
html#xc body nav.m-tabbar { top: auto; bottom: 0; left: 0; right: 0; width: 100%; padding: 0 0 var(--m-safe-b); background: rgba(11, 11, 15, 0.97); }
html#xc body .m-drawer nav.m-drawer-panel { position: absolute; top: 0; bottom: 0; left: 0; width: min(304px, 84vw); padding: 0; background: #121218; z-index: auto; }
/* Headings: no gradient text from the legacy theme */
html#xc body .headline h1, html#xc body .headline h2 {
  background: none !important; -webkit-background-clip: border-box !important; background-clip: border-box !important;
  -webkit-text-fill-color: currentColor !important; text-shadow: none !important; white-space: normal !important;
}
/* Meta line separator: "3.0K · 10 hours ago" (DOM order is added, views; shown views first) */
html#xc body .list-videos .item .wrap .added:has(~ .views)::before,
html#xc body .list-videos .item .wrap .views ~ .added::before { content: '·' !important; display: inline !important; margin: 0 5px; font-family: inherit !important; }
html#xc body .m-shell h2, html#xc body .m-shell p { text-align: left; text-transform: none; }
