.service-state {
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:30px;
  background:var(--surface-2);
}
.service-state-content {
  max-width:470px;
  padding:32px;
  border:1px solid var(--line);
  border-radius:18px;
  background:var(--surface);
}
.service-state h1 {
  font-size:22px;
  margin:16px 0;
}
.service-state p {
  line-height:1.8;
  color:var(--muted);
  margin-bottom:22px;
}
.service-error-banner {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:12px 32px;
  background:var(--warn-soft);
  border-bottom:1px solid var(--warn-line);
  color:var(--warn-text);
  font-size:12px;
}
.remote-backdrop {
  padding:18px;
}
.remote-modal {
  width:min(1328px,100%);
  max-width:1328px;
  max-height:calc(100vh - 36px);
  overflow:auto;
}
.remote-modal .modal-header {
  padding:17px 22px;
}
.remote-toolbar {
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 20px;
  border-bottom:1px solid var(--line);
}
.remote-toolbar select {
  width:200px;
  min-width:100px;
}
.remote-toolbar form {
  display:flex;
  flex:1;
  gap:8px;
}
.remote-toolbar form input {
  min-width:90px;
  flex:1;
}
.remote-screen-container {
  background:var(--surface-3);
  min-height:200px;
  line-height:0;
  margin:0 20px;
}
.remote-screen {
  display:block;
  width:100%;
  height:auto;
  aspect-ratio:8/5;
  object-fit:fill;
  cursor:default;
  outline-offset:2px;
}
.remote-screen[hidden] {
  display:none;
}
.remote-screen:focus-visible {
  outline:2px solid var(--accent);
}
.remote-input-tools {
  padding:12px 20px;
}
.remote-input-tools form {
  display:flex;
  gap:8px;
}
.remote-input-tools input {
  flex:1;
  min-width:100px;
}
.remote-input-tools>span,.remote-note {
  display:block;
  color:var(--muted);
  font-size:11px;
  line-height:1.65;
  margin:7px 0 0;
}
.remote-footer {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:10px 20px;
}
.remote-footer #remote-status {
  font-size:12px;
  color:var(--accent-text);
  line-height:1.65;
}
.remote-footer #remote-status.is-error {
  color:var(--warn-text);
}
.remote-note {
  padding:0 20px 15px;
}
.real-media-preview {
  background:var(--stage);
}
.real-media-preview video,.real-media-preview img {
  width:100%;
  height:100%;
  max-height:480px;
  object-fit:contain;
}
.real-pending {
  padding:45px 24px;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--surface);
}
.real-pending h3 {
  margin:14px 0 10px;
}
.real-pending p {
  color:var(--muted);
  line-height:1.8;
  margin-bottom:22px;
}
.scan-progress.is-error {
  background:var(--warn-soft);
  color:var(--warn-text);
}
.scan-progress small {
  white-space:normal;
}
.real-source-link {
  color:var(--accent-text);
  overflow-wrap:anywhere;
}
.btn[aria-disabled=true] {
  opacity:.5;
  pointer-events:none;
}
@media(max-width:700px) {
  .remote-backdrop {
    padding:4px;
  }
  .remote-modal {
    max-height:calc(100vh - 8px);
  }
  .remote-toolbar {
    flex-wrap:wrap;
    padding:10px;
  }
  .remote-toolbar select {
    width:100%;
  }
  .remote-screen-container {
    margin:0 10px;
  }
  .remote-input-tools,.remote-footer {
    padding:10px;
  }
  .remote-footer {
    align-items:flex-start;
    flex-direction:column;
  }
  .remote-note {
    padding:0 10px 10px;
  }
  .service-error-banner {
    padding:12px 18px;
  }
}
.remote-screen-container {
  display:flex;
  align-items:center;
  justify-content:center;
}
.remote-screen {
  width:auto;
  max-width:100%;
  max-height:calc(100vh - 320px);
  object-fit:contain;
}
.remote-footer {
  position:sticky;
  bottom:0;
  background:var(--surface);
  border-top:1px solid var(--line);
  z-index:1;
}
.content-classification {
  margin:0 0 24px;
  padding:16px;
  background:var(--surface-2);
  border:1px solid var(--line);
  border-radius:12px;
}
.content-classification ul {
  margin:10px 0 16px;
  padding-left:18px;
  color:var(--muted);
  font-size:12px;
  line-height:1.7;
}
.content-classification label {
  display:block;
  margin-bottom:8px;
  font-size:12px;
}
.content-classification select { flex:1; min-width:0; }
.content-badge { color:var(--accent-text); background:var(--surface-3); }
@media(max-width:700px) {
  .remote-screen {
    max-height:calc(100vh - 360px);
  }
}

.episode-catalog{border:1px solid var(--line-strong);border-radius:12px;margin:0 0 18px;background:var(--surface)}.episode-catalog summary{cursor:pointer;padding:14px 18px;font-size:13px;font-weight:600}.episode-catalog-body{padding:0 18px 18px}.episode-catalog-body p,.episode-catalog-body>small{font-size:12px;color:var(--muted);line-height:1.7}.episode-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:8px;max-height:260px;overflow:auto;margin:14px 0}.episode-entry{display:flex;align-items:center;gap:10px;padding:10px;background:var(--surface-2);border-radius:8px;cursor:pointer}.episode-entry span{min-width:0}.episode-entry strong,.episode-entry small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.episode-entry strong{font-size:12px}.episode-entry small{font-size:11px;color:var(--muted);margin-top:4px}.episode-actions{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}
