.viewer-profile,
.viewer-profile-error {
  width: min(100%, 56rem);
  min-width: 0;
  margin: 0 auto 20px;
  box-sizing: border-box;
  border: 1px solid var(--account-line);
  border-radius: 16px;
  background: var(--account-card);
  color: var(--account-ink);
  overflow-wrap: anywhere;
}

.viewer-profile {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.viewer-profile-error {
  padding: 14px 18px;
}

.viewer-profile-section {
  min-width: 0;
  padding: clamp(16px, 2.6vw, 24px);
  scroll-margin-block-start: 90px;
}

.viewer-profile-section + .viewer-profile-section {
  border-inline-start: 1px solid var(--account-line);
}

.front .account-center .viewer-profile-section h2 {
  margin: 0 0 12px;
  color: var(--account-ink);
  font-size: 18px;
  line-height: 1.4;
}

.front .account-center .viewer-profile-empty,
.front .account-center .viewer-profile-list small {
  margin: 0;
  color: var(--account-muted);
  font-size: 13px;
  line-height: 1.55;
}

.front .account-center .viewer-profile-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.viewer-profile-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 4px 0;
}

.viewer-profile-list li + li,
.viewer-request-list li:first-child {
  border-block-start: 1px solid var(--account-line);
}

.viewer-profile-list li > :first-child {
  min-width: 0;
}

.front .account-center .viewer-profile-list a {
  color: var(--account-ink);
  font-weight: 650;
  text-decoration: underline;
  text-decoration-color: var(--account-line);
  text-underline-offset: 3px;
}

.front .account-center .viewer-profile-list a:hover {
  color: var(--account-accent);
  text-decoration-color: currentColor;
}

.viewer-profile-list small {
  display: block;
}

.viewer-profile-list form {
  flex: none;
  margin: 0;
}

.front .account-center .viewer-profile :is(.viewer-profile-list, .viewer-profile-clear) button {
  padding: 0 4px;
  min-height: 36px;
  border: 0;
  background: transparent;
  color: var(--account-accent);
  font: inherit;
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
}

.viewer-profile-clear {
  margin-block-start: 10px;
  color: var(--account-muted);
  font-size: 13px;
}

.viewer-profile-clear summary {
  width: fit-content;
  min-height: 28px;
  cursor: pointer;
}

.front .account-center .viewer-request-form textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 56px;
  padding: 8px 12px;
  resize: vertical;
  border: 1px solid var(--account-line);
  border-radius: 9px;
  color: var(--account-ink);
  background: var(--account-field);
  font: inherit;
}

.front .account-center .viewer-request-list {
  margin-block-start: 14px;
}

.viewer-request-list li {
  align-items: baseline;
  padding-block: 8px;
}

.viewer-request-list p {
  margin: 3px 0;
  white-space: pre-wrap;
}

.viewer-request-state {
  flex: none;
}

.viewer-movie-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  min-width: 0;
  max-width: 100%;
  vertical-align: middle;
}

.viewer-movie-actions form {
  margin: 0;
}

.viewer-movie-actions [hidden] {
  display: none !important;
}

.viewer-movie-actions .viewer-movie-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid currentColor;
  border-color: color-mix(in srgb, currentColor 32%, transparent);
  border-radius: 8px;
  color: inherit;
  background: transparent;
  font: inherit;
  font-weight: 650;
  font-size: 14px;
  line-height: 1.25;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.viewer-movie-actions .viewer-movie-button:hover,
.viewer-movie-actions .viewer-movie-button[aria-pressed="true"] {
  border-color: currentColor;
  background: color-mix(in srgb, currentColor 10%, transparent);
}

.viewer-movie-actions .viewer-movie-button:disabled {
  cursor: wait;
}

.viewer-movie-actions .viewer-movie-status {
  font-size: 13px;
}

.viewer-movie-actions :focus-visible,
.viewer-profile :focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

