/* Cue Home — Paper 6WU-0 / 7H0-0 on mobile, cinejoy desktop. Loaded last. */

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.shell[data-view="home"] main {
  width: 100%;
  max-width: none;
  min-height: 100dvh;
  padding: 0;
}

.shell[data-view="home"] .sidebar {
  display: none;
}

.home-screen {
  box-sizing: border-box;
  display: flex;
  min-height: 100dvh;
  flex-direction: column;
  overflow: visible;
  padding: 20px 12px;
  background: var(--color-archive-black);
  color: var(--color-text-primary);
  font-synthesis: none;
}

.home-screen button,
.home-screen a.home-square-action,
.home-screen label.home-mark {
  min-height: 0;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  cursor: pointer;
}

.home-screen button:hover,
.home-screen a:hover {
  border: 0;
}

.home-screen button:active {
  transform: scale(var(--scale-press));
}

.home-chrome {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-self: stretch;
}

.home-chrome-row {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
}

.home-screen .home-mark,
.home-screen .home-close {
  display: grid;
  width: 34px;
  min-width: 34px;
  height: 32px;
  min-height: 32px;
  flex-shrink: 0;
  place-items: center;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: var(--color-chip-idle);
  box-shadow: 0 0 0 1px var(--color-chip-border);
}

.home-screen .home-close {
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  place-items: center;
  padding: 0;
}

.home-mark-logo {
  width: 34px;
  height: 32px;
  background: url("./assets/paper/mark.png") center / contain no-repeat;
}

.home-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-close .hugeicon {
  width: 20px;
  height: 20px;
  rotate: 0deg;
}

.home-type-switch {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: var(--space-1);
  overflow: visible;
}

.home-screen .home-type-switch button {
  display: inline-flex;
  height: 34px;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-chip-border);
  background: var(--color-chip-idle);
  padding: 4px 14px;
  color: var(--color-text-muted);
  font-family: Inter, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
}

.home-screen .home-type-switch button.active {
  background: var(--color-signal-teal);
  color: var(--color-archive-black);
}

.home-view-rail {
  display: flex;
  width: 100%;
  gap: 8px;
  overflow: clip;
  padding-top: 16px;
}

.home-screen .home-view-chip {
  display: flex;
  width: 94px;
  min-width: 0;
  height: 54px;
  min-height: 54px;
  flex-shrink: 0;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 3px;
  border-radius: var(--radius-chip);
  border: 1px solid var(--color-idle-stroke);
  background: var(--color-chip-idle);
  padding: 4px 10px;
  color: var(--color-text-muted);
  font-family: Inter, system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  line-height: 14px;
}

.home-view-chip[data-home-filter="today"] {
  width: 82px;
}

.home-view-chip[data-home-filter="week"] {
  width: 92px;
}

.home-view-chip[data-home-filter="recommended"] {
  width: 104px;
}

.home-view-chip[data-home-filter="new"] {
  width: 94px;
}

.home-view-chip .hugeicon {
  width: 12px;
  height: 12px;
}

.home-view-chip[data-home-filter="today"] .hugeicon {
  width: 18px;
  height: 18px;
}

.home-view-chip[data-home-filter="recommended"] .hugeicon,
.home-view-chip[data-home-filter="new"] .hugeicon {
  width: 16px;
  height: 16px;
}

.home-screen .home-view-chip.active {
  border-color: transparent;
  background: var(--color-chip-active);
  color: var(--color-archive-black);
}

.home-hero-slider {
  position: relative;
  width: 100%;
  overflow: hidden;
  touch-action: pan-y;
}

.home-hero-track {
  display: flex;
  transition-property: transform;
  transition-duration: var(--duration-open);
  transition-timing-function: var(--ease-out);
  will-change: transform;
}

.home-hero-slide:not(.active) {
  pointer-events: none;
}

.home-hero-slide {
  position: relative;
  inset: auto;
  display: flex;
  width: 100%;
  min-width: 100%;
  flex-direction: column;
  align-items: stretch;
}

