.uph-sheet-page #main { background: #0c0e15; }
.uph-sheet {
  --sheet-bg: #0c0e15;
  --sheet-card: #151925;
  --sheet-line: #282e3e;
  --sheet-text: #f7f8fc;
  --sheet-muted: #abb3c7;
  --sheet-accent: #ff5569;
  --sheet-gold: #f5cc83;
  --sheet-width: 1300px;
  --sheet-gutter: clamp(16px, 4vw, 56px);
  --sheet-anchor: calc(var(--sheet-header, 64px) + 64px);
  color: var(--sheet-text);
}
.uph-sheet *, .uph-sheet *::before, .uph-sheet *::after { box-sizing: border-box; }
.uph-sheet [hidden] { display: none !important; }
.uph-sheet :is(a, button, summary):focus-visible { outline: 2px solid var(--sheet-accent); outline-offset: 3px; }
.uph-sheet :is([data-sheet-panel], #trailer, [id^="td-comment-"], #mm-comments) { scroll-margin-top: var(--sheet-anchor); }

.uph-sheet .uph-sheet-hero {
  isolation: isolate;
  min-height: 0;
  overflow: hidden;
  margin-bottom: 0 !important;
  background: var(--sheet-bg);
}
.uph-sheet .uph-sheet-hero::after {
  display: block;
  background:
    linear-gradient(0deg, var(--sheet-bg) 0%, rgb(12 14 21 / 20%) 65%, rgb(12 14 21 / 44%) 100%),
    linear-gradient(90deg, #0c0e15 0%, rgb(12 14 21 / 88%) 32%, rgb(12 14 21 / 35%) 72%, rgb(12 14 21 / 16%) 100%);
}
.uph-sheet-backdrop { position: absolute; inset: 0; display: block; }
.uph-sheet-backdrop img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center 38%; }
.uph-sheet .uph-sheet-inner {
  min-height: 0 !important;
  width: 100%;
  max-width: var(--sheet-width) !important;
  grid-template-columns: clamp(150px, 16vw, 198px) minmax(0, 1fr);
  align-items: start;
  column-gap: clamp(22px, 4vw, 48px);
  row-gap: 20px;
  margin: 0 auto;
  padding: calc(24px + var(--uph-title-header-height, 68px)) var(--sheet-gutter) 30px !important;
}
.uph-sheet-crumbs { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--sheet-muted); font-size: .8rem; }
.uph-sheet-crumbs a + a::before { content: '›'; margin-right: 8px; color: #8d95a8; }
.uph-sheet-crumbs a:hover, .uph-sheet-meta a:hover { color: var(--sheet-text); text-decoration: underline; }
.uph-sheet-poster { display: block; aspect-ratio: 2 / 3; overflow: hidden; border-radius: 15px; border: 1px solid #ffffff35; background: var(--sheet-card); box-shadow: 0 18px 45px #0008; }
.uph-sheet-poster img { width: 100%; height: 100%; display: block; object-fit: cover; }
.uph-sheet-summary { min-width: 0; padding-top: 2px; }
.uph-sheet-inner:not(:has(.uph-sheet-poster)) .uph-sheet-summary { grid-column: 1 / -1; }
.uph-sheet-labels, .uph-sheet-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 11px; }
.uph-sheet-labels span { padding: 4px 9px; border-radius: 5px; background: #222735; color: #e0e4ee; font-size: .72rem; font-weight: 650; }
.uph-sheet-labels .uph-sheet-type { background: #41222d; color: #ffb5bf; }
.uph-sheet-title { margin: 12px 0 10px; color: var(--sheet-text); font-size: clamp(2rem, 4.2vw, 4rem); font-weight: 760; line-height: 1.04; text-wrap: balance; overflow-wrap: anywhere; }
.uph-sheet-title picture { display: block; }
.uph-sheet-title img { display: block; width: auto; height: auto; max-width: min(100%, 365px); max-height: 106px; object-fit: contain; object-position: left center; }
.uph-sheet-title span { display: block; margin-top: 8px; font-size: .55em; color: var(--sheet-muted); }
.uph-sheet .uph-sheet-meta { margin: 0; color: #d2d8e6; font-size: .86rem; }
.uph-sheet-meta a { color: inherit; }
.uph-sheet-meta .uph-sheet-score { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border: 1px solid #f5cc8352; border-radius: 6px; color: var(--sheet-gold); background: #271e17c2; font-size: .76rem; }
.uph-sheet .uph-sheet-overview { margin: 13px 0 0; max-width: 690px; color: #dbe0ec; font-size: .94rem; line-height: 1.58; -webkit-line-clamp: 3; overflow-wrap: anywhere; }
.uph-sheet .uph-sheet-read { color: var(--sheet-muted); font-size: .8rem; }
.uph-sheet .uph-sheet-cta { gap: 8px !important; display: flex !important; align-items: center !important; max-width: 780px; margin: 16px 0 0 !important; }
.uph-sheet .uph-sheet-cta :is(a.btn, button.btn, .wdg-title-button, .ultra-recommend) {
  width: auto !important;
  min-height: 41px !important;
  height: auto !important;
  flex: 0 0 auto;
  padding: 8px 13px !important;
  margin: 0 !important;
  border: 1px solid #ffffff33 !important;
  border-radius: 8px !important;
  background: #1b1f2bed !important;
  color: var(--sheet-text) !important;
  font: 650 .79rem/1.3 system-ui !important;
}
.uph-sheet .uph-sheet-cta .btn-play { background: #c6223c !important; border-color: #ff697b !important; color: #fff !important; }
.uph-sheet .uph-sheet-cta :is(a.btn, button.btn, .wdg-title-button, .ultra-recommend):hover { background: #31394c !important; border-color: #ff8391 !important; }
.uph-sheet .uph-sheet-cta .btn-play:hover { background: #bc1833 !important; }
.uph-sheet .uph-sheet-cta .ultra-recommend::before { content: none; }
.uph-sheet .uph-series-alerts { margin: 0; }
.uph-sheet .uph-series-alert-toggle { min-height: 40px; }
.uph-sheet-community { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 24px; margin-top: 15px; }
.uph-sheet-community:not(:has(> :not(:empty))), .uph-sheet-community > :empty { display: none; }
.uph-sheet .uph-sheet-community .tr-widget { align-items: flex-start; }
.uph-sheet .uph-sheet-community .tr-meta { flex-wrap: wrap; }
.uph-sheet .uph-sheet-community .cl-title-actions {
  justify-content: flex-start; border: 0; padding: 0; margin: 0; border-radius: 0; background: none;
}

.uph-sheet-tabs { position: sticky; top: var(--sheet-header, 64px); z-index: 12; border-block: 1px solid var(--sheet-line); background: #0e111aeF; backdrop-filter: blur(14px); }
.uph-sheet-tabs-in, .uph-sheet-tablist { display: flex; align-items: stretch; width: max-content; }
.uph-sheet-tabs-in { width: 100%; max-width: var(--sheet-width); margin: 0 auto; padding: 0 var(--sheet-gutter); overflow-x: auto; scrollbar-width: thin; }
.uph-sheet-tabs a {
  display: inline-flex; align-items: center; min-height: 52px; flex: 0 0 auto;
  padding: 0 clamp(12px, 1.5vw, 22px); color: var(--sheet-muted); border-bottom: 2px solid transparent;
  font-size: .9rem; font-weight: 650; white-space: nowrap;
}
.uph-sheet-tabs a:hover, .uph-sheet-tabs a[aria-selected="true"] { color: var(--sheet-text); background: #ffffff05; }
.uph-sheet-tabs a[aria-selected="true"] { border-bottom-color: var(--sheet-accent); }
.uph-sheet-tabs a:focus-visible { outline-offset: -4px; }
.uph-sheet-body { max-width: var(--sheet-width); min-height: 320px; padding: 25px var(--sheet-gutter) 52px; margin: 0 auto; }
.uph-sheet-panel { min-width: 0; }
.uph-sheet-panel + .uph-sheet-panel:not([hidden]) { margin-top: 28px; }
.uph-sheet-tabs:has([role="tablist"]) + .uph-sheet-body .uph-sheet-panel { margin-top: 0; }
.uph-sheet-heading { margin: 0 0 17px; font-size: clamp(1.25rem, 2.5vw, 1.62rem); font-weight: 740; line-height: 1.25; color: var(--sheet-text); }

.uph-episode-header { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin-bottom: 13px; }
.uph-season { position: relative; z-index: 2; max-width: 100%; }
.uph-season summary, .uph-season-label {
  min-height: 38px; display: flex; align-items: center; gap: 7px; max-width: 100%; padding: 7px 11px;
  background: var(--sheet-card); border: 1px solid var(--sheet-line); border-radius: 8px; color: var(--sheet-text); font-size: .82rem;
}
.uph-season summary { cursor: pointer; list-style: none; }
.uph-season summary::-webkit-details-marker { display: none; }
.uph-season summary::after { content: '⌄'; margin-left: 6px; color: var(--sheet-muted); }
.uph-season[open] summary::after { transform: rotate(180deg); }
.uph-season summary span, .uph-season li span, .uph-season-label { color: var(--sheet-muted); }
.uph-season ul {
  position: absolute; left: 0; top: calc(100% + 6px); min-width: 100%; width: max-content;
  max-width: min(84vw, 350px); max-height: 280px; overflow-y: auto; margin: 0; padding: 5px;
  border: 1px solid var(--sheet-line); border-radius: 9px; background: #171c29; box-shadow: 0 10px 30px #0008; list-style: none;
}
.uph-season li a { display: flex; justify-content: space-between; gap: 12px; padding: 9px 10px; border-radius: 5px; font-size: .84rem; }
.uph-season li a:hover, .uph-season li a[aria-current] { background: #2a3245; }
.uph-episode-list { margin: 0; padding: 0; list-style: none; border: 1px solid var(--sheet-line); border-radius: 14px; overflow: hidden; background: var(--sheet-card); }
.uph-episode-list li + li { border-top: 1px solid var(--sheet-line); }
.uph-episode {
  display: grid; grid-template-columns: clamp(105px, 15vw, 178px) minmax(0, 1fr) 26px; align-items: center;
  gap: clamp(10px, 2.2vw, 24px); min-height: 72px; padding: 11px 15px; color: var(--sheet-text);
}
.uph-episode:hover { background: #1d2231; text-decoration: none; }
.uph-episode:focus-visible { outline-offset: -4px !important; }
.uph-episode-still { display: block; overflow: hidden; border-radius: 7px; aspect-ratio: 16 / 9; background: linear-gradient(135deg,#292f3e,#181b25); }
.uph-episode-still :is(picture, img, .ph) { display: block; width: 100%; height: 100%; object-fit: cover; }
.uph-episode-copy { display: grid; gap: 3px; overflow-wrap: anywhere; }
.uph-episode-copy strong { font-size: 1rem; line-height: 1.28; }
.uph-episode-number { color: #ff99a6; font-size: .72rem; font-weight: 650; }
.uph-episode-summary { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; color: #bcc5d7; font-size: .84rem; line-height: 1.4; }
.uph-episode-meta { display: flex; flex-wrap: wrap; gap: 3px 12px; color: var(--sheet-muted); font-size: .74rem; }
.uph-episode-soon { color: var(--sheet-gold); }
.uph-episode-open { font-size: 1.5rem; color: var(--sheet-muted); text-align: right; }
.uph-sheet-empty { color: var(--sheet-muted); }

.uph-sheet-cast { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.uph-sheet-cast .pp { width: 100%; min-width: 0; display: block; padding: 10px; border-radius: 11px; background: var(--sheet-card); border: 1px solid var(--sheet-line); text-align: left; }
.uph-sheet-cast .pp:hover { border-color: #66708a; text-decoration: none; }
.uph-sheet-cast .pp-img { border-radius: 8px; aspect-ratio: 4 / 5; }
.uph-sheet-cast .pp-t, .uph-sheet-cast .pp-m { display: block; white-space: normal; overflow-wrap: anywhere; }
.uph-sheet-cast .pp-t { margin-top: 8px; }
.uph-sheet-cast .pp-m { color: var(--sheet-muted); }
.uph-sheet-synopsis { max-width: 760px; margin: 0 0 20px; color: #dbe0ec; line-height: 1.7; white-space: pre-line; }
.uph-sheet-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 0; padding: 1px; overflow: hidden; border-radius: 12px; background: var(--sheet-line); }
.uph-sheet-facts:empty { display: none; }
.uph-sheet-facts div { min-width: 0; padding: 14px; background: var(--sheet-card); }
.uph-sheet-facts dt { margin-bottom: 5px; color: var(--sheet-muted); font-size: .8rem; }
.uph-sheet-facts dd { margin: 0; color: var(--sheet-text); font-weight: 590; overflow-wrap: anywhere; }
.uph-sheet-facts .uph-sheet-fact-links dd { display: flex; flex-wrap: wrap; gap: 5px 8px; }
.uph-sheet-facts a { padding: 3px 7px; border: 1px solid #ffffff22; border-radius: 5px; font-size: .8rem; }
.uph-sheet-facts a:hover { background: #ffffff12; }
.uph-sheet-trailer { max-width: 780px; margin-bottom: 22px; }
.uph-sheet-trailer h3 { margin: 0 0 9px; font-size: 1rem; }
.uph-sheet-trailer .facade { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid var(--sheet-line); border-radius: 12px; }
.uph-sheet-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.uph-gallery-item { display: grid; align-content: start; gap: 8px; min-width: 0; padding: 9px; border: 1px solid var(--sheet-line); border-radius: 10px; background: var(--sheet-card); font-size: .83rem; }
.uph-gallery-item:hover { border-color: #66708a; text-decoration: none; }
.uph-gallery-item picture { display: block; aspect-ratio: 16 / 9; border-radius: 6px; background: #0e111b; overflow: hidden; }
.uph-gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.uph-gallery-poster img { object-fit: contain; }
.uph-sheet-lightbox[open] { display: grid; place-items: center; max-width: 94vw; max-height: 90vh; margin: auto; padding: 0; overflow: hidden; border: 1px solid var(--sheet-line); border-radius: 12px; background: #0d1019; color: #fff; }
.uph-sheet-lightbox::backdrop { background: #000c; }
.uph-sheet-lightbox button { position: absolute; right: 8px; top: 8px; width: 40px; height: 40px; border: 1px solid #ffffff50; border-radius: 50%; background: #111823ed; color: #fff; font-size: 24px; cursor: pointer; }
.uph-sheet-lightbox img { display: block; min-width: 58px; max-width: 93vw; max-height: 87vh; object-fit: contain; }
.uph-sheet-comments .td-box { width: 100%; max-width: none; margin: 0; }
.uph-sheet-related .grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 15px; }

body.uph-sheet-page:has(.uph-title-hero) .hdr.uph-title-header[data-uph-sheet-scrolled] { background: #0c0e15f5 !important; border-bottom-color: #282e3e !important; }
@media (max-width: 767px) {
  .uph-sheet .uph-sheet-inner { padding-top: calc(13px + var(--uph-title-header-height, 0px)) !important; }
  .uph-sheet .uph-sheet-hero:not(.uph-title-hero) { margin-top: 0; }
}
@media (max-width: 640px) {
  .uph-sheet .uph-sheet-inner { grid-template-columns: clamp(78px, 24vw, 112px) minmax(0, 1fr); gap: 8px 12px; padding-bottom: 14px !important; }
  .uph-sheet-summary { display: contents; }
  .uph-sheet-poster { grid-column: 1; grid-row: 2 / span 3; border-radius: 10px; }
  .uph-sheet-labels, .uph-sheet-title, .uph-sheet-meta { grid-column: 2; }
  .uph-sheet-inner:not(:has(.uph-sheet-poster)) :is(.uph-sheet-labels, .uph-sheet-title, .uph-sheet-meta) { grid-column: 1 / -1; }
  .uph-sheet-labels { grid-row: 2; align-self: end; }
  .uph-sheet-title { grid-row: 3; margin: 0; font-size: clamp(1.35rem, 6vw, 2.1rem); }
  .uph-sheet-title img { max-width: min(100%, 185px); max-height: 72px; }
  .uph-sheet .uph-sheet-meta { grid-row: 4; align-self: start; font-size: .78rem; gap: 4px 8px; }
  .uph-sheet :is(.uph-sheet-overview, .uph-sheet-read, .uph-sheet-cta, .uph-sheet-community) { grid-column: 1 / -1; margin-top: 0 !important; }
  .uph-sheet .uph-sheet-overview { -webkit-line-clamp: 2; }
  .uph-sheet .uph-sheet-read { justify-self: start; }
  .uph-sheet .uph-sheet-cta { gap: 7px !important; }
  .uph-sheet-cta :is(a.btn, button.btn, .wdg-title-button, .ultra-recommend) { max-width: 100%; }
  .uph-sheet-tabs a { min-height: 47px; font-size: .83rem; }
  .uph-sheet-body { padding-top: 18px; }
  .uph-episode { grid-template-columns: minmax(72px, 27vw) minmax(0, 1fr) 12px; padding: 8px; gap: 9px; }
  .uph-episode-copy strong { font-size: .9rem; }
  .uph-episode-summary { -webkit-line-clamp: 1; font-size: .77rem; }
  .uph-sheet-cast { grid-template-columns: repeat(auto-fill, minmax(94px, 1fr)); gap: 8px; }
  .uph-sheet-cast .pp { padding: 6px; }
  .uph-sheet-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .uph-sheet-facts div { padding: 9px; }
  .uph-sheet-related .grid, .uph-sheet-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .uph-sheet *, .uph-sheet *::before, .uph-sheet *::after { scroll-behavior: auto !important; transition: none !important; }
}
