.upload-shell {
  padding-bottom: 32px;
}

.upload-frame {
  width: min(1500px, calc(100vw - 48px));
  min-width: 1100px;
  margin: 0 auto;
  padding-top: 96px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.upload-hero,
.glass-panel {
  border: 1px solid var(--outline);
  background: var(--glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  border-radius: 24px;
}

.upload-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
  padding: 24px;
}

.upload-hero h1 {
  max-width: 960px;
  margin: 0;
  font-size: clamp(2.2rem, 3.6vw, 4.2rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.upload-lede {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.5;
}

.upload-hero-actions {
  justify-content: flex-end;
  min-width: 340px;
}

.upload-workspace {
  display: grid;
  grid-template-columns: minmax(520px, .95fr) minmax(560px, 1.05fr);
  gap: 18px;
  align-items: stretch;
}

.glass-panel {
  min-height: 720px;
  padding: 18px;
  overflow: hidden;
}

.upload-window,
.accepted-window {
  display: block;
}

.upload-window > summary,
.accepted-window > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  list-style: none;
  border-radius: 18px;
  padding: 14px 16px;
  background: var(--chip);
  font-weight: 900;
}

.upload-window > summary::-webkit-details-marker,
.accepted-window > summary::-webkit-details-marker {
  display: none;
}

.upload-window > summary small,
.accepted-window > summary small,
.status-chip {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border-radius: 999px;
  padding: 7px 10px;
  font-size: .78rem;
  font-weight: 900;
}

.drop-zone {
  min-height: 330px;
  margin-top: 16px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  text-align: center;
  border: 1.5px dashed color-mix(in srgb, var(--accent) 55%, var(--outline));
  border-radius: 24px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, transparent), transparent), var(--glass-strong);
  padding: 34px;
}

.drop-icon {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background: var(--green);
  color: #fff;
  font-size: 3rem;
  font-weight: 900;
  box-shadow: 0 14px 34px rgba(8, 122, 27, .26);
}

.drop-zone h2 {
  max-width: 540px;
  margin: 0;
  font-size: 2rem;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.drop-zone p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.centered-actions {
  justify-content: center;
}

.staged-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.staged-file,
.processing-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 20px;
  background: var(--chip);
  border: 1px solid color-mix(in srgb, var(--outline) 70%, transparent);
}

.staged-file.is-active {
  outline: 2px solid color-mix(in srgb, var(--accent) 44%, transparent);
}

.file-type,
.tiny-preview {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  font-weight: 900;
  font-size: .82rem;
}

.video,
.video-thumb { background: var(--accent); }
.book,
.pdf-thumb { background: var(--blue); }
.audio,
.audio-thumb { background: var(--green); }

.staged-file strong,
.processing-card strong { display: block; }
.staged-file small,
.processing-card span {
  display: block;
  color: var(--muted);
  font-size: .9rem;
  margin-top: 3px;
}

.staged-file button,
.swipe-button {
  border: 0;
  font: inherit;
  cursor: pointer;
  font-weight: 900;
}

.staged-file button {
  border-radius: 999px;
  padding: 10px 13px;
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.review-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.panel-heading h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 3.2rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.video-preview {
  position: relative;
  min-height: 330px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 26px;
  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,.34), transparent 28%),
    linear-gradient(145deg, color-mix(in srgb, var(--accent) 45%, #111), color-mix(in srgb, var(--blue) 26%, #090912));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14);
}

.play-orb {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: rgba(255,255,255,.22);
  backdrop-filter: blur(12px);
  font-size: 2.2rem;
  box-shadow: 0 20px 60px rgba(0,0,0,.22);
}

.video-lines {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 48px;
  display: grid;
  gap: 8px;
}

.video-lines span {
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.36);
}

.video-lines span:nth-child(2) { width: 72%; }
.video-lines span:nth-child(3) { width: 44%; }

.video-preview p {
  position: absolute;
  bottom: 14px;
  left: 18px;
  margin: 0;
  color: rgba(255,255,255,.86);
  font-weight: 800;
}

.swipe-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.swipe-button {
  min-height: 64px;
  border-radius: 20px;
  color: #fff;
  font-size: 1.05rem;
  box-shadow: 0 12px 28px rgba(0,0,0,.16);
}

.swipe-button.reject { background: #c22f55; }
.swipe-button.accept { background: var(--green); }

.accepted-window {
  padding: 0;
  background: transparent;
}

.accepted-window[open] > summary {
  margin-bottom: 12px;
}

.processing-card {
  margin-bottom: 10px;
}

.processing-card.is-processing {
  grid-template-columns: auto 1fr auto;
  background: var(--glass-strong);
}

.processing-copy { min-width: 0; }

.progress-track {
  height: 9px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 18%, transparent);
}

.progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--accent));
}

.processing-card b {
  color: var(--accent);
  font-size: .9rem;
}

.finished-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
  padding-top: 10px;
}

.finished-strip span {
  color: var(--muted);
  font-size: .88rem;
  font-weight: 900;
}

.finished-strip i {
  font-style: normal;
  padding: 7px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--green) 14%, transparent);
  color: var(--green);
  font-weight: 800;
  font-size: .82rem;
}

@media (max-width: 1150px) {
  .upload-frame { min-width: 1000px; }
}