.home-hero-art {
  position: relative;
  overflow: clip;
  width: 100%;
  height: 525.2px;
  border-top-left-radius: var(--radius-chip);
  border-top-right-radius: var(--radius-chip);
  mask-image: linear-gradient(rgb(0, 0, 0) 40%, rgba(0, 0, 0, 0) 98%);
}

.home-hero-cover,
.home-hero-slide .hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.home-hero-cover {
  background:
    var(--media-art) 50% 18% / cover no-repeat,
    var(--color-panel);
}

.home-hero-slide .hero-video {
  z-index: 1;
  border: 0;
  pointer-events: none;
}

.home-hero-wash {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-top-left-radius: var(--radius-chip);
  border-top-right-radius: var(--radius-chip);
  background: linear-gradient(0deg, oklab(11.5% 0 0) 0%, oklab(11.5% 0 0 / 40%) 50%, oklab(0% 0 0 / 0%) 100%);
}

.home-hero-copy {
  position: relative;
  z-index: 3;
  display: flex;
  max-width: 700px;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: -176px auto 0;
  padding: 0 24px;
  min-width: 0;
  text-align: center;
}

.home-hero-copy .title-treatment {
  display: flex;
  width: min(333px, 75%);
  max-width: 75%;
  height: 80px;
  max-height: 80px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  overflow: clip;
  filter: drop-shadow(0 25px 25px #00000026);
}

.home-hero-copy .title-logo {
  width: 100%;
  height: 80px;
  object-fit: contain;
  object-position: center;
}

.home-hero-copy .title-wordmark {
  display: block;
  max-width: 12ch;
  color: #fff;
  font-size: 30px;
  font-weight: 700;
  line-height: 34px;
  text-align: center;
  text-wrap: balance;
}

.home-episode-row {
  max-width: 100%;
  flex-wrap: wrap;
  justify-content: center;
  display: flex;
  align-items: center;
  gap: 4px;
}

.home-episode-pill {
  display: inline-flex;
  height: 23px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  border: 1px solid #ffffff26;
  background: #00000073;
  padding: 4px 8px;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 150%;
  backdrop-filter: blur(12px);
}

.home-episode-name {
  display: -webkit-box;
  max-width: 100%;
  overflow: hidden;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 150%;
  margin-bottom: 4px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.home-screen .home-hero-slider {
  margin-top: 4px;
}

.home-hero-copy .hero-summary {
  display: -webkit-box;
  overflow: hidden;
  color: #ffffffb3 !important;
  font-size: 14px !important;
  font-weight: 400;
  line-height: 162.5% !important;
  text-align: center;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.home-rating-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  column-gap: 12px;
  row-gap: 10px;
  margin-top: 20px;
}

.home-rating {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  line-height: 100%;
}

.home-rating.rt {
  gap: 4px;
  color: #ffffffcc;
  font-size: 14px;
  font-weight: 500;
  line-height: 142.857%;
}

.imdb-mark,
.rt-mark {
  display: block;
  height: 16px;
  background-position: 50%;
  background-repeat: no-repeat;
  background-size: contain;
}

.imdb-mark {
  width: 32px;
  background-image: url("./assets/paper/imdb.png");
}

.rt-wrap {
  display: flex;
  background: #e54728;
  border-radius: 2px;
  padding: 0 2px;
}

.rt-mark {
  width: 16px;
  background-image: url("./assets/paper/rt-tomato.svg");
}

.rt-popcorn-mark {
  display: block;
  width: 16px;
  height: 16px;
  background-image: url("./assets/paper/rt-popcorn.svg");
  background-position: 50%;
  background-repeat: no-repeat;
  background-size: contain;
}

.home-hero-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 21px;
}

.home-screen .home-watched {
  display: inline-flex;
  height: 34px;
  min-height: 34px;
  align-items: center;
  border-radius: 6px;
  background: var(--color-text-primary);
  padding: 4px 22px;
  color: var(--color-archive-black);
  font-family: Inter, system-ui, sans-serif;
  font-size: var(--text-meta);
  font-weight: 600;
  line-height: 20px;
}

.home-watched-check {
  display: grid;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  place-items: center;
  margin-right: 7px;
  border-radius: var(--radius-pill);
  border: 1px solid #2a2a2b;
  background: #202124;
  backdrop-filter: blur(12px);
}

.home-watched-check .hugeicon {
  width: 10px;
  height: 10px;
  color: #f8f8f8;
}

.home-watched-check {
  color: #f8f8f8;
}

.home-screen .home-watched.is-watched {
  background: rgba(244, 243, 239, 0.16);
  color: var(--color-text-primary);
}

.home-glass-actions {
  display: flex;
  height: 34px;
  flex-shrink: 0;
  align-items: stretch;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid #ffffff1a;
  background: #ffffff1a;
  box-shadow: 0 10px 15px -3px #0000000d, 0 4px 6px -4px #0000000d;
  backdrop-filter: blur(20px) saturate(150%);
}

.home-glass-actions .home-square-action {
  display: grid;
  height: 100%;
  min-height: 34px;
  place-items: center;
  padding: 0 20px;
}

.home-glass-actions .home-square-action img,
.home-glass-actions .provider-brand-mark {
  width: 20px;
  height: 20px;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 0 0 1px #ffffff1a;
  filter: none;
}

.home-glass-divider {
  width: 1px;
  height: 24px;
  align-self: center;
  background: #ffffff40;
}

.home-square-action .hugeicon {
  width: 18px;
  height: 18px;
}

.hero-slider-dots {
  display: none;
}

.home-dock {
  display: flex;
  gap: 3px;
  margin-top: 24px;
  padding: 4px;
  border: 1px solid rgba(245, 245, 242, 0.18);
  border-radius: 16px;
  background: rgba(23, 23, 23, 0.9);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(22px) saturate(135%);
}

.home-dock button {
  display: flex;
  width: 54px;
  height: 44px;
  flex: 1;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--color-text-muted);
}

