.hash-locked {
  margin-top: 2rem;
  padding: 2rem;
  border-radius: 0.75rem;
  background: #0f172a;
  color: #e2e8f0;
  text-align: center;
}

.streams-list {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
}

.streams-loading {
  margin-top: 2rem;
  padding: 2rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background: #f8fafc;
  color: var(--text);
  text-align: center;
  display: grid;
  gap: 0.75rem;
  justify-items: center;
}

.streams-plan-summary {
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.streams-plan-summary-copy {
  display: grid;
  gap: 0.35rem;
}

.streams-plan-summary-copy h2 {
  margin: 0;
}

.streams-page-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.streams-page-heading h1 {
  margin-bottom: 0.25rem;
}

.streams-message.success {
  border-color: #b6f0c2;
  background: #f0fff4;
}

.stream-model-controls {
  margin: 0;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  background: #f8fafc;
}

.stream-length-controls {
  margin: 0;
  padding: 1rem 1.05rem;
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  background: linear-gradient(180deg, #fffaf1 0%, #f8fbff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
  display: grid;
  gap: 0.8rem;
}

.stream-length-controls-copy {
  display: grid;
  gap: 0.3rem;
}

.stream-length-controls-copy .eyebrow {
  margin: 0;
}

.stream-length-controls label {
  font-weight: 600;
  line-height: 1.35;
}

.stream-length-controls-copy .muted {
  margin: 0;
  font-size: 0.94rem;
}

.stream-length-slider-wrap {
  display: grid;
  gap: 0.7rem;
}

.stream-length-slider-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.stream-length-slider-caption {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9a5b0b;
}

.stream-length-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 5.75rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(216, 154, 67, 0.28);
  background: rgba(255, 255, 255, 0.82);
  color: #7a4c0c;
  font-size: 0.92rem;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(216, 154, 67, 0.12);
}

.stream-length-controls input[type="range"] {
  width: 100%;
  appearance: none;
  height: 2.75rem;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.stream-length-controls input[type="range"]::-webkit-slider-runnable-track {
  height: 0.8rem;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(216, 154, 67, 0.92) 0%, rgba(117, 140, 137, 0.92) 100%);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.4),
    0 8px 18px rgba(15, 23, 42, 0.08);
}

.stream-length-controls input[type="range"]::-moz-range-track {
  height: 0.8rem;
  border: 0;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(216, 154, 67, 0.92) 0%, rgba(117, 140, 137, 0.92) 100%);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.4),
    0 8px 18px rgba(15, 23, 42, 0.08);
}

.stream-length-controls input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 1.35rem;
  height: 1.35rem;
  margin-top: -0.275rem;
  border-radius: 50%;
  border: 2px solid #ffffff;
  background: #36504d;
  box-shadow:
    0 8px 18px rgba(54, 80, 77, 0.28),
    0 0 0 5px rgba(255, 255, 255, 0.36);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stream-length-controls input[type="range"]::-moz-range-thumb {
  width: 1.35rem;
  height: 1.35rem;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: #36504d;
  box-shadow:
    0 8px 18px rgba(54, 80, 77, 0.28),
    0 0 0 5px rgba(255, 255, 255, 0.36);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stream-length-controls input[type="range"]:hover::-webkit-slider-thumb,
.stream-length-controls input[type="range"]:focus-visible::-webkit-slider-thumb,
.stream-length-controls input[type="range"]:hover::-moz-range-thumb,
.stream-length-controls input[type="range"]:focus-visible::-moz-range-thumb {
  transform: scale(1.06);
  box-shadow:
    0 10px 24px rgba(54, 80, 77, 0.32),
    0 0 0 6px rgba(216, 154, 67, 0.18);
}

.stream-length-controls input[type="range"]:focus-visible {
  outline: none;
}

.stream-length-scale {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.stream-model-controls-header h4 {
  margin: 0.2rem 0 0.35rem;
}

.stream-model-controls-header h3 {
  margin: 0.2rem 0 0.35rem;
}

.stream-model-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.9rem;
}

.stream-model-guide-link-wrap {
  margin: 0.9rem 0 0;
}

.stream-model-guide-link {
  font-size: 0.95rem;
  font-weight: 600;
}

.stream-model-option {
  display: grid;
  gap: 0.5rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  background: #fff;
}

.stream-model-option-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.65rem;
  align-items: center;
}