@media (max-width: 760px) {
  .viewer-profile {
    grid-template-columns: minmax(0, 1fr);
  }

  .viewer-profile-section + .viewer-profile-section {
    border-inline-start: 0;
    border-block-start: 1px solid var(--account-line);
  }
}

/* 2026-12-01 Rick：收藏按钮从现在的位置去掉（新播放页把收藏放进播放器下方操作栏）。
   只隐藏这一块，不删标记：登录用户的观看记录、续播仍靠它的 data 属性工作。
   选择器特意比 moviecms-ui-unify-r1 的 display:flex!important 更具体。 */
html:root body .viewer-movie-actions[data-viewer-movie][data-movie-id]{display:none!important}

/* player title + line / episode capsules r2 (【美工】2026-12-03; Rick 12-02 22:39 asked, 12-03 05:21 approved v1:
   “同意，关于我说的模版修改是所有模版都要改哦，不只是短剧和美剧”).
   Every player template: reference families and direct A / B, dbku, huarw, reel, direct-v2 and portal
   families (haoju / iqiyi / hanju-v3), jable family, keke / oletv family, tube.
   CSS only: the h1 stays the same h1 with the same text; links, order and ads are untouched; no rule here
   changes whether a line tab or an episode is shown (collapsed lists keep hiding the rest).
   The long html:root…[class] prefix only lifts these rules over each family's own player styles;
   #pc-title-boost never exists — it lifts the title over reference-navigation's id-weighted heading gradient. */
