.watch-library,
.watch-detail {
  max-width: 1200px;
  margin: auto;
  padding: 48px 32px 80px;
}
.eyebrow {
  font: 11px var(--font-mono);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #75e4da;
}
.library-intro {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin: 0 0 24px;
}
.library-intro h1 {
  font: 800 clamp(32px, 3.6vw, 46px)/1.08 var(--font-display);
  letter-spacing: -0.065em;
  margin: 12px 0;
}
.library-intro h1 span {
  color: #75e4da;
}
.library-intro > div > p:last-child {
  color: #929aab;
  max-width: 540px;
  font-size: 14px;
}
.creator-card {
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid #28323b;
  border-radius: 16px;
  padding: 16px;
  min-width: 250px;
  background: #11171e;
}
.creator-card p {
  color: #929aab;
  font-size: 13px;
}
.avatar {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  background: #23413e;
  color: #9ff5dd;
  border-radius: 50%;
  font-weight: 700;
  flex-shrink: 0;
  object-fit: cover;
  object-position: 50% 30%;
}
.avatar.small {
  width: 42px;
  height: 42px;
  font-size: 13px;
}
.follow,
.byline a {
  color: #75e4da;
  font-size: 13px;
  display: block;
  margin-top: 6px;
}
.search {
  max-width: 720px;
  margin-bottom: 20px;
}
.search label {
  display: block;
  font-size: 12px;
  color: #a9b3c0;
  margin-bottom: 9px;
}
.search > div {
  display: flex;
  background: #11171e;
  border: 1px solid #2d3743;
  border-radius: 12px;
  overflow: hidden;
}
input,
textarea,
button {
  font: inherit;
  color: inherit;
}
input,
textarea {
  background: #10171f;
  border: 1px solid #303c4a;
  border-radius: 8px;
  padding: 12px;
  min-width: 0;
}
input:focus,
textarea:focus {
  outline: 2px solid #75e4da;
  outline-offset: 2px;
}
.search input {
  flex: 1;
  border: 0;
  background: none;
}
.search button {
  border: 0;
  border-left: 1px solid #2d3743;
  border-radius: 0;
  padding: 12px 20px;
  color: #75e4da;
  background: none;
}
.library-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 22px 0 16px;
}
.library-label h2 {
  font-size: 19px;
}
.library-label a {
  color: #9da8b8;
  font-size: 13px;
}
.video-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}
.video-card {
  min-width: 0;
}
.card-picture {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 9/13;
  background: #11171e;
  border: 1px solid #2b333e;
}
.card-picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s;
}
.video-card:hover img {
  transform: scale(1.025);
}
.play-mark {
  position: absolute;
  left: 14px;
  bottom: 14px;
  display: grid;
  place-items: center;
  background: #0b101acc;
  border: 1px solid #ffffff40;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 13px;
}
.duration {
  position: absolute;
  right: 12px;
  bottom: 17px;
  font: 11px var(--font-mono);
  background: #080c14cf;
  padding: 3px 7px;
  border-radius: 5px;
}
.video-card .eyebrow {
  margin: 18px 0 9px;
  font-size: 10px;
}
.video-card h2 {
  font: 700 19px/1.3 var(--font-display);
  letter-spacing: -0.03em;
}
.card-description {
  font-size: 13px;
  line-height: 1.6;
  color: #9aa4b4;
  margin-top: 9px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.watch-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  border-top: 1px solid #29303a;
  padding: 30px 40px;
  color: #9da7b6;
  font-size: 12px;
}
.watch-footer > a:first-child {
  color: #dbe5ef;
  font-weight: 700;
}
.watch-footer > a:last-child {
  color: #75e4da;
}
.watch-detail {
  max-width: 1120px;
  padding-top: 26px;
}
.viewer-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 26px;
}
.viewer-heading > a {
  color: #a8b4c3;
  font-size: 13px;
}
.viewer-layout {
  display: grid;
  grid-template-columns: minmax(260px, 380px) minmax(0, 1fr);
  gap: 64px;
  align-items: start;
}
.player-column {
  position: sticky;
  top: 92px;
}
.reel .player-column {
  width: min(100%, max(240px, calc((100dvh - 240px) * 0.5625)));
}
.player-frame {
  background: #030405;
  border: 1px solid #2b3440;
  border-radius: 17px;
  overflow: hidden;
  aspect-ratio: 9/16;
  max-height: calc(100dvh - 240px);
  min-height: 360px;
}
.player-frame video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.primary {
  background: #75e4da;
  color: #071713;
  border: 1px solid #75e4da;
  border-radius: 9px;
  padding: 11px 18px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.cta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  width: 100%;
  font-size: 14px;
}
.playback-footer {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #98a6b8;
  margin-top: 12px;
  gap: 10px;
}
.playback-footer a {
  color: #75e4da;
}
.video-info {
  padding-top: 12px;
  min-width: 0;
}
.video-info h1 {
  font: 800 clamp(28px, 3.1vw, 42px)/1.16 var(--font-display);
  letter-spacing: -0.05em;
  margin: 16px 0;
}
.description {
  color: #aab4c3;
  font-size: 15px;
  line-height: 1.8;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.byline {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 25px 0;
}
.byline strong {
  font-size: 13px;
}
.byline a {
  margin: 0;
  font-size: 12px;
}
.engagement {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 20px 0;
  border-top: 1px solid #27323f;
  border-bottom: 1px solid #27323f;
}
.engagement > * {
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #121b24;
  border: 1px solid #2c3948;
}
.engagement button[aria-pressed="true"] {
  color: #75e4da;
  border-color: #75e4da;
}
button {
  cursor: pointer;
  border: 1px solid #354052;
  background: #141e2b;
  border-radius: 7px;
  padding: 8px 12px;
  font-size: 12px;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 2px solid #75e4da;
  outline-offset: 4px;
}
#watch-notice {
  font-size: 13px;
  color: #75e4da;
  min-height: 24px;
  margin: 6px 0;
}
#transcript {
  border-top: 1px solid #293440;
  border-bottom: 1px solid #293440;
  margin: 12px 0 28px;
  padding: 16px 0;
}
summary {
  display: flex;
  justify-content: space-between;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
}
.transcript-search {
  display: flex;
  gap: 8px;
  margin: 18px 0;
}
.transcript-search input {
  flex: 1;
  font-size: 13px;
}
#transcript-lines {
  max-height: 320px;
  overflow: auto;
  padding-right: 8px;
}
#transcript-lines p {
  display: flex;
  gap: 16px;
  font-size: 13px;
  margin-bottom: 16px;
  line-height: 1.7;
}
#transcript-lines a,
.chapters a span {
  font: 11px var(--font-mono);
  color: #75e4da;
  flex-shrink: 0;
  padding-top: 5px;
}
#transcript-lines span {
  overflow-wrap: anywhere;
}
.chapters {
  margin-bottom: 20px;
}
.chapters h2,
#discussion h2 {
  font-size: 18px;
  margin-bottom: 16px;
}
.chapters a {
  display: flex;
  gap: 15px;
  font-size: 13px;
  margin: 8px 0;
}
#discussion-status {
  font-size: 13px;
  color: #a7b4c3;
}
#discussion-status a {
  color: #75e4da;
}
#comment-form label {
  display: block;
  font-size: 13px;
  margin: 14px 0 8px;
}
#comment-form textarea {
  display: block;
  width: 100%;
  resize: vertical;
  font-size: 13px;
}
#comment-form small {
  display: block;
  color: #92a0b4;
  font-size: 11px;
  line-height: 1.6;
  margin: 8px 0;
}
.composer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 24px;
}
.comment {
  border-top: 1px solid #26313e;
  padding: 18px 0;
}
.comment.reply {
  padding-left: 20px;
  border-left: 2px solid #2d4246;
}
.comment header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}
.comment time {
  color: #8c9bb0;
  font-size: 10px;
}
.comment p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 13px;
  margin: 8px 0;
  color: #c3cdd9;
}
.comment .reply-label {
  color: #7eafa6;
  font-size: 10px;
  margin: 0;
}
.comment-actions {
  display: flex;
  gap: 12px;
}
.comment-actions button {
  border: 0;
  background: none;
  padding: 3px 0;
  color: #90a2b7;
  font-size: 11px;
}
.standard .viewer-layout {
  grid-template-columns: 1fr;
}
.standard .player-column {
  position: static;
}
.standard .player-frame {
  aspect-ratio: 16/9;
  max-height: none;
  min-height: 0;
}
.standard .video-info {
  max-width: 800px;
}
.standard .cta {
  max-width: 500px;
}
.empty {
  padding: 70px 10px;
  min-height: 300px;
  grid-column: 1/-1;
}
.empty h2 {
  font-size: 24px;
  margin-bottom: 12px;
}
.empty a {
  color: #75e4da;
}
.more {
  display: block;
  width: fit-content;
  margin: 40px auto 0;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
[hidden] {
  display: none !important;
}
@media (max-width: 950px) {
  .video-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .creator-card {
    padding: 14px 20px;
  }
  .viewer-layout {
    gap: 32px;
  }
  .watch-library,
  .watch-detail {
    padding-left: 22px;
    padding-right: 22px;
  }
}
@media (max-width: 680px) {
  .reel .player-column {
    width: 100%;
  }
  .watch-library {
    padding-top: 22px;
  }
  .library-intro {
    margin-top: 0;
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }
  .library-intro h1 {
    font-size: 34px;
  }
  .video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px 14px;
  }
  .video-card h2 {
    font-size: 16px;
  }
  .video-card .eyebrow {
    font-size: 9px;
  }
  .search button {
    padding: 10px;
  }
  .viewer-layout {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .player-column {
    position: static;
    max-width: 430px;
    width: 100%;
    margin: auto;
  }
  .player-frame {
    height: calc(100dvh - 215px);
    max-height: 700px;
    min-height: 350px;
    aspect-ratio: auto;
  }
  .watch-detail {
    padding: 18px 16px 48px;
  }
  .viewer-heading {
    margin-bottom: 16px;
  }
  .viewer-heading .eyebrow {
    font-size: 9px;
  }
  .video-info h1 {
    font-size: 32px;
  }
  .standard .player-frame {
    height: auto;
    aspect-ratio: 16/9;
    min-height: 0;
  }
  .standard .player-column {
    max-width: none;
  }
  .watch-footer {
    padding: 24px;
  }
  .watch-footer span {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* Keep the readable server-rendered page until the reels controls are ready. */
body:has(.reel-enhanced) {
  overflow: hidden;
}
body:has(.reel-enhanced) > .nav,
body:has(.reel-enhanced) > .watch-footer {
  display: none;
}
.reel-enhanced {
  --reel-width: min(390px, calc((100dvh - 305px) * 0.5625));
  max-width: none;
  height: 100dvh;
  padding: 20px 32px 12px;
  display: flex;
  flex-direction: column;
  background: radial-gradient(
    ellipse at center,
    #142028,
    #080c11 48%,
    #06080c 80%
  );
}
.reel-enhanced .viewer-heading {
  margin: 0;
  height: 32px;
  flex-shrink: 0;
}
.reel-enhanced .viewer-layout {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1;
  min-height: 0;
  gap: 0;
}
.reel-enhanced .player-column {
  position: static;
  width: var(--reel-width);
  max-width: none;
  margin: 0;
}
.reel-enhanced .player-frame {
  aspect-ratio: 9/16;
  height: auto;
  min-height: 0;
  max-height: none;
  border-radius: 14px;
}
.reel-enhanced .byline {
  margin: 0 0 10px;
  gap: 9px;
}
.reel-enhanced .avatar {
  width: 30px;
  height: 30px;
  font-size: 10px;
}
.reel-enhanced .byline strong {
  font-size: 12px;
}
.reel-enhanced .byline a {
  font-size: 11px;
}
.reel-caption h1 {
  font: 700 16px/1.35 var(--font-display);
  letter-spacing: -0.025em;
  margin: 10px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.reel-enhanced .cta {
  margin-top: 0;
  padding: 11px 12px;
  font-size: 12px;
}
.reel-enhanced .playback-footer {
  justify-content: center;
  font-size: 10px;
  margin-top: 8px;
}
.reel-details-button {
  width: 100%;
  margin-top: 7px;
  background: transparent;
  color: #b9c7d4;
  border: 0;
  font-size: 11px;
  padding: 5px;
}
.reel-rail {
  position: absolute;
  left: calc(50% + var(--reel-width) / 2 + 20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.reel-rail .engagement {
  flex-direction: column;
  border: 0;
  padding: 0;
  gap: 12px;
}
.reel-rail .engagement > *,
.reel-rail > a {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 64px;
  min-height: 50px;
  padding: 7px;
  border-radius: 14px;
  background: #14202bd9;
  border: 1px solid #2e3c47;
  font-size: 11px;
}
.reel-rail > a {
  min-height: 40px;
  font-size: 22px;
}
.reel-hint {
  text-align: center;
  color: #8997a8;
  font-size: 11px;
  margin: 10px 0 0;
  line-height: 1.5;
}
.reel-enhanced > #watch-notice {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  background: #15242c;
  border-radius: 10px;
  padding: 10px 18px;
  max-width: 90vw;
  text-align: center;
}
.reel-enhanced > #watch-notice:empty {
  display: none;
}
.reel-panel {
  position: fixed;
  inset: 18px 18px 18px auto;
  margin: 0;
  width: min(440px, calc(100vw - 36px));
  max-width: none;
  height: calc(100dvh - 36px);
  max-height: none;
  background: #10171f;
  color: #edf3fa;
  border: 1px solid #34414d;
  border-radius: 18px;
  padding: 24px;
  overflow: auto;
}
.reel-panel::backdrop {
  background: #0008;
}
.reel-panel > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}
.reel-panel > header h2 {
  font-size: 18px;
}
.reel-panel > header button {
  font-size: 24px;
  line-height: 1;
}
.reel-panel .video-info {
  padding: 0;
}
.reel-panel:not(.show-comments) #discussion,
.reel-panel.show-comments .video-info > :not(#discussion) {
  display: none;
}
.reel-panel #transcript-lines {
  max-height: none;
}
@media (max-width: 680px) {
  .reel-enhanced {
    --reel-width: min(calc(100vw - 82px), calc((100dvh - 290px) * 0.5625));
    padding: 12px 14px 8px;
  }
  .reel-enhanced .player-column {
    transform: translateX(-24px);
  }
  .reel-rail {
    left: calc(50% + var(--reel-width) / 2 - 14px);
    gap: 9px;
  }
  .reel-rail .engagement {
    gap: 9px;
  }
  .reel-rail .engagement > *,
  .reel-rail > a {
    width: 48px;
    min-height: 44px;
    font-size: 10px;
    border-radius: 12px;
  }
  .reel-rail > a {
    font-size: 20px;
    min-height: 34px;
  }
  .reel-caption h1 {
    font-size: 14px;
  }
  .reel-panel {
    inset: auto 0 0;
    width: 100%;
    height: 82dvh;
    border-radius: 18px 18px 0 0;
    padding: 22px;
  }
  .reel-hint {
    font-size: 9px;
  }
}
.reel-rail .engagement > a {
  flex-direction: column;
  gap: 2px;
}
.reel-enhanced .player-frame {
  position: relative;
}
.reel-tap-target {
  position: absolute;
  inset: 0 0 64px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  touch-action: none;
  display: grid;
  place-items: center;
}
.reel-tap-target span {
  opacity: 0;
  border-radius: 50%;
  background: #091017b8;
  color: white;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  font-size: 26px;
  padding-left: 4px;
}
.reel-tap-target.is-paused span {
  opacity: 1;
}
.reel-tap-target:focus-visible {
  outline-offset: -4px;
}
.reel-like-heart {
  position: absolute;
  top: 45%;
  left: 50%;
  translate: -50% -50%;
  pointer-events: none;
  opacity: 0;
  color: white;
  font-size: 88px;
  line-height: 1;
  text-shadow: 0 4px 24px #0006;
}
.watch-share {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(480px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  border: 1px solid #34414d;
  border-radius: 20px;
  padding: 26px;
  background: #101820;
  color: #edf3fa;
}
.watch-share::backdrop {
  background: #0009;
}
.watch-share header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.watch-share h2 {
  font-size: 21px;
}
.watch-share header button {
  font-size: 24px;
  line-height: 1;
}
.watch-share > p {
  color: #aebccc;
  font-size: 14px;
  line-height: 1.6;
  margin: 16px 0;
}
.watch-share-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 24px 0;
}
.watch-share-options a {
  padding: 18px 5px;
  text-align: center;
  font-size: 12px;
  border: 1px solid #30414f;
  border-radius: 12px;
  background: #18242f;
}
.watch-share-options a:hover {
  border-color: #75e4da;
}
.watch-share-copy {
  display: flex;
  gap: 8px;
}
.watch-share-copy input {
  width: 0;
  flex: 1;
  font-size: 12px;
}
.watch-share-copy button {
  flex-shrink: 0;
}
.watch-share .watch-share-status {
  min-height: 20px;
  font-size: 12px;
  color: #75e4da;
  margin: 12px 0 0;
}
.watch-native-share {
  margin-top: 12px;
  width: 100%;
}
@media (max-width: 680px) {
  .watch-share {
    inset: auto 0 0;
    width: 100%;
    max-width: none;
    max-height: 90dvh;
    border-radius: 20px 20px 0 0;
    padding: 24px 18px;
  }
}

.watch-library {
  padding-top: 24px;
}
.library-intro .eyebrow {
  margin-top: 0;
}
