.play-box {
  position: relative;
  width: 100%;
  margin: auto;
  padding-bottom: 56.25%;
  background: #111;
  border-radius: 10px;
  overflow: hidden;
}

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

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

.watch-main {
  padding-top: 1rem;
  padding-bottom: 2rem;
}

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

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

.watch-controls .button,
.episode-link,
.line-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.75rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  color: #333;
  text-decoration: none;
  cursor: pointer;
}

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

#playback-status {
  margin-top: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  background: #fff7e6;
  color: #8a5a00;
  font-size: 0.9rem;
}

.watch-subtitle {
  margin-top: 0.35rem;
  font-size: 0.95rem;
  color: #888;
}

.episode-panel {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  padding: 1rem;
  min-width: 0;
}

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

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

.panel-heading span {
  font-size: 0.8rem;
  color: #999;
}

.line-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding-bottom: 0.85rem;
  margin-bottom: 0.85rem;
  border-bottom: 1px solid #eee;
}

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

.line-tab[aria-disabled="true"] {
  opacity: 0.55;
  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.2rem;
}

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

@media (max-width: 768px) {
  .play-info {
    margin-top: 1rem;
    font-size: 1.1rem;
  }

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

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