.workshop-stage {
  padding: clamp(1.5rem, 5vh, 3.5rem) 0;
}

.workshop-intro,
.workshop-card,
.summary-card {
  border: 1px solid rgba(55, 76, 68, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 12px 32px rgba(31, 45, 40, 0.17);
}

.workshop-intro {
  max-width: 52rem;
  margin: 0 auto 1.5rem;
  padding: clamp(1.2rem, 4vw, 2rem);
}

.workshop-intro h1 {
  margin: 0.15rem 0 0.45rem;
  font-size: clamp(1.9rem, 5vw, 3rem);
}

.workshop-kicker {
  margin: 0;
  color: #28654e;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.workshop-card {
  padding: clamp(1rem, 3vw, 1.5rem);
}

.workshop-card h2 {
  margin: 0 0 0.9rem;
  font-size: clamp(1.2rem, 3vw, 1.55rem);
}

.connect-panel,
.account-bar,
.playlist-heading,
.section-heading-row,
.spotify-attribution {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.connect-panel,
.setup-panel,
.workshop-status,
.spotify-attribution {
  max-width: 62rem;
  margin: 0 auto 1.25rem;
}

.setup-panel[hidden],
.workspace[hidden],
#playlist-workspace[hidden] {
  display: none;
}

.setup-form,
.search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: end;
}

.redirect-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.4rem 0.8rem;
  margin: 1rem 0;
  padding: 0.8rem;
  border-radius: 12px;
  background: #f3f7f5;
}

.redirect-box span {
  grid-column: 1 / -1;
  font-size: 0.85rem;
  font-weight: 700;
}

.redirect-box code {
  overflow-wrap: anywhere;
  color: #24513f;
}

.workshop-button {
  display: inline-flex;
  min-height: 2.7rem;
  padding: 0.58rem 1rem;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.workshop-button:hover:not(:disabled) {
  text-decoration: none;
  transform: translateY(-2px);
}

.workshop-button:focus-visible,
.workshop-text-button:focus-visible,
.form-control:focus-visible,
.form-control-file:focus-visible {
  outline: 3px solid rgba(0, 105, 217, 0.65);
  outline-offset: 2px;
}

.workshop-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.spotify-button {
  flex: 0 0 auto;
  border-color: #111;
  background: #111;
  color: #fff;
}

.spotify-button:hover:not(:disabled) {
  color: #fff;
}

.spotify-button img,
.account-copy img,
.spotify-attribution img {
  width: 2rem;
  height: 2rem;
}

.workshop-button-primary {
  background: #25674e;
  color: #fff;
}

.workshop-button-primary:hover:not(:disabled) {
  color: #fff;
  box-shadow: 0 8px 18px rgba(37, 103, 78, 0.24);
}

.workshop-button-secondary {
  border-color: #2e6852;
  background: #fff;
  color: #24513f;
}

.workshop-button-secondary:hover:not(:disabled) {
  color: #17382b;
}

.workshop-button-danger {
  border-color: #a64545;
  background: #fff;
  color: #8d2d2d;
}

.workshop-text-button {
  padding: 0.35rem 0.25rem;
  border: 0;
  border-bottom: 2px solid rgba(0, 105, 217, 0.25);
  background: transparent;
  color: #0069d9;
  font-weight: 700;
}

.workshop-text-button:hover:not(:disabled) {
  border-bottom-color: #0069d9;
}

.workshop-status {
  min-height: 1.5rem;
  padding: 0 0.75rem;
  color: #3e4c46;
  font-weight: 700;
  text-align: center;
}

.workshop-status:empty {
  display: none;
}

.workshop-status.is-error {
  color: #902f2f;
}

.workshop-status.is-success {
  color: #226340;
}

.account-bar {
  margin-bottom: 1.25rem;
}

.account-copy {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.account-copy span,
.account-copy strong {
  display: block;
}

.account-copy span {
  color: #68736e;
  font-size: 0.78rem;
}

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

.workshop-sidebar,
.workshop-main,
#playlist-workspace {
  display: grid;
  gap: 1.25rem;
}

.workshop-field {
  margin-bottom: 0.85rem;
}

.workshop-field label {
  margin-bottom: 0.3rem;
  font-size: 0.88rem;
  font-weight: 700;
}

.workshop-checkbox {
  margin: 0 0 1rem 0.2rem;
}

.privacy-note {
  color: #68736e;
  font-size: 0.82rem;
  line-height: 1.5;
}

.empty-state {
  padding: clamp(2rem, 7vw, 4rem);
  text-align: center;
}

.empty-state .tile-activity-icon {
  margin: 0 auto 1rem;
}

.empty-state h2 {
  margin-bottom: 0.5rem;
}

.playlist-heading h2 {
  margin: 0.15rem 0 0.3rem;
  font-size: clamp(1.45rem, 4vw, 2rem);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

.summary-card {
  padding: 1rem;
  text-align: center;
}

.summary-card strong,
.summary-card span {
  display: block;
}

.summary-card strong {
  color: #24513f;
  font-size: clamp(1.4rem, 4vw, 2rem);
}

.summary-card span {
  color: #68736e;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

.section-heading-row h2 {
  margin: 0.12rem 0 0.5rem;
}

.duplicate-list,
.track-list {
  margin: 1rem 0;
  padding: 0;
  list-style: none;
}

.duplicate-list:empty {
  display: none;
}

.duplicate-list li,
.track-list li,
.search-result {
  display: flex;
  padding: 0.72rem 0;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid #e4e9e6;
}

.duplicate-list li:last-child,
.track-list li:last-child,
.search-result:last-child {
  border-bottom: 0;
}

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

.item-copy strong,
.item-copy span {
  display: block;
}

.item-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-copy span {
  color: #68736e;
  font-size: 0.85rem;
}

.spotify-item-link {
  flex: 0 0 auto;
  color: #25674e;
  font-size: 0.83rem;
  font-weight: 700;
}

.workshop-two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.search-form .workshop-field {
  margin: 0;
}

.search-results {
  margin-top: 0.8rem;
}

.search-result .workshop-button {
  min-height: 2.25rem;
  padding: 0.4rem 0.75rem;
  font-size: 0.82rem;
}

.export-actions {
  display: flex;
  gap: 0.8rem;
}

.track-list {
  counter-reset: playlist-item;
}

.track-list li {
  counter-increment: playlist-item;
  justify-content: flex-start;
}

.track-list li::before {
  content: counter(playlist-item);
  width: 2rem;
  flex: 0 0 auto;
  color: #68736e;
  font-size: 0.8rem;
  text-align: right;
}

.track-list .item-copy {
  flex: 1 1 auto;
}

.spotify-attribution {
  margin-top: 1.25rem;
  justify-content: flex-start;
  color: #4d5853;
  font-size: 0.84rem;
}

@media (max-width: 991.98px) {
  .workshop-layout {
    grid-template-columns: 1fr;
  }

  .workshop-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .connect-panel,
  .playlist-heading,
  .section-heading-row {
    align-items: stretch;
    flex-direction: column;
  }

  .setup-form,
  .search-form,
  .workshop-sidebar,
  .workshop-two-column {
    grid-template-columns: 1fr;
  }

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

  .workshop-button {
    width: 100%;
  }

  .account-bar .workshop-text-button,
  .export-actions .workshop-text-button,
  .redirect-box .workshop-text-button {
    width: auto;
  }

  .redirect-box {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .workshop-button {
    transition: none;
  }
}