html body.front:is(.ref-mobile-page-player, .dpab, .db-player-page, .hw-player-page, .rl-player-page, .player-page, .jable-player, .tube-player) {
  --pc-title-grad: linear-gradient(100deg, #e8467c 0%, #d9711a 52%, #7b5bff 100%);
  --pc-line-1: linear-gradient(120deg, #c2255c, #c2410c);
  --pc-line-2: linear-gradient(120deg, #1864ab, #6741d9);
  --pc-line-3: linear-gradient(120deg, #0b7285, #1864ab);
  --pc-line-4: linear-gradient(120deg, #a14f00, #c92a2a);
  --pc-ep-on: var(--ui-accent, #c2255c);
  --pc-ep-on-fg: var(--ui-on-accent, #fff);
}
/* film title: gradient text, size kept in check (two lines at most on phones) */
html:root:root:root:root:root body.front:is(.ref-mobile-page-player, .dpab, .db-player-page, .hw-player-page, .rl-player-page, .player-page, .jable-player, .tube-player)[class][class][class] :is(.ref-player-heading h1, h1.db-player-title, h1.hw-watch-title, h1.rl-watch-title, .player-side > h1, .jable-now-playing h1, .jable-play-side > h1, h1.keke-player-title, .tube-now h1, #pc-title-boost) {
  font-size: clamp(20px, 1.2vw + 14px, 28px) !important;
  line-height: 1.28 !important;
  font-weight: 800 !important;
  letter-spacing: .5px;
  color: #e8467c;
  background: var(--pc-title-grad) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  text-shadow: none !important;
  overflow-wrap: anywhere;
}
@media (max-width: 700px) {
  html:root:root:root:root:root body.front:is(.ref-mobile-page-player, .dpab, .db-player-page, .hw-player-page, .rl-player-page, .player-page, .jable-player, .tube-player)[class][class][class] :is(.ref-player-heading h1, h1.db-player-title, h1.hw-watch-title, h1.rl-watch-title, .player-side > h1, .jable-now-playing h1, .jable-play-side > h1, h1.keke-player-title, .tube-now h1, #pc-title-boost) {
    font-size: clamp(18px, 5vw, 21px) !important;
    display: -webkit-box !important; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
  }
}
@media (forced-colors: active) {
  html:root:root:root:root:root body.front:is(.ref-mobile-page-player, .dpab, .db-player-page, .hw-player-page, .rl-player-page, .player-page, .jable-player, .tube-player)[class][class][class] :is(.ref-player-heading h1, h1.db-player-title, h1.hw-watch-title, h1.rl-watch-title, .player-side > h1, .jable-now-playing h1, .jable-play-side > h1, h1.keke-player-title, .tube-now h1, #pc-title-boost) { background: none !important; -webkit-text-fill-color: CanvasText !important; }
}
/* lines: capsules, each line its own gradient; the current one is full colour with a ring */
html:root:root:root:root:root body.front:is(.ref-mobile-page-player, .dpab, .db-player-page, .hw-player-page, .rl-player-page, .player-page, .jable-player, .tube-player)[class][class][class] :is(.ref-mobile-source-tabs, .hw-line-tabs, .rl-line-tabs, .keke-lines) {
  gap: 8px !important;
}
html:root:root:root:root:root body.front:is(.ref-mobile-page-player, .dpab, .db-player-page, .hw-player-page, .rl-player-page, .player-page, .jable-player, .tube-player)[class][class][class] :is(.ref-mobile-source-tabs > a, .hw-line-tabs > a, .rl-line-tabs > button, .keke-lines > a, :is(.player-lines, .jable-lines, .tube-lines) > details > summary) {
  min-height: 34px !important; line-height: 34px !important; padding: 0 16px !important; border: 0 !important; border-radius: 999px !important;
  text-align: center !important; box-sizing: border-box;
  background: var(--pc-line-1) !important; color: #fff !important; font-size: 13px !important; font-weight: 600 !important;
  white-space: nowrap; text-decoration: none !important; box-shadow: none !important; text-shadow: none !important;
  filter: saturate(.55) brightness(.86); transition: filter .2s ease, box-shadow .2s ease;
}
html:root:root:root:root:root body.front:is(.ref-mobile-page-player, .dpab, .db-player-page, .hw-player-page, .rl-player-page, .player-page, .jable-player, .tube-player)[class][class][class] :is(:is(.ref-mobile-source-tabs > a, .hw-line-tabs > a, .rl-line-tabs > button, .keke-lines > a):nth-child(4n+2), :is(.player-lines, .jable-lines, .tube-lines) > details:nth-of-type(4n+2) > summary) { background: var(--pc-line-2) !important; }
html:root:root:root:root:root body.front:is(.ref-mobile-page-player, .dpab, .db-player-page, .hw-player-page, .rl-player-page, .player-page, .jable-player, .tube-player)[class][class][class] :is(:is(.ref-mobile-source-tabs > a, .hw-line-tabs > a, .rl-line-tabs > button, .keke-lines > a):nth-child(4n+3), :is(.player-lines, .jable-lines, .tube-lines) > details:nth-of-type(4n+3) > summary) { background: var(--pc-line-3) !important; }
html:root:root:root:root:root body.front:is(.ref-mobile-page-player, .dpab, .db-player-page, .hw-player-page, .rl-player-page, .player-page, .jable-player, .tube-player)[class][class][class] :is(:is(.ref-mobile-source-tabs > a, .hw-line-tabs > a, .rl-line-tabs > button, .keke-lines > a):nth-child(4n+4), :is(.player-lines, .jable-lines, .tube-lines) > details:nth-of-type(4n+4) > summary) { background: var(--pc-line-4) !important; }
html:root:root:root:root:root body.front:is(.ref-mobile-page-player, .dpab, .db-player-page, .hw-player-page, .rl-player-page, .player-page, .jable-player, .tube-player)[class][class][class] :is(.ref-mobile-source-tabs > a, .hw-line-tabs > a, .rl-line-tabs > button, .keke-lines > a, :is(.player-lines, .jable-lines, .tube-lines) > details > summary):is(:hover, :focus-visible) { filter: none; }
html:root:root:root:root:root body.front:is(.ref-mobile-page-player, .dpab, .db-player-page, .hw-player-page, .rl-player-page, .player-page, .jable-player, .tube-player)[class][class][class] :is(.ref-mobile-source-tabs > a[aria-current]:not([aria-current="false"]), .hw-line-tabs > a[aria-selected="true"], .rl-line-tabs > button[aria-selected="true"], .keke-lines > a.current, :is(.player-lines, .jable-lines, .tube-lines) > details[open] > summary) {
  filter: none; font-weight: 800 !important;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .92), 0 6px 16px rgba(0, 0, 0, .28) !important;
}
html:root:root:root:root:root body.front:is(.ref-mobile-page-player, .dpab, .db-player-page, .hw-player-page, .rl-player-page, .player-page, .jable-player, .tube-player)[class][class][class] :is(.ref-mobile-source-tabs > a, .hw-line-tabs > a, .rl-line-tabs > button, .keke-lines > a, :is(.player-lines, .jable-lines, .tube-lines) > details > summary):focus-visible { outline: 2px solid currentColor !important; outline-offset: 3px; }
html:root:root:root:root:root body.front:is(.ref-mobile-page-player, .dpab, .db-player-page, .hw-player-page, .rl-player-page, .player-page, .jable-player, .tube-player)[class][class][class] :is(.player-lines, .jable-lines, .tube-lines) > details > summary * { color: inherit !important; opacity: .9; }
/* the portal families' line headers are <summary>: show them as inline capsules (marker hidden) */
html:root:root:root:root:root body.front:is(.ref-mobile-page-player, .dpab, .db-player-page, .hw-player-page, .rl-player-page, .player-page, .jable-player, .tube-player)[class][class][class] :is(.player-lines, .jable-lines, .tube-lines) > details > summary {
  display: inline-flex !important; align-items: center; gap: 6px; width: auto !important; max-width: 100%; line-height: 1.2 !important; list-style: none;
}
html:root:root:root:root:root body.front:is(.ref-mobile-page-player, .dpab, .db-player-page, .hw-player-page, .rl-player-page, .player-page, .jable-player, .tube-player)[class][class][class] :is(.player-lines, .jable-lines, .tube-lines) > details > summary::-webkit-details-marker { display: none; }
/* episodes: plain capsules (no gradient): each template keeps its own tile colours, only the shape becomes a capsule;
   the current one is one solid colour */
html:root:root:root:root:root body.front:is(.ref-mobile-page-player, .dpab, .db-player-page, .hw-player-page, .rl-player-page, .player-page, .jable-player, .tube-player)[class][class][class] :is(.rn-episodes, .dd-episodes, .jp-episodes, .nn24-episodes, .nnin-episodes, .dpab-episodes, .db-episodes, .hw-episodes, .rl-ep-grid, .episode-list, .tube-episode-grid) a {
  min-height: 36px !important; line-height: 34px !important; padding: 0 10px !important; border-radius: 999px !important;
  text-align: center !important; box-sizing: border-box;
  font-size: 13px !important; font-weight: 500 !important; text-decoration: none !important;
}
html:root:root:root:root:root body.front:is(.ref-mobile-page-player, .dpab, .db-player-page, .hw-player-page, .rl-player-page, .player-page, .jable-player, .tube-player)[class][class][class] :is(.rn-episodes, .dd-episodes, .jp-episodes, .nn24-episodes, .nnin-episodes, .dpab-episodes, .db-episodes, .hw-episodes, .rl-ep-grid, .episode-list, .tube-episode-grid) a:is([aria-current]:not([aria-current="false"]), .active) {
  background: var(--pc-ep-on) !important; color: var(--pc-ep-on-fg) !important; -webkit-text-fill-color: var(--pc-ep-on-fg) !important; font-weight: 700 !important;
}
@media (prefers-reduced-motion: reduce) {
  html body.front :is(.ref-mobile-source-tabs > a, .hw-line-tabs > a, .rl-line-tabs > button, .keke-lines > a, :is(.player-lines, .jable-lines, .tube-lines) > details > summary) { transition: none; }
}