.home-dock button span {
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
}

.home-dock button strong {
  display: none;
}

.home-dock button.active {
  background: rgba(242, 241, 237, 0.14);
  color: var(--color-text-primary);
}

.home-week {
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding-top: 16px;
}

.home-week-heading {
  margin: 0 0 8px;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 150%;
}

.home-date-rail {
  display: flex;
  gap: var(--space-1);
  overflow: clip;
}

.home-screen .home-date {
  display: flex;
  width: 57px;
  min-width: 57px;
  height: 54px;
  min-height: 54px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  overflow: clip;
  border-radius: var(--radius-chip);
  border: 1px solid #22252b;
  background: var(--color-chip-idle);
  padding: 3px 11px 12px;
}

.home-date span {
  color: var(--color-text-muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 16px;
}

.home-date strong {
  color: var(--color-text-muted);
  font-family: Inter, system-ui, sans-serif;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 14px;
}

.home-screen .home-date.active {
  width: 58px;
  border-color: transparent;
  background: #fff;
}

.home-screen .home-date.active span {
  color: var(--color-weekday);
}

.home-screen .home-date.active strong {
  color: var(--color-hairline-soft);
}

.home-week-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  min-height: 310px;
  padding-bottom: 40px;
}

.home-poster-card {
  width: 175px;
  flex-shrink: 0;
}

.home-poster-card .poster {
  position: relative;
  isolation: isolate;
  overflow: clip;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-chip);
  border: 1px solid #22252b;
  background:
    var(--media-art) center / cover,
    #ffffff0d;
  box-shadow: 0 20px 25px -5px #00000066, 0 8px 10px -6px #00000066;
}

.home-poster-check {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 1;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: var(--radius-pill);
  background: #7d7e75;
  color: #000;
  backdrop-filter: blur(12px);
}

.home-poster-check .hugeicon {
  width: 10px;
  height: 10px;
}

.home-poster-check.is-saved {
  background: #7d7e75;
  color: #000;
}

.home-poster-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  padding-bottom: 4px;
}