.stream-model-option-label {
  font-weight: 600;
  word-break: break-word;
}

.stream-model-info-button {
  width: 1.8rem;
  height: 1.8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-weight: 700;
}

.stream-model-info {
  display: grid;
  gap: 0.25rem;
  padding: 0.75rem;
  border-radius: 0.75rem;
  background: #f8fafc;
  border: 1px solid var(--border);
}

.stream-model-info p {
  margin: 0;
}

.spinner {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 4px solid #dbe2ef;
  border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.stream-card {
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.5rem;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  display: grid;
  gap: 0.75rem;
}

.stream-card-body {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 0.875rem;
  align-items: start;
}

.stream-card-body-single {
  grid-template-columns: minmax(0, 1fr);
}

.stream-card-content {
  display: grid;
  gap: 0.5rem;
}

.stream-preview-slot {
  min-width: 0;
}

.stream-card-group .stream-preview-slot {
  position: relative;
}

.stream-card h3 {
  margin: 0;
  font-size: 1.1rem;
}

.stream-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.stream-preview {
  margin: 0;
  color: var(--text);
  position: relative;
}

.stream-preview img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background: #f8fafc;
}

.stream-preview-placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background:
    radial-gradient(circle at 22% 24%, rgba(255, 255, 255, 0.34), transparent 24%),
    radial-gradient(circle at 76% 32%, rgba(255, 255, 255, 0.18), transparent 20%),
    linear-gradient(135deg, rgba(235, 125, 52, 0.92), rgba(18, 91, 154, 0.9));
  position: relative;
  overflow: hidden;
}

.stream-preview-placeholder::before {
  content: "";
  position: absolute;
  inset: 12% 10% auto;
  height: 38%;
  border-radius: 0.7rem;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.stream-preview-placeholder::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 14%;
  height: 22%;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.16));
}

.stream-preview-badge {
  position: absolute;
  left: 0.6rem;
  right: 0.6rem;
  top: 0.6rem;
  z-index: 1;
  padding: 0.4rem 0.55rem;
  border-radius: 0.6rem;
  background: linear-gradient(135deg, rgba(235, 125, 52, 0.92), rgba(18, 91, 154, 0.92));
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 10px 24px rgba(18, 91, 154, 0.22);
  backdrop-filter: blur(6px);
}

.stream-preview figcaption {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.stream-group-preview-stack {
  position: relative;
  width: 100%;
  min-height: 8rem;
}

.stream-group-preview-layer {
  position: absolute;
  inset: calc(var(--stream-group-layer-index, 0) * 0.4rem) auto auto calc(var(--stream-group-layer-index, 0) * 0.4rem);
  width: calc(100% - (var(--stream-group-layer-index, 0) * 0.4rem));
  max-width: 100%;
}

.stream-group-preview-count {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.88);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
}

.stream-group-hero {
  margin-top: 1.5rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 1.2rem;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
}

.stream-group-gallery {
  margin-top: 0;
  padding: 1.25rem;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.94), rgba(248, 250, 252, 0.82) 38%, rgba(226, 232, 240, 0.62)),
    linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
  box-shadow: inset 0 -1px 0 rgba(148, 163, 184, 0.16);
}

.stream-group-gallery-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1rem;
}

.stream-group-gallery-date {
  display: grid;
  gap: 0.35rem;
  margin-left: auto;
}

.stream-group-gallery-grid {
  display: grid;
  grid-template-columns: repeat(var(--stream-group-grid-columns, 3), minmax(0, 1fr));
  gap: 1rem;
}

