.playlist-panel {
  border-top: 1px solid #e6ece7;
}

.external-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 12px;
  background: #101b29;
}

.url-import {
  display: grid;
  gap: 9px;
  margin: 16px 0;
  padding: 15px;
  border: 1px solid #dce9df;
  border-radius: 14px;
  background: #f8fbf8;
  font-size: 13px;
}
.url-import input { width: 100%; min-width: 0; padding: 10px; border: 1px solid #d2dfd5; border-radius: 8px; font: inherit; }
.url-import button { justify-self: start; padding: 9px 14px; border: 0; border-radius: 9px; color: white; background: #286d4a; cursor: pointer; }
.url-import small { color: #6c8273; line-height: 1.6; }
.transcript-panel { margin-top: 18px; border-top: 1px solid #e8eee9; padding-top: 18px; }
.transcript-panel summary { color: #286d4a; font-size: 14px; font-weight: 700; cursor: pointer; }
.transcript-text { margin-top: 14px; max-height: 440px; overflow: auto; line-height: 1.75; font: 15px Georgia, "Times New Roman", serif; }
.transcript-text p { margin: 0 0 14px; }

.playlist-toggle {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 17px 2px 13px;
  color: #17304a;
  font-size: 15px;
  font-weight: 700;
}

.playlist {
  display: grid;
  gap: 8px;
  max-height: min(50vh, 520px);
  overflow-y: auto;
  padding: 0 2px 2px;
}

.playlist-row {
  display: flex;
  align-items: stretch;
  border: 1px solid #e0e9e1;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.playlist-row.selected {
  border-color: #77b88c;
  background: #edf7ef;
}

.playlist-select {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  flex: 1;
  text-align: left;
  padding: 12px 9px;
  border: 0;
  background: transparent;
  color: #17304a;
  cursor: pointer;
  text-decoration: none;
}

.playlist-select:hover, .playlist-select:focus-visible {
  background: #f1f8f2;
}

.playlist-number {
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  color: #6f997a;
  font-weight: 700;
}

.playlist-info { min-width: 0; flex: 1; }
.playlist-info strong, .playlist-info small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.playlist-info strong { font-size: 14px; }
.playlist-info small { margin-top: 5px; color: #6c8273; font-size: 12px; }
.playlist-arrow { color: #2b704d; white-space: nowrap; font-size: 13px; }

.remove-item {
  border: 0;
  border-left: 1px solid #dceade;
  background: transparent;
  color: #607c67;
  padding: 0 14px;
  cursor: pointer;
}
.remove-item:hover, .remove-item:focus-visible { background: #f9eae7; color: #a03f38; }
.empty-playlist {
  margin: 0;
  padding: 22px;
  text-align: center;
  color: #778c7d;
  background: #f7faf7;
  border-radius: 14px;
  font-size: 13px;
}

.transport { display: flex; align-items: center; gap: 7px; }
.transport-button {
  border: 1px solid #d5e3d9;
  border-radius: 10px;
  background: #fff;
  color: #286d4a;
  min-width: 44px;
  min-height: 44px;
  font-size: 19px;
  cursor: pointer;
}
.transport-button:hover:not(:disabled) { background: #edf7ef; }

.cue-translation summary {
  display: flex;
  align-items: baseline;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}
.cue-translation summary::-webkit-details-marker { display: none; }
.cue-translation summary::after {
  content: "中文释义 ＋";
  flex: none;
  margin-left: auto;
  color: #347854;
  font: 12px -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
  white-space: nowrap;
}
.cue-translation[open] summary::after { content: "收起 －"; }
.cue-translation summary:focus-visible { outline: 2px solid #347854; outline-offset: 3px; }
.cue-translation-text {
  margin-top: 10px;
  color: #526459;
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-line;
}

@media (max-width: 600px) {
  .cue-translation summary { display: block; }
  .cue-translation summary::after { display: block; margin-top: 4px; }
}

@media (max-width: 600px) {
  .playlist-select { gap: 9px; padding: 13px 10px; }
  .playlist-info strong { font-size: 14px; }
  .remove-item { padding: 0 10px; }
  .controls { flex-wrap: wrap; }
  .transport { width: 100%; }
  .primary-button { flex: 1; }
  .speed-control { margin-left: auto; }
}