.home-poster-meta h3 {
  flex: 1;
  overflow: hidden;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  line-height: 125%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-poster-meta p,
.home-poster-card > p {
  display: flex;
  gap: 8px;
  color: #ddd;
  font-size: 10px;
  line-height: 150%;
}

.home-poster-meta .episode-name {
  color: #ffffff99;
}

.home-poster-provider {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  overflow: clip;
  border-radius: 3px;
  background: #ffffff0d;
  box-shadow: 0 0 0 1px #ffffff1a;
}

.home-poster-provider img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-browse-rail {
  display: flex;
  gap: 16px;
  overflow: auto;
  min-height: 310px;
  padding: 16px 0 40px;
  scrollbar-width: none;
  mask-image: linear-gradient(to right, rgba(0, 0, 0, 0) 0%, rgb(0, 0, 0) 5%, rgb(0, 0, 0) 95%, rgba(0, 0, 0, 0) 100%);
}

.home-browse-rail::-webkit-scrollbar {
  display: none;
}

.home-desktop-after {
  display: none;
}

.home-empty {
  padding: var(--space-8) var(--space-4);
  color: var(--color-text-muted);
  font-size: var(--text-meta);
}

/* Browse tiles use the shared media-card surface; this only controls rail width. */
.home-browse-rail .browse-card {
  width: 140px;
  flex: 0 0 140px;
}

@media (hover: hover) and (pointer: fine) {
  .home-view-chip:hover,
  .home-type-switch button:hover,
  .home-date:hover {
    background-color: rgba(244, 243, 239, 0.12);
  }

  .home-view-chip.active:hover {
    background-color: var(--color-chip-active);
  }

  .home-type-switch button.active:hover {
    background-color: var(--color-signal-teal);
  }

  .home-date.active:hover {
    background-color: #fff;
  }
}

@media (min-width: 1181px) {
  .shell[data-view="home"] .floating-dock {
    top: 16px;
    right: 18px;
    bottom: auto;
    left: auto;
    z-index: 20;
    display: flex;
    border-radius: var(--radius-pill);
    padding: 5px;
  }

  .shell[data-view="home"] .floating-dock button {
    width: auto;
    min-width: 58px;
    min-height: 40px;
    height: 40px;
    padding: 4px 12px;
  }

  .shell[data-view="home"] .floating-dock button strong {
    display: block;
    font-size: 12px;
    font-weight: 550;
  }

  .home-screen {
    padding: 0;
    overflow: visible;
  }

  .home-dock {
    display: none;
  }

  .home-chrome {
    max-width: 1512px;
    margin: 0 auto;
    padding: 88px 40px 0;
  }

  .home-hero-art {
    height: min(72vh, 760px);
  }

  .home-hero-copy {
    align-items: flex-start;
    max-width: 620px;
    margin: -220px 0 0;
    padding: 0 40px 16px;
    text-align: left;
  }

  .home-hero-copy .title-treatment {
    justify-content: flex-start;
    max-width: min(440px, 36vw);
    height: auto;
    max-height: 150px;
  }

  .home-hero-copy .title-logo {
    height: 120px;
    object-position: left center;
  }

  .home-hero-copy .hero-summary {
    text-align: left;
  }

  .home-rating-row {
    justify-content: flex-start;
  }

  .hero-slider-dots {
    display: flex;
    position: absolute;
    right: 40px;
    bottom: 40px;
    z-index: 4;
    gap: 6px;
  }

  .hero-slider-dots button {
    width: 6px;
    height: 6px;
    border-radius: var(--radius-pill);
    background: rgba(244, 243, 239, 0.35);
  }

  .hero-slider-dots button.active {
    width: 18px;
    background: var(--color-text-primary);
  }

  .home-week {
    width: min(100%, var(--container-content));
    margin: 0 auto;
    padding: 12px 24px 80px;
  }

  .home-week-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .home-poster-card {
    width: auto;
  }

  .home-desktop-after {
    display: block;
    width: min(100%, var(--container-content));
    margin: 0 auto;
    padding: 36px 24px 96px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-hero-track {
    transition-duration: 0.01ms;
  }

  .home-screen button:active {
    transform: none;
  }
}