.stream-group-gallery-grid.is-two-by-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stream-group-thumb {
  display: grid;
  gap: 0.55rem;
  text-decoration: none;
  color: inherit;
}

.stream-group-thumb-media {
  border-radius: 0.9rem;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #f8fafc;
}

.stream-group-thumb-media img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.stream-group-thumb-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1 / 1;
  padding: 1rem;
  text-align: center;
  color: var(--muted);
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.45), transparent 25%),
    linear-gradient(135deg, rgba(54, 80, 77, 0.12), rgba(217, 119, 6, 0.12));
}

.stream-group-thumb-caption {
  font-size: 0.92rem;
  font-weight: 600;
  word-break: break-word;
}

.stream-group-page-caption {
  margin-top: 0;
  display: grid;
  gap: 0.55rem;
  padding: 1.25rem 1.4rem 1.35rem;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.92), rgba(241, 245, 249, 0.98)),
    radial-gradient(circle at top right, rgba(217, 119, 6, 0.12), transparent 42%);
}

.stream-group-page-caption h1 {
  margin: 0;
  max-width: 32ch;
  font-size: clamp(1.4rem, 2.8vw, 2.1rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.stream-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

@media (max-width: 720px) {
  .streams-page-heading {
    align-items: start;
  }

  .stream-group-hero {
    border-radius: 1rem;
  }

  .stream-group-page-caption {
    padding: 1rem 1rem 1.1rem;
  }

  .streams-plan-summary {
    flex-direction: column;
    align-items: flex-start;
  }

  .stream-length-slider-header {
    align-items: flex-start;
  }

  .stream-card-body {
    grid-template-columns: 1fr;
  }

  .stream-preview {
    width: 96px;
  }

  .stream-group-gallery-date {
    margin-left: 0;
    width: 100%;
  }

  .stream-group-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stream-group-gallery-grid.is-two-by-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.streams-pending {
  margin-bottom: 2rem;
}

.streams-auto-refresh-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  font-weight: 600;
  color: var(--text-muted, #475467);
  cursor: pointer;
  user-select: none;
}

.streams-auto-refresh-toggle input {
  width: 2.5rem;
  height: 1.4rem;
  margin: 0;
  border-radius: 999px;
  appearance: none;
  border: 1px solid rgba(15, 23, 42, 0.2);
  background: rgba(15, 23, 42, 0.18);
  position: relative;
  transition: background-color 120ms ease, border-color 120ms ease;
}

.streams-auto-refresh-toggle input::before {
  content: "";
  position: absolute;
  top: 1px;
  left: 1px;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.25);
  transition: transform 120ms ease;
}

.streams-auto-refresh-toggle input:checked {
  background: rgba(79, 70, 229, 0.92);
  border-color: rgba(79, 70, 229, 0.92);
}

.streams-auto-refresh-toggle input:checked::before {
  transform: translateX(1.1rem);
}

.streams-auto-refresh-toggle input:focus-visible {
  outline: 2px solid rgba(79, 70, 229, 0.35);
  outline-offset: 2px;
}

.streams-pending h2,
#streams-live-section h2,
#streams-archived-section h2 {
  margin-bottom: 0.5rem;
}

.streams-pending-heading {
  align-items: center;
}

.streams-pending-heading h2 {
  margin-bottom: 0;
}

.streams-pending-heading .streams-auto-refresh-toggle {
  margin-left: auto;
}

.streams-pending > .muted {
  margin-top: 0;
}

.streams-section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  flex-wrap: wrap;
}

.streams-section-heading p {
  margin: 0;
}

.streams-archived-toggle {
  white-space: nowrap;
}

.stream-status {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--accent);
  background: rgba(79, 70, 229, 0.08);
  border: 1px solid rgba(79, 70, 229, 0.2);
}

.button.danger {
  background: #b42318;
  border-color: #b42318;
  color: #fff;
}

.button.danger:hover {
  background: #97180f;
  border-color: #97180f;
}
