/* Play page — keep in sync with the pink site chrome */

.page-play main.watch-main {
  padding-top: 1.25rem;
  padding-bottom: 2.5rem;
  overflow: visible;
}

.watch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  gap: 1.25rem;
  align-items: start;
}

.watch-player {
  min-width: 0;
}

.play-box {
  position: relative;
  width: 100%;
  margin: 0;
  padding-bottom: 56.25%;
  background: #1a0d1a;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(236, 72, 153, 0.25);
  box-shadow: 0 10px 28px rgba(236, 72, 153, 0.12);
}

.play-box #mse {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.play-info {
  margin-top: 1rem;
}

.play-info .name {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.4;
  color: #1f2937;
  overflow-wrap: anywhere;
}

.watch-subtitle {
  margin-top: 0.35rem;
  font-size: 0.92rem;
  color: #6b7280;
}

.watch-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin-top: 0.9rem;
  font-size: 0.9rem;
}

.watch-controls .button,
.episode-link,
.line-tab,
.category-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.85rem;
  border: 1px solid rgba(236, 72, 153, 0.28);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  color: #be185d;
  text-decoration: none;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.watch-controls .button:hover,
.episode-link:hover,
.line-tab:hover,
.category-pill:hover {
  background: #ec4899;
  border-color: #ec4899;
  color: #fff;
}

.auto-next-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #6b7280;
  font-weight: 500;
}

.watch-controls .button[hidden],
#retry-playback[hidden],
#playback-status[hidden] {
  display: none !important;
}

#playback-status {
  margin-top: 0.75rem;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 0.9rem;
  border: 1px solid #fed7aa;
}

.episode-panel {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(236, 72, 153, 0.2);
  border-radius: 14px;
  padding: 1rem;
  min-width: 0;
  box-shadow: 0 8px 24px rgba(236, 72, 153, 0.08);
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.panel-heading h2 {
  margin: 0;
  font-size: 1rem;
  color: #1f2937;
}

.panel-heading span {
  font-size: 0.78rem;
  color: #9ca3af;
  white-space: nowrap;
}

.line-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding-bottom: 0.85rem;
  margin-bottom: 0.85rem;
  border-bottom: 1px solid rgba(236, 72, 153, 0.12);
}

.line-tab[aria-current="true"],
.episode-link[aria-current="true"] {
  background: #ec4899;
  border-color: #ec4899;
  color: #fff;
}

.line-tab[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
}

.episode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  max-height: 420px;
  overflow: auto;
}

.episode-link {
  font-size: 0.85rem;
  min-height: 2.25rem;
  font-weight: 500;
  color: #374151;
}

.watch-categories {
  margin-top: 1.75rem;
}

.watch-categories .section-header {
  margin-bottom: 0.85rem;
}

.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.category-pill {
  font-size: 0.88rem;
  color: #be185d;
}

@media (max-width: 1023px) {
  .watch-layout {
    grid-template-columns: minmax(0, 1fr) 240px;
  }
}

@media (max-width: 768px) {
  .page-play main.watch-main {
    padding-top: 1rem;
    padding-bottom: 2rem;
  }

  .watch-layout {
    grid-template-columns: 1fr;
  }

  .play-info .name {
    font-size: 1.15rem;
  }

  .episode-panel {
    order: 2;
  }

  .episode-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-height: 240px;
  }
}
