.workspace-cycle-actions {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.workspace-upload-template-link {
  color: #9b8df0;
  font-size: .67rem;
  font-weight: 850;
  line-height: 1.25;
  text-decoration: underline;
  text-decoration-color: rgba(155, 141, 240, .46);
  text-underline-offset: 4px;
}

.workspace-upload-template-link:hover,
.workspace-upload-template-link:focus-visible {
  color: #dfff62;
  text-decoration-color: currentColor;
}

html[data-upload-template="active"] {
  --upload-template-ink: #17131f;
  --upload-template-muted: #706a78;
  --upload-template-line: #ded9e7;
  --upload-template-paper: #fffefa;
  --upload-template-panel: #f8f6fc;
  --upload-template-purple: #7350e6;
  --upload-template-purple-dark: #5d3bc9;
  --upload-template-pink: #dc63c9;
  --upload-template-lime: #dfff62;
  --upload-template-blue: #49a7e8;
  --upload-template-mint: #83dbc8;
  --upload-template-shadow: 0 18px 48px rgba(45, 30, 77, .12);
  --upload-template-soft-shadow: 0 12px 34px rgba(39, 24, 65, .07);
  /* One wider desktop canvas for all five stages, their stepper and sticky actions.
     Keep existing gutters, typography and the <=900px layout unchanged. */
  --upload-template-stage-width: min(1840px, calc(100% - 42px));
  color: var(--upload-template-ink);
}

html[data-upload-template="active"] *,
html[data-upload-template="active"] *::before,
html[data-upload-template="active"] *::after {
  box-sizing: border-box;
}

html[data-upload-template="active"] .workspace-upload-stage {
  overflow: visible;
  padding: 0 0 56px;
  background:
    linear-gradient(145deg, #f7f2ff 0, var(--upload-template-paper) 36%, #f1ffff 100%);
}

html[data-upload-template="active"] .workspace-upload-stage > .preview-section-inner,
html[data-upload-template="active"] .workspace-upload-stage .preview-section-inner {
  width: var(--upload-template-stage-width);
  max-width: none;
  margin-inline: auto;
  padding-inline: 0;
}

html[data-upload-template="active"] [data-upload-workspace] {
  width: 100%;
  max-width: none;
  margin: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

html[data-upload-template="active"] .workspace-upload-hero {
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

html[data-upload-template="active"] .workspace-upload-hero::before,
html[data-upload-template="active"] .workspace-upload-hero::after {
  display: none;
  content: none;
}

html[data-upload-template="active"] .workspace-upload-hero-copy,
html[data-upload-template="active"] .workspace-upload-hero > .workspace-upload-flow,
html[data-upload-template="active"] .workspace-upload-flow-dock {
  display: none !important;
}

html[data-upload-template="active"] .upload-template-banner {
  position: sticky;
  top: var(--upload-template-guide-top, calc(var(--eb-privacy-top-offset, 0px) + var(--header-height, 72px)));
  z-index: 60;
  scroll-margin-top: var(--upload-template-guide-top, 78px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  width: 100%;
  margin: 0 0 24px;
  padding: 13px max(21px, calc((100% - 1840px) / 2));
  box-sizing: border-box;
  border: 0;
  border-top: 3px solid #835ef0;
  border-bottom: 1px solid #d8c9ff;
  border-radius: 0;
  background:
    radial-gradient(circle at 92% 10%, rgba(112, 204, 226, .19), transparent 15rem),
    linear-gradient(102deg, #f1eaff 0%, #f8f5ff 58%, #f2fcff 100%);
  color: var(--upload-template-muted);
  box-shadow: 0 10px 28px rgba(69, 45, 126, .08);
  transition: width .2s ease, margin .2s ease, padding .2s ease, border-radius .2s ease, box-shadow .2s ease;
}

html[data-upload-template="active"] .upload-template-banner-copy {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

html[data-upload-template="active"] .upload-template-banner-mark {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  margin: 0;
  border: 1px solid rgba(101, 73, 210, .28);
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #6d4cde, #8a6af3);
  box-shadow: 0 6px 16px rgba(86, 54, 172, .2);
  font-size: .78rem;
  font-style: normal;
  font-weight: 900;
}

html[data-upload-template="active"] .upload-template-banner-copy-text {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  min-width: 0;
  margin: 0;
}

html[data-upload-template="active"] .upload-template-banner strong {
  display: block;
  color: var(--upload-template-purple-dark);
  font-size: 1rem;
  font-weight: 900;
}

html[data-upload-template="active"] .upload-template-banner-copy-text > span,
html[data-upload-template="active"] .upload-template-banner p {
  margin: 2px 0 0;
  color: var(--upload-template-muted);
  font-size: 1rem;
}

html[data-upload-template="active"] .upload-template-banner-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 9px;
}

html[data-upload-template="active"] .upload-template-banner [data-upload-template-limits-host] {
  flex: 0 0 auto;
}

/* Task 701: hero -> guide -> view tabs, with the former guide-to-stepper gap
   retained below the tabs. The guide's visual treatment and docking are unchanged. */
html[data-upload-template="active"] .workspace-page > .upload-template-banner {
  margin-bottom: 0;
}

html[data-upload-template="active"] .workspace-page > .upload-template-banner:not([hidden]) + .workspace-view-tabs {
  margin-bottom: 24px;
}

html[data-upload-template="active"][data-studio-active-view="overview"] .upload-template-banner {
  display: none !important;
}

html[data-upload-template="active"][data-upload-template-stage]:not([data-upload-template-stage="1"]) .upload-template-banner {
  display: none !important;
}

html[data-upload-template="active"] .upload-template-banner .upload-template-limits-pill:hover,
html[data-upload-template="active"] .upload-template-banner .upload-template-limits-pill:focus-visible {
  border-color: var(--upload-template-purple);
  background: #faf8ff;
  outline: 3px solid rgba(105, 75, 235, .18);
  outline-offset: 3px;
}

/* The guide and stepper share one measured stack, including wrapped mobile copy. */
html[data-upload-template="active"] .upload-template-app {
  --upload-template-sticky-top: max(var(--upload-flow-dock-top, 78px), calc(var(--upload-template-guide-top, 78px) + var(--upload-template-guide-height, 0px)));
}

html[data-upload-template="active"] .upload-template-flow {
  position: sticky;
  top: var(--upload-template-sticky-top);
  z-index: 45;
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  margin: 0 0 24px;
  padding: 12px;
  overflow: hidden;
  border: 1px solid #e4deeb;
  border-radius: 22px;
  background: rgba(255, 254, 250, .94);
  box-shadow: 0 10px 32px rgba(40, 28, 62, .08);
  backdrop-filter: blur(18px);
}

html[data-upload-template="active"] .upload-template-flow button,
html[data-upload-template="active"] .upload-template-flow [role="tab"] {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 58px;
  padding: 8px 8px 10px;
  border: 0;
  border-bottom: 4px solid #cbc6d8;
  border-radius: 0;
  background: transparent;
  color: #9992aa;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

html[data-upload-template="active"] .upload-template-flow button:hover,
html[data-upload-template="active"] .upload-template-flow button:focus-visible,
html[data-upload-template="active"] .upload-template-flow [role="tab"]:hover,
html[data-upload-template="active"] .upload-template-flow [role="tab"]:focus-visible {
  color: var(--upload-template-purple);
  background: rgba(115, 80, 230, .045);
  outline: none;
}

html[data-upload-template="active"] .upload-template-flow button > b,
html[data-upload-template="active"] .upload-template-flow [role="tab"] > b {
  font-size: 1.65rem;
  font-weight: 500;
  line-height: 1;
}

html[data-upload-template="active"] .upload-template-flow button > span,
html[data-upload-template="active"] .upload-template-flow [role="tab"] > span {
  min-width: 0;
  overflow: hidden;
  font-weight: 850;
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-upload-template="active"] .upload-template-flow button small,
html[data-upload-template="active"] .upload-template-flow [role="tab"] small {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  font-size: .72rem;
  font-weight: 500;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-upload-template="active"] .upload-template-flow button.is-active,
html[data-upload-template="active"] .upload-template-flow button[aria-selected="true"],
html[data-upload-template="active"] .upload-template-flow [role="tab"].is-active,
html[data-upload-template="active"] .upload-template-flow [role="tab"][aria-selected="true"] {
  border-color: var(--upload-template-purple);
  color: var(--upload-template-purple);
}

html[data-upload-template="active"] .upload-template-flow button.is-complete,
html[data-upload-template="active"] .upload-template-flow [role="tab"].is-complete {
  border-color: var(--upload-template-mint);
  color: #287b6b;
}

html[data-upload-template="active"] .workspace-upload-entitlement {
  display: grid;
  grid-template-columns: 300px minmax(160px, 1fr) auto;
  align-items: center;
  gap: 26px;
  width: 100%;
  margin: -8px 0 24px;
  padding: 17px 22px;
  border: 1px solid var(--upload-template-line);
  border-radius: 18px;
  background: rgba(255, 254, 250, .94);
  color: var(--upload-template-ink);
  box-shadow: 0 10px 28px rgba(39, 24, 65, .05);
}

html[data-upload-template="active"] .workspace-upload-entitlement-copy,
html[data-upload-template="active"] .workspace-upload-entitlement-copy > div {
  min-width: 0;
}

html[data-upload-template="active"] .workspace-upload-entitlement-kicker {
  color: var(--upload-template-purple);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

html[data-upload-template="active"] .workspace-upload-entitlement-copy strong {
  display: block;
  margin-top: 2px;
  color: var(--upload-template-ink);
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1.05;
}

html[data-upload-template="active"] .workspace-upload-entitlement-copy small {
  color: var(--upload-template-muted);
}

html[data-upload-template="active"] .workspace-upload-entitlement-progress,
html[data-upload-template="active"] .workspace-upload-entitlement-meter {
  position: relative;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #ebe7ee;
}

html[data-upload-template="active"] .workspace-upload-entitlement-progress > span,
html[data-upload-template="active"] .workspace-upload-entitlement-meter > span {
  display: block;
  width: var(--upload-entitlement-progress, 100%);
  max-width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--upload-template-mint), #78d8e4);
}

html[data-upload-template="active"] .workspace-upload-entitlement-plan,
html[data-upload-template="active"] .workspace-upload-entitlement-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 15px;
  border: 1px solid #d9d1e1;
  border-radius: 999px;
  background: #fff;
  color: var(--upload-template-purple);
  font: inherit;
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

html[data-upload-template="active"] .workspace-upload-entitlement-popover {
  right: 0;
  left: auto;
  width: min(360px, calc(100vw - 28px));
  border: 1px solid var(--upload-template-line);
  border-radius: 18px;
  background: #fff;
  color: var(--upload-template-ink);
  box-shadow: var(--upload-template-shadow);
}

html[data-upload-template="active"] [data-upload-workflow-panel],
html[data-upload-template="active"] .upload-template-panel {
  position: relative;
  display: block;
  width: 100%;
  margin: 0 0 24px;
  padding: 38px;
  overflow: visible;
  border: 1px solid #e2dce8;
  border-radius: 30px;
  background: rgba(255, 254, 250, .96);
  color: var(--upload-template-ink);
  box-shadow: var(--upload-template-shadow);
}

html[data-upload-template="active"] [data-upload-workflow-panel]::before,
html[data-upload-template="active"] [data-upload-workflow-panel]::after,
html[data-upload-template="active"] .upload-template-panel::before,
html[data-upload-template="active"] .upload-template-panel::after {
  display: none;
  content: none;
}

html[data-upload-template="active"] [data-upload-workflow-panel][hidden],
html[data-upload-template="active"] .upload-template-panel[hidden] {
  display: none !important;
}

html[data-upload-template="active"] .upload-template-stage-heading {
  max-width: 900px;
  margin: 0 0 30px;
}

html[data-upload-template="active"] .upload-template-stage-heading > span,
html[data-upload-template="active"] .upload-template-heading-topline > span,
html[data-upload-template="active"] .upload-template-stage-heading > small,
html[data-upload-template="active"] .upload-template-stage-heading .eyebrow {
  display: block;
  color: var(--upload-template-purple);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
}

html[data-upload-template="active"] .upload-template-stage-heading h1,
html[data-upload-template="active"] .upload-template-stage-heading h2 {
  max-width: 960px;
  margin: 8px 0 12px;
  color: var(--upload-template-ink);
  font-size: clamp(2.15rem, 4vw, 3.75rem);
  font-weight: 900;
  letter-spacing: -.045em;
  line-height: 1;
}

html[data-upload-template="active"] .upload-template-stage-heading p {
  max-width: 900px;
  margin: 0;
  color: var(--upload-template-muted);
  font-size: 1.08rem;
  line-height: 1.45;
}

html[data-upload-template="active"] .upload-template-receive-heading {
  max-width: none;
}

html[data-upload-template="active"] .upload-template-heading-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 20px;
}

html[data-upload-template="active"] .upload-template-limits-pill {
  width: auto;
  min-height: 46px;
  padding: 10px 18px;
  border: 1px solid #a98fe9;
  border-radius: 999px;
  color: var(--upload-template-purple-dark);
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 6px 18px rgba(79, 52, 148, .1);
  cursor: pointer;
  white-space: nowrap;
}

html[data-upload-template="active"] .upload-template-limits-pill strong {
  font-size: .95rem;
  font-weight: 800;
  line-height: 1.2;
}

html[data-upload-template="active"] .upload-template-dropzone-host {
  position: relative;
}

html[data-upload-template="active"] .upload-template-entry-actions {
  position: absolute;
  z-index: 3;
  top: 70px;
  left: 50%;
  display: flex;
  gap: 12px;
  transform: translateX(-50%);
}

html[data-upload-template="active"] .upload-template-entry-choice {
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  padding: 0;
  border: 1px solid #d8d0f3;
  border-radius: 28px;
  background: linear-gradient(135deg, #eee9ff, #e4fbff);
  color: var(--upload-template-purple);
  box-shadow: 0 12px 28px rgba(76, 49, 143, .09);
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

html[data-upload-template="active"] .upload-template-entry-choice.is-folder {
  border-color: #bfe3dc;
  background: linear-gradient(135deg, #e9fbf7, #e5f6ff);
  color: #2b8e82;
}

html[data-upload-template="active"] .upload-template-entry-choice svg {
  width: 46px;
  height: 46px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

html[data-upload-template="active"] .upload-template-music-note {
  font-family: Arial, sans-serif;
  font-size: 46px;
  font-weight: 400;
  line-height: 1;
  color: inherit;
}

html[data-upload-template="active"] .upload-template-entry-choice:hover:not(:disabled),
html[data-upload-template="active"] .upload-template-entry-choice:focus-visible {
  border-color: currentColor;
  box-shadow: 0 16px 34px rgba(76, 49, 143, .17);
  outline: 3px solid rgba(105, 75, 235, .18);
  outline-offset: 3px;
  transform: translateY(-2px);
}

html[data-upload-template="active"] .upload-template-entry-choice:disabled {
  opacity: 1;
  filter: none;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

html[data-upload-template="active"] [data-upload-dropzone] {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 420px;
  padding: 194px 36px 44px;
  overflow: hidden;
  border: 2px dashed #8c7da2;
  border-radius: 28px;
  background:
    radial-gradient(circle at 52% 48%, #e8fbff, #fff 58%);
  color: var(--upload-template-ink);
  text-align: center;
  cursor: pointer;
}

html[data-upload-template="active"] [data-upload-dropzone]:hover,
html[data-upload-template="active"] [data-upload-dropzone]:focus-within,
html[data-upload-template="active"] [data-upload-dropzone].is-over,
html[data-upload-template="active"] [data-upload-dropzone].is-dragging {
  border-color: var(--upload-template-purple);
  background: radial-gradient(circle at 52% 48%, #ddf8ff, #f1ebff 74%);
  outline: none;
}

html[data-upload-template="active"] [data-upload-dropzone] input[type="file"] {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
}

html[data-upload-template="active"] [data-upload-dropzone] .workspace-upload-drop-icon,
html[data-upload-template="active"] [data-upload-dropzone] .upload-template-file-icon {
  display: grid;
  place-items: center;
  width: 98px;
  height: 98px;
  margin: 0 0 4px;
  border: 0;
  border-radius: 28px;
  background: linear-gradient(135deg, #eee9ff, #e4fbff);
  color: var(--upload-template-purple);
  font-size: 2.9rem;
  line-height: 1;
  box-shadow: none;
}

html[data-upload-template="active"] [data-upload-dropzone] .upload-template-core-entry-icons {
  display: none !important;
}

html[data-upload-template="active"] [data-upload-dropzone] .workspace-upload-drop-icon svg,
html[data-upload-template="active"] [data-upload-dropzone] .upload-template-file-icon svg {
  width: 46px;
  height: 46px;
  stroke: currentColor;
}

html[data-upload-template="active"] [data-upload-dropzone] .workspace-upload-drop-icon svg + svg {
  display: none;
}

html[data-upload-template="active"] [data-upload-dropzone] strong {
  display: block;
  color: var(--upload-template-ink);
  font-size: clamp(1.55rem, 2.4vw, 1.95rem);
  font-weight: 900;
  line-height: 1.12;
}

html[data-upload-template="active"] [data-upload-dropzone] p,
html[data-upload-template="active"] [data-upload-dropzone] small {
  max-width: 760px;
  margin: 0;
  color: var(--upload-template-muted);
}

html[data-upload-template="active"] [data-upload-dropzone] a,
html[data-upload-template="active"] [data-upload-dropzone] button,
html[data-upload-template="active"] [data-upload-dropzone] em {
  border: 0;
  background: transparent;
  color: var(--upload-template-purple);
  font: inherit;
  font-style: normal;
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

html[data-upload-template="active"] .workspace-upload-picker-actions {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 14px;
  width: 100%;
  margin: 16px 0 0;
}

html[data-upload-template="active"] .workspace-upload-picker-actions > button,
html[data-upload-template="active"] .workspace-upload-picker-actions > label,
html[data-upload-template="active"] .workspace-upload-picker-actions > a {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  min-height: 92px;
  padding: 20px 22px;
  border: 1px solid var(--upload-template-line);
  border-radius: 18px;
  background: #fff;
  color: var(--upload-template-ink);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

html[data-upload-template="active"] .workspace-upload-picker-actions > :first-child {
  border: 2px solid var(--upload-template-purple);
  color: var(--upload-template-purple);
  background: linear-gradient(105deg, #faf7ff, #f7ffff);
}

html[data-upload-template="active"] .workspace-upload-picker-actions > button:hover,
html[data-upload-template="active"] .workspace-upload-picker-actions > button:focus-visible,
html[data-upload-template="active"] .workspace-upload-picker-actions > label:hover,
html[data-upload-template="active"] .workspace-upload-picker-actions > label:focus-within,
html[data-upload-template="active"] .workspace-upload-picker-actions > a:hover,
html[data-upload-template="active"] .workspace-upload-picker-actions > a:focus-visible {
  border-color: var(--upload-template-purple);
  box-shadow: 0 10px 26px rgba(76, 49, 143, .1);
  outline: none;
}

html[data-upload-template="active"] .workspace-upload-picker-actions strong,
html[data-upload-template="active"] .workspace-upload-picker-actions small {
  display: block;
}

html[data-upload-template="active"] .workspace-upload-picker-actions small {
  margin-top: 2px;
  color: var(--upload-template-muted);
}

html[data-upload-template="active"] .upload-template-upload-summary {
  display: grid;
  grid-template-columns: 150px 180px minmax(180px, 1fr) auto;
  align-items: center;
  gap: 16px;
  width: 100%;
  margin: 16px 0 0;
  padding: 18px;
  border: 1px solid var(--upload-template-line);
  border-radius: 18px;
  background: #fff;
}

html[data-upload-template="active"] .upload-template-upload-summary > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

html[data-upload-template="active"] .upload-template-upload-summary b,
html[data-upload-template="active"] .upload-template-upload-summary strong {
  color: var(--upload-template-purple);
  font-size: 1.55rem;
  font-weight: 900;
  line-height: 1.1;
}

html[data-upload-template="active"] .upload-template-upload-summary span,
html[data-upload-template="active"] .upload-template-upload-summary small {
  overflow-wrap: anywhere;
  color: var(--upload-template-muted);
  font-size: .72rem;
  line-height: 1.25;
  text-transform: uppercase;
}

html[data-upload-template="active"] .upload-template-upload-summary button,
html[data-upload-template="active"] .upload-template-upload-summary a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid var(--upload-template-purple);
  border-radius: 999px;
  background: #fff;
  color: var(--upload-template-purple-dark);
  font: inherit;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}

html[data-upload-template="active"] .upload-template-track-cards {
  display: grid;
  gap: 10px;
  width: 100%;
  margin: 14px 0 0;
}

html[data-upload-template="active"] .upload-template-track-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 13px 16px;
  border: 1px solid var(--upload-template-line);
  border-radius: 14px;
  background: #fff;
}

html[data-upload-template="active"] .upload-template-track-row > :first-child,
html[data-upload-template="active"] .upload-template-track-row > b:first-child {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #f0eaff;
  color: var(--upload-template-purple);
  font-weight: 900;
}

html[data-upload-template="active"] .upload-template-track-row > div {
  min-width: 0;
}

html[data-upload-template="active"] .upload-template-track-row strong,
html[data-upload-template="active"] .upload-template-track-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-upload-template="active"] .upload-template-track-row small {
  color: var(--upload-template-muted);
}

html[data-upload-template="active"] .upload-template-track-row .upload-template-track-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

html[data-upload-template="active"] .upload-template-track-row button {
  min-height: 36px;
  padding: 7px 11px;
  border: 0;
  border-radius: 999px;
  background: #f4eff8;
  color: var(--upload-template-ink);
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

html[data-upload-template="active"] .upload-template-track-row button:hover,
html[data-upload-template="active"] .upload-template-track-row button:focus-visible {
  background: #ebe2fa;
  color: var(--upload-template-purple-dark);
  outline: 2px solid rgba(115, 80, 230, .22);
  outline-offset: 1px;
}

html[data-upload-template="active"] .upload-template-track-cards > p:only-child,
html[data-upload-template="active"] .upload-template-track-cards .upload-template-empty {
  margin: 0;
  padding: 32px;
  border: 1px dashed var(--upload-template-line);
  border-radius: 16px;
  color: var(--upload-template-muted);
  text-align: center;
}

html[data-upload-template="active"] .upload-template-evidence-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
  margin: 18px 0 0;
}

html[data-upload-template="active"] .upload-template-evidence-grid > article,
html[data-upload-template="active"] .upload-template-evidence-grid > div {
  min-width: 0;
  padding: 17px;
  border: 1px solid var(--upload-template-line);
  border-radius: 18px;
  background: linear-gradient(145deg, #fff, #f8faff);
}

html[data-upload-template="active"] .upload-template-evidence-grid strong,
html[data-upload-template="active"] .upload-template-evidence-grid span,
html[data-upload-template="active"] .upload-template-evidence-grid small {
  display: block;
}

html[data-upload-template="active"] .upload-template-evidence-grid strong {
  font-size: 1rem;
  font-weight: 900;
}

html[data-upload-template="active"] .upload-template-evidence-grid b {
  color: var(--upload-template-purple);
  font-size: 1.65rem;
  line-height: 1;
}

html[data-upload-template="active"] .upload-template-evidence-grid small,
html[data-upload-template="active"] .upload-template-evidence-grid span {
  margin-top: 4px;
  color: var(--upload-template-muted);
  font-size: .78rem;
}

html[data-upload-template="active"].is-package-review-active [data-upload-dropzone],
html[data-upload-template="active"].is-package-review-active .workspace-upload-picker-actions,
html[data-upload-template="active"].is-package-review-active .upload-template-upload-summary,
html[data-upload-template="active"].is-package-review-active .upload-template-track-cards,
html[data-upload-template="active"].is-package-review-active .upload-template-evidence-grid {
  display: grid;
}

html[data-upload-template="active"].is-package-review-active [data-upload-dropzone] {
  display: flex;
}

html[data-upload-template="active"] .workspace-upload-workflow-panel.is-package-review-active > [data-upload-dropzone],
html[data-upload-template="active"] .workspace-upload-workflow-panel.is-package-review-active > .workspace-dropzone {
  display: flex !important;
}

html[data-upload-template="active"] .workspace-upload-workflow-panel.is-package-review-active > .workspace-upload-picker-actions,
html[data-upload-template="active"] .workspace-upload-workflow-panel.is-package-review-active > .workspace-upload-summary,
html[data-upload-template="active"] .workspace-upload-workflow-panel.is-package-review-active > .upload-template-upload-summary,
html[data-upload-template="active"] .workspace-upload-workflow-panel.is-package-review-active > .upload-template-track-cards,
html[data-upload-template="active"] .workspace-upload-workflow-panel.is-package-review-active > .upload-template-evidence-grid {
  display: grid !important;
}

html[data-upload-template="active"] .upload-template-package-page {
  position: relative;
  width: 100%;
  min-width: 0;
  scroll-margin-top: var(--upload-template-guidance-top, 190px);
}

html[data-upload-template="active"] .upload-template-package-page[hidden],
html[data-upload-template="active"] .upload-template-actions[hidden] {
  display: none !important;
}

html[data-upload-template="active"] .upload-template-package-shell {
  position: relative;
  width: 100%;
  max-height: none;
  overflow: visible;
  border: 1px solid #dcd5e8;
  border-radius: 28px;
  background: var(--upload-template-paper);
  color: var(--upload-template-ink);
  box-shadow: var(--upload-template-shadow);
}

html[data-upload-template="active"] .upload-template-package-page [data-upload-package-panel] {
  scroll-margin-top: var(--upload-template-guidance-top, 190px);
}

html[data-upload-template="active"] .upload-template-package-close {
  position: sticky;
  top: 16px;
  z-index: 4;
  float: right;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 16px 16px -60px 0;
  border: 1px solid #d9d2e2;
  border-radius: 50%;
  background: rgba(255, 255, 255, .94);
  color: var(--upload-template-ink);
  font: inherit;
  font-size: 1.35rem;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(31, 18, 55, .1);
  backdrop-filter: blur(10px);
}

html[data-upload-template="active"] .upload-template-package-close:hover,
html[data-upload-template="active"] .upload-template-package-close:focus-visible {
  border-color: var(--upload-template-purple);
  color: var(--upload-template-purple);
  outline: 3px solid rgba(115, 80, 230, .16);
}

html[data-upload-template="active"] .upload-template-package-shell [data-upload-discovery],
html[data-upload-template="active"] .upload-template-package-shell .workspace-package-scan {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 34px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

html[data-upload-template="active"] .upload-template-package-shell [data-upload-discovery][hidden] {
  display: none !important;
}

html[data-upload-template="active"] .workspace-upload-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: start;
  gap: 28px;
}

html[data-upload-template="active"] .workspace-upload-detail-layout > * {
  min-width: 0;
}

html[data-upload-template="active"] .workspace-upload-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 20px;
}

html[data-upload-template="active"] .workspace-upload-meta-grid > .workspace-upload-assistant-card,
html[data-upload-template="active"] .workspace-upload-meta-grid > .workspace-upload-mode-card,
html[data-upload-template="active"] .workspace-upload-meta-grid > .workspace-upload-policy-card,
html[data-upload-template="active"] .workspace-upload-meta-grid > .workspace-upload-artist-image-card,
html[data-upload-template="active"] .workspace-upload-meta-grid > .workspace-upload-identity-card,
html[data-upload-template="active"] .workspace-upload-meta-grid > [data-upload-field="artist-image"],
html[data-upload-template="active"] .workspace-upload-meta-grid > [data-upload-field="identity"] {
  grid-column: 1 / -1;
}

html[data-upload-template="active"] .workspace-upload-meta-grid > label,
html[data-upload-template="active"] .workspace-upload-meta-grid > fieldset,
html[data-upload-template="active"] .workspace-upload-meta-grid .workspace-upload-field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  color: #494352;
  font-weight: 800;
}

html[data-upload-template="active"] .workspace-upload-meta-grid input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
html[data-upload-template="active"] .workspace-upload-meta-grid select,
html[data-upload-template="active"] .workspace-upload-meta-grid textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 11px 2px;
  border: 0;
  border-bottom: 2px solid #cbc5d5;
  border-radius: 0;
  background: transparent;
  color: var(--upload-template-ink);
  font: inherit;
  box-shadow: none;
  outline: none;
}

html[data-upload-template="active"] .workspace-upload-meta-grid input:focus,
html[data-upload-template="active"] .workspace-upload-meta-grid select:focus,
html[data-upload-template="active"] .workspace-upload-meta-grid textarea:focus {
  border-color: var(--upload-template-purple);
  outline: none;
}

html[data-upload-template="active"] .workspace-upload-meta-grid input[type="checkbox"],
html[data-upload-template="active"] .workspace-upload-meta-grid input[type="radio"] {
  width: 24px;
  height: 24px;
  accent-color: var(--upload-template-purple);
}

html[data-upload-template="active"] .workspace-upload-meta-grid .workspace-upload-field-help,
html[data-upload-template="active"] .workspace-upload-meta-grid small {
  color: var(--upload-template-muted);
  font-weight: 500;
}

html[data-upload-template="active"] [data-upload-release-preview] {
  position: sticky;
  top: calc(var(--upload-template-sticky-top) + 92px);
  align-self: start;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 20px;
  overflow: hidden;
  border: 1px solid #dcd6e7;
  border-radius: 22px;
  background: linear-gradient(160deg, #f5f2ff, #f2ffff);
  color: var(--upload-template-ink);
  box-shadow: var(--upload-template-shadow);
}

html[data-upload-template="active"] [data-upload-release-preview] header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 14px;
}

html[data-upload-template="active"] [data-upload-release-preview] header strong,
html[data-upload-template="active"] [data-upload-release-preview] header span {
  color: var(--upload-template-purple);
  font-weight: 900;
}

html[data-upload-template="active"] [data-upload-release-preview] header small {
  color: var(--upload-template-muted);
}

html[data-upload-template="active"] [data-upload-release-preview] img,
html[data-upload-template="active"] [data-upload-release-preview] .workspace-upload-release-cover,
html[data-upload-template="active"] [data-upload-release-preview] [data-upload-preview-cover] {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  overflow: hidden;
  border-radius: 18px;
  background: #eceaf3;
}

html[data-upload-template="active"] [data-upload-release-preview] h2 {
  margin: 18px 0 0;
  color: var(--upload-template-ink);
  font-size: 1.85rem;
  font-weight: 900;
  line-height: 1.05;
}

html[data-upload-template="active"] [data-upload-release-preview] p {
  margin: 3px 0 14px;
  color: var(--upload-template-muted);
}

html[data-upload-template="active"] [data-upload-release-preview] dl {
  margin: 0;
}

html[data-upload-template="active"] [data-upload-release-preview] dl > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-top: 1px solid #d8d2df;
}

html[data-upload-template="active"] [data-upload-release-preview] dt {
  color: var(--upload-template-muted);
}

html[data-upload-template="active"] [data-upload-release-preview] dd {
  margin: 0;
  font-weight: 800;
  text-align: right;
}

html[data-upload-template="active"] [data-upload-creation-disclosure] {
  width: 100%;
  margin: 22px 0 0;
  padding: 24px;
  border: 1px solid var(--upload-template-line);
  border-radius: 24px;
  background: #fff;
  color: var(--upload-template-ink);
  box-shadow: var(--upload-template-soft-shadow);
}

html[data-upload-template="active"] [data-upload-creation-disclosure] h2,
html[data-upload-template="active"] [data-upload-creation-disclosure] h3 {
  margin: 0 0 10px;
  font-size: 1.35rem;
}

html[data-upload-template="active"] .upload-template-field-card,
html[data-upload-template="active"] .upload-template-panel .upload-template-card {
  min-width: 0;
  padding: 26px;
  border: 1px solid var(--upload-template-line);
  border-radius: 24px;
  background: #fff;
  color: var(--upload-template-ink);
  box-shadow: var(--upload-template-soft-shadow);
}

html[data-upload-template="active"] .upload-template-field-card h2,
html[data-upload-template="active"] .upload-template-field-card h3,
html[data-upload-template="active"] .upload-template-card h2,
html[data-upload-template="active"] .upload-template-card h3 {
  margin: 0 0 14px;
  color: var(--upload-template-ink);
  font-size: 1.7rem;
  font-weight: 900;
  line-height: 1.12;
}

html[data-upload-template="active"] .upload-template-field-card > p,
html[data-upload-template="active"] .upload-template-card > p {
  margin: -5px 0 18px;
  color: var(--upload-template-muted);
}

html[data-upload-template="active"] .upload-template-field-card label {
  display: block;
  color: #494352;
  font-weight: 800;
}

html[data-upload-template="active"] .upload-template-field-card input:not([type="checkbox"]):not([type="radio"]),
html[data-upload-template="active"] .upload-template-field-card select,
html[data-upload-template="active"] .upload-template-field-card textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  margin-top: 5px;
  padding: 11px 2px;
  border: 0;
  border-bottom: 2px solid #cbc5d5;
  border-radius: 0;
  background: transparent;
  color: var(--upload-template-ink);
  font: inherit;
  box-shadow: none;
  outline: none;
}

html[data-upload-template="active"] .upload-template-field-card input:focus,
html[data-upload-template="active"] .upload-template-field-card select:focus,
html[data-upload-template="active"] .upload-template-field-card textarea:focus {
  border-color: var(--upload-template-purple);
}

html[data-upload-template="active"] .upload-template-quick-dates,
html[data-upload-template="active"] .upload-template-territory-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 14px 0 20px;
}

html[data-upload-template="active"] .upload-template-quick-dates button,
html[data-upload-template="active"] .upload-template-territory-modes button {
  min-height: 42px;
  padding: 10px 17px;
  border: 1px solid #d9d2e2;
  border-radius: 999px;
  background: #fff;
  color: var(--upload-template-ink);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

html[data-upload-template="active"] .upload-template-quick-dates button.is-active,
html[data-upload-template="active"] .upload-template-quick-dates button[aria-pressed="true"],
html[data-upload-template="active"] .upload-template-territory-modes button.is-active,
html[data-upload-template="active"] .upload-template-territory-modes button[aria-pressed="true"] {
  border-color: var(--upload-template-purple);
  background: var(--upload-template-purple);
  color: #fff;
}

html[data-upload-template="active"] .upload-template-inline-check {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 0;
  border-top: 1px solid var(--upload-template-line);
  color: var(--upload-template-ink);
}

html[data-upload-template="active"] .upload-template-inline-check input[type="checkbox"],
html[data-upload-template="active"] .upload-template-inline-check input[type="radio"] {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  accent-color: var(--upload-template-purple);
}

html[data-upload-template="active"] .upload-template-release-history {
  display: grid;
  gap: 14px;
}

html[data-upload-template="active"] .upload-template-release-history aside,
html[data-upload-template="active"] .upload-template-field-card aside,
html[data-upload-template="active"] .upload-template-territory-card aside {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 20px;
  padding: 14px;
  border-left: 4px solid var(--upload-template-purple);
  background: #f4f0fa;
  color: var(--upload-template-muted);
}

html[data-upload-template="active"] .upload-template-service-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0;
}

html[data-upload-template="active"] .upload-template-service-card {
  position: relative;
  display: block;
  min-width: 0;
  min-height: 190px;
  padding: 20px 46px 20px 20px;
  border: 1px solid var(--upload-template-line);
  border-radius: 20px;
  background: var(--upload-template-panel);
  color: var(--upload-template-ink);
  cursor: pointer;
}

html[data-upload-template="active"] .upload-template-service-card.priority,
html[data-upload-template="active"] .upload-template-service-card.is-priority {
  border-color: transparent;
  background: linear-gradient(135deg, #8744f1, #344ec4);
  color: #fff;
}

html[data-upload-template="active"] .upload-template-service-card.is-selected,
html[data-upload-template="active"] .upload-template-service-card:has(input:checked) {
  outline: 3px solid var(--upload-template-lime);
  outline-offset: 2px;
}

html[data-upload-template="active"] .upload-template-service-card input {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 24px;
  height: 24px;
  accent-color: var(--upload-template-purple);
}

html[data-upload-template="active"] .upload-template-service-card strong,
html[data-upload-template="active"] .upload-template-service-card b,
html[data-upload-template="active"] .upload-template-service-card small,
html[data-upload-template="active"] .upload-template-service-card span {
  display: block;
}

html[data-upload-template="active"] .upload-template-service-card strong {
  font-size: 1.22rem;
  font-weight: 900;
}

html[data-upload-template="active"] .upload-template-service-card b {
  margin: 8px 0;
  color: var(--upload-template-purple-dark);
}

html[data-upload-template="active"] .upload-template-service-card small {
  color: var(--upload-template-muted);
}

html[data-upload-template="active"] .upload-template-service-card.priority b,
html[data-upload-template="active"] .upload-template-service-card.priority small,
html[data-upload-template="active"] .upload-template-service-card.is-priority b,
html[data-upload-template="active"] .upload-template-service-card.is-priority small {
  color: #fff;
}

html[data-upload-template="active"] .upload-template-destination-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

html[data-upload-template="active"] .upload-template-destination-card,
html[data-upload-template="active"] .upload-template-territory-card {
  min-width: 0;
  padding: 26px;
  border: 1px solid var(--upload-template-line);
  border-radius: 24px;
  background: #fff;
  color: var(--upload-template-ink);
  box-shadow: var(--upload-template-soft-shadow);
}

html[data-upload-template="active"] .upload-template-territory-card {
  grid-column: 1 / -1;
}

html[data-upload-template="active"] .upload-template-destination-card > label,
html[data-upload-template="active"] label.upload-template-destination-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  cursor: pointer;
}

html[data-upload-template="active"] .upload-template-destination-card input {
  flex: 0 0 auto;
  width: 25px;
  height: 25px;
  margin: 2px 0 0;
  accent-color: var(--upload-template-purple);
}

html[data-upload-template="active"] .upload-template-destination-card strong,
html[data-upload-template="active"] .upload-template-destination-card small {
  display: block;
}

html[data-upload-template="active"] .upload-template-destination-card strong {
  font-size: 1.12rem;
  font-weight: 900;
}

html[data-upload-template="active"] .upload-template-destination-card small {
  margin-top: 4px;
  color: var(--upload-template-muted);
}

html[data-upload-template="active"] .upload-template-territory-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

html[data-upload-template="active"] .upload-template-territory-head > div {
  min-width: 0;
}

html[data-upload-template="active"] .upload-template-territory-head h2,
html[data-upload-template="active"] .upload-template-territory-head h3,
html[data-upload-template="active"] .upload-template-territory-head p {
  margin: 0;
}

html[data-upload-template="active"] .upload-template-territory-head h2,
html[data-upload-template="active"] .upload-template-territory-head h3 {
  font-size: 1.7rem;
  font-weight: 900;
}

html[data-upload-template="active"] .upload-template-territory-head p {
  margin-top: 4px;
  color: var(--upload-template-muted);
}

html[data-upload-template="active"] .upload-template-territory-head button,
html[data-upload-template="active"] .upload-template-territory-head a {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 10px 17px;
  border: 1px solid var(--upload-template-purple);
  border-radius: 999px;
  background: #fff;
  color: var(--upload-template-purple-dark);
  font: inherit;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}

html[data-upload-template="active"] .upload-template-gate {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 16px;
  padding: 14px 16px;
  border-left: 4px solid var(--upload-template-purple);
  background: #f4f0fa;
  color: var(--upload-template-muted);
}

html[data-upload-template="active"] .upload-template-gate strong {
  color: var(--upload-template-ink);
}

html[data-upload-template="active"] .upload-template-territory-dialog {
  width: min(680px, calc(100% - 28px));
  max-height: 80dvh;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 24px;
  background: #fff;
  color: var(--upload-template-ink);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .3);
}

html[data-upload-template="active"] .upload-template-territory-dialog::backdrop {
  background: rgba(14, 10, 20, .62);
  backdrop-filter: blur(7px);
}

html[data-upload-template="active"] .upload-template-territory-dialog > form {
  display: grid;
  max-height: 80dvh;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  margin: 0;
}

html[data-upload-template="active"] .upload-template-territory-dialog header,
html[data-upload-template="active"] .upload-template-territory-dialog footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  background: #f7f3ff;
}

html[data-upload-template="active"] .upload-template-territory-dialog header h2,
html[data-upload-template="active"] .upload-template-territory-dialog header p {
  margin: 0;
}

html[data-upload-template="active"] .upload-template-territory-dialog header button {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--upload-template-ink);
  font: inherit;
  font-size: 1.3rem;
  cursor: pointer;
}

html[data-upload-template="active"] .upload-template-territory-search {
  width: calc(100% - 44px);
  min-height: 48px;
  margin: 18px 22px 4px;
  padding: 12px 14px;
  border: 1px solid var(--upload-template-line);
  border-radius: 12px;
  background: #fff;
  color: var(--upload-template-ink);
  font: inherit;
}

html[data-upload-template="active"] .upload-template-territory-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  min-height: 0;
  max-height: 420px;
  overflow: auto;
  padding: 14px 22px;
}

html[data-upload-template="active"] .upload-template-territory-list label {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
}

html[data-upload-template="active"] .upload-template-territory-list label:hover,
html[data-upload-template="active"] .upload-template-territory-list label:focus-within {
  background: #f3effa;
}

html[data-upload-template="active"] .upload-template-territory-list input {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  accent-color: var(--upload-template-purple);
}

html[data-upload-template="active"] .upload-template-territory-dialog footer button {
  min-height: 42px;
  padding: 10px 18px;
  border: 1px solid var(--upload-template-line);
  border-radius: 999px;
  background: #fff;
  color: var(--upload-template-ink);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

html[data-upload-template="active"] .upload-template-territory-dialog footer button[type="submit"],
html[data-upload-template="active"] .upload-template-territory-dialog footer .is-primary {
  border-color: transparent;
  background: linear-gradient(100deg, #9740ec, #3f9deb);
  color: #fff;
}

html[data-upload-template="active"] .upload-template-review-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  align-items: start;
  gap: 26px;
}

html[data-upload-template="active"] .upload-template-review-cover {
  min-width: 0;
  padding: 18px;
  border: 0;
  border-radius: 24px;
  background: #fff;
}

html[data-upload-template="active"] .upload-template-review-cover > div {
  display: grid;
  width: 100%;
  aspect-ratio: 1;
  place-items: center;
  overflow: hidden;
  border-radius: 18px;
  background: #efedf5;
}

html[data-upload-template="active"] .upload-template-review-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

html[data-upload-template="active"] .upload-template-review-cover span {
  color: #9e94af;
  font-size: 4.4rem;
}

html[data-upload-template="active"] .upload-template-review-cover button,
html[data-upload-template="active"] .upload-template-review-cover a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 42px;
  margin-top: 12px;
  padding: 9px 14px;
  border: 1px solid var(--upload-template-purple);
  border-radius: 999px;
  background: #fff;
  color: var(--upload-template-purple);
  font: inherit;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}

html[data-upload-template="active"] .upload-template-review-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 20px;
  min-width: 0;
  padding: 26px;
  border: 0;
  border-radius: 24px;
  background: #fff;
}

html[data-upload-template="active"] .upload-template-review-details h2,
html[data-upload-template="active"] .upload-template-review-details > header {
  grid-column: 1 / -1;
}

html[data-upload-template="active"] .upload-template-review-details h2 {
  margin: 0 0 16px;
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1.05;
}

html[data-upload-template="active"] .upload-template-review-details > div {
  min-width: 0;
  padding: 11px 0;
  border-top: 1px solid var(--upload-template-line);
}

html[data-upload-template="active"] .upload-template-review-details small,
html[data-upload-template="active"] .upload-template-review-details strong {
  display: block;
  overflow-wrap: anywhere;
}

html[data-upload-template="active"] .upload-template-review-details small {
  color: var(--upload-template-muted);
}

html[data-upload-template="active"] .upload-template-review-tracklist {
  grid-column: 1 / -1;
  margin-top: 24px;
  overflow: visible;
  border: 0;
  border-radius: 20px;
  background: #fff;
}

html[data-upload-template="active"] .upload-template-review-tracklist > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  background: #fff;
}

html[data-upload-template="active"] .upload-template-review-tracklist > header h2,
html[data-upload-template="active"] .upload-template-review-tracklist > header h3 {
  margin: 0;
}

html[data-upload-template="active"] .upload-template-review-tracklist .upload-template-track-row {
  border-width: 1px 0 0;
  border-radius: 0;
}

html[data-upload-template="active"] [data-upload-final-summary],
html[data-upload-template="active"] [data-upload-review] {
  overflow: hidden;
  border: 1px solid var(--upload-template-line);
  border-radius: 24px;
  background: #fff;
  color: var(--upload-template-ink);
  box-shadow: var(--upload-template-soft-shadow);
}

html[data-upload-template="active"] [data-upload-final-summary] {
  padding: 24px;
}

html[data-upload-template="active"] [data-upload-review] {
  margin-top: 20px;
}

html[data-upload-template="active"] .upload-template-form-error {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 10px 0 0;
  padding: 11px 13px;
  border: 1px solid #e8a0ad;
  border-radius: 12px;
  background: #fff1f3;
  color: #9d293d;
  font-size: .86rem;
  font-weight: 750;
}

html[data-upload-template="active"] .upload-template-form-error[hidden] {
  display: none !important;
}

html[data-upload-template="active"] .workspace-upload-workflow-actions {
  position: sticky;
  bottom: 16px;
  z-index: 44;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  width: 100%;
  margin: 0;
  padding: 14px 18px;
  border: 1px solid #ddd6e8;
  border-radius: 22px;
  background: rgba(255, 254, 250, .97);
  color: var(--upload-template-ink);
  box-shadow: var(--upload-template-shadow);
  backdrop-filter: blur(16px);
}

html[data-upload-template="active"] .workspace-upload-workflow-actions > span,
html[data-upload-template="active"] .workspace-upload-workflow-actions .workspace-upload-workflow-status {
  min-width: 0;
  color: var(--upload-template-muted);
  text-align: center;
}

html[data-upload-template="active"] .workspace-upload-workflow-actions button {
  min-height: 46px;
  padding: 11px 20px;
  border: 1px solid #d9d1e1;
  border-radius: 999px;
  background: #fff;
  color: var(--upload-template-ink);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

html[data-upload-template="active"] .workspace-upload-workflow-actions button:disabled {
  opacity: .42;
  cursor: not-allowed;
}

html[data-upload-template="active"] .workspace-upload-workflow-actions [data-upload-next],
html[data-upload-template="active"] .workspace-upload-workflow-actions .workspace-upload-next,
html[data-upload-template="active"] .workspace-upload-workflow-actions button:last-child:not(:only-child) {
  min-width: 220px;
  border-color: transparent;
  background: linear-gradient(100deg, #9740ec, #3f9deb);
  color: #fff;
}

html[data-upload-template="active"] .workspace-upload-workflow-actions button:hover:not(:disabled),
html[data-upload-template="active"] .workspace-upload-workflow-actions button:focus-visible:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(76, 49, 143, .15);
  outline: none;
}

@media (max-width: 1050px) {
  html[data-upload-template="active"] .workspace-upload-detail-layout,
  html[data-upload-template="active"] .upload-template-review-layout {
    grid-template-columns: 1fr;
  }

  html[data-upload-template="active"] [data-upload-release-preview] {
    position: static;
    width: min(100%, 430px);
    margin-inline: auto;
  }

  html[data-upload-template="active"] .upload-template-review-cover {
    width: min(100%, 360px);
    margin-inline: auto;
  }
}

@media (max-width: 900px) {
  html[data-upload-template="active"] {
    --upload-template-stage-width: min(1460px, calc(100% - 20px));
  }

  html[data-upload-template="active"] .workspace-upload-stage {
    padding-top: 12px;
  }

  html[data-upload-template="active"] .upload-template-flow {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 3px;
    padding: 8px;
  }

  html[data-upload-template="active"] .upload-template-flow button,
  html[data-upload-template="active"] .upload-template-flow [role="tab"] {
    display: block;
    min-height: 50px;
    padding: 6px 2px;
    text-align: center;
  }

  html[data-upload-template="active"] .upload-template-flow button > b,
  html[data-upload-template="active"] .upload-template-flow [role="tab"] > b {
    display: block;
    font-size: 1.1rem;
  }

  html[data-upload-template="active"] .upload-template-flow button > span,
  html[data-upload-template="active"] .upload-template-flow [role="tab"] > span {
    display: block;
    overflow: hidden;
    font-size: .68rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  html[data-upload-template="active"] .upload-template-flow button small,
  html[data-upload-template="active"] .upload-template-flow [role="tab"] small {
    display: none;
  }

  html[data-upload-template="active"] .workspace-upload-entitlement {
    grid-template-columns: auto minmax(100px, 1fr) auto;
    gap: 16px;
  }

  html[data-upload-template="active"] .upload-template-evidence-grid,
  html[data-upload-template="active"] .upload-template-destination-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  html[data-upload-template="active"] .upload-template-territory-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 780px) {
  .workspace-cycle-actions {
    width: 100%;
    align-items: stretch;
  }

  .workspace-upload-template-link {
    text-align: center;
  }

  html[data-upload-template="active"] .upload-template-banner {
    align-items: flex-start;
    flex-direction: column;
  }

  html[data-upload-template="active"] .upload-template-banner {
    gap: 12px;
  }

  html[data-upload-template="active"] .upload-template-banner-copy {
    display: flex;
    gap: 4px;
  }

  html[data-upload-template="active"] .upload-template-banner-copy-text > span {
    font-size: .9rem;
  }

  html[data-upload-template="active"] .upload-template-banner-actions {
    width: 100%;
  }

  html[data-upload-template="active"] .upload-template-banner [data-upload-template-limits-host] {
    flex: 1 1 auto;
  }

  html[data-upload-template="active"] .upload-template-banner .upload-template-limits-pill {
    width: 100%;
  }

  html[data-upload-template="active"] .workspace-upload-entitlement {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  html[data-upload-template="active"] .workspace-upload-entitlement-plan,
  html[data-upload-template="active"] .workspace-upload-entitlement-trigger {
    justify-self: start;
  }

  html[data-upload-template="active"] .workspace-upload-picker-actions,
  html[data-upload-template="active"] .workspace-upload-meta-grid,
  html[data-upload-template="active"] .upload-template-service-cards,
  html[data-upload-template="active"] .upload-template-review-details {
    grid-template-columns: 1fr;
  }

  html[data-upload-template="active"] .workspace-upload-meta-grid > .workspace-upload-assistant-card,
  html[data-upload-template="active"] .workspace-upload-meta-grid > .workspace-upload-mode-card,
  html[data-upload-template="active"] .workspace-upload-meta-grid > .workspace-upload-policy-card,
  html[data-upload-template="active"] .workspace-upload-meta-grid > .workspace-upload-artist-image-card,
  html[data-upload-template="active"] .workspace-upload-meta-grid > .workspace-upload-identity-card,
  html[data-upload-template="active"] .workspace-upload-meta-grid > [data-upload-field="artist-image"],
  html[data-upload-template="active"] .workspace-upload-meta-grid > [data-upload-field="identity"],
  html[data-upload-template="active"] .upload-template-review-details h2,
  html[data-upload-template="active"] .upload-template-review-details > header {
    grid-column: auto;
  }

  html[data-upload-template="active"] .upload-template-upload-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  html[data-upload-template="active"] .upload-template-upload-summary > :nth-child(3) {
    grid-column: 1 / -1;
  }

  html[data-upload-template="active"] .upload-template-upload-summary > :last-child {
    justify-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html[data-upload-template="active"] .upload-template-banner,
  html[data-upload-template="active"] .upload-template-limits-dialog .workspace-upload-preflight-limits article {
    transition: none !important;
  }
}

/* Task 703: factual reconnect status and a compact, identity-bound image summary. */
/* A single, scrollbar-free modal surface. Small screens can still scroll all content. */
html[data-upload-template="active"] .workspace-upload-reconnect-dialog { width: min(960px, calc(100vw - clamp(32px, 8vw, 80px))); max-height: calc(100dvh - 32px); overflow-y: auto; scrollbar-width: none; }
html[data-upload-template="active"] .workspace-upload-reconnect-dialog::-webkit-scrollbar { display: none; }
html[data-upload-template="active"] .workspace-upload-reconnect-dialog .workspace-upload-dialog-shell { overflow: visible; max-height: none; gap: 16px; padding: 26px 32px; }
html[data-upload-template="active"] [data-upload-draft-reconnect-secondary]:disabled { background: #e5e3e8; border-color: #d6d2db; color: #78727e; box-shadow: none; cursor: not-allowed; opacity: 1; }
html[data-upload-template="active"] [data-upload-template-guide-dismiss] { display: grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; padding: 0; border: 1px solid #cfc5ee; border-radius: 50%; color: #514172; background: #fff; font-size: 24px; cursor: pointer; }
html[data-upload-template="active"] [data-upload-template-guide-dismiss]:hover { background: #ece6fa; }
html[data-upload-template="active"] [data-upload-template-guide-dismiss]:focus-visible { outline: 2px solid var(--upload-template-purple); outline-offset: 3px; }
html[data-upload-template="active"] .workspace-upload-reconnect-summary { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: center; }
html[data-upload-template="active"] .workspace-upload-reconnect-summary.has-cover { grid-template-columns: 112px minmax(0, 1fr); }
html[data-upload-template="active"] .workspace-upload-reconnect-summary [data-saved-draft-cover] { width: 112px; height: 112px; object-fit: contain; border-radius: 16px; background: #f0eaf8; }
html[data-upload-template="active"] [data-upload-reconnect-match-title] { color: #7047ce; font-size: clamp(1.7rem, 4vw, 2.35rem); font-weight: 800; line-height: 1.1; }
html[data-upload-template="active"] .workspace-upload-reconnect-checklist { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
html[data-upload-template="active"] .workspace-upload-reconnect-checklist li { display: grid; grid-template-columns: 26px minmax(0, 1fr); align-items: start; gap: 11px; color: #42364e; font-size: 1rem; line-height: 1.45; }
html[data-upload-template="active"] .workspace-upload-reconnect-checklist li > span:first-child { display: grid; place-items: center; min-height: 26px; border-radius: 50%; background: #e6f5ef; color: #216c54; font-size: 17px; font-weight: 900; }
html[data-upload-template="active"] .workspace-upload-reconnect-checklist li[data-state="needed"] > span:first-child { background: #ffedf0; color: #a92846; }
html[data-upload-template="active"] .workspace-upload-reconnect-checklist li[data-state="pending"] > span:first-child { background: #eeedf1; color: #60596b; }
@media (min-width: 1000px) {
  html[data-upload-template="active"] .workspace-upload-reconnect-checklist { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; }
}
html[data-upload-template="active"] .workspace-upload-reconnect-dialog:has([data-upload-reconnect-checklist]:not([hidden])) .workspace-upload-reconnect-progress { grid-template-columns: 82px fit-content(540px); justify-content: center; align-items: center; gap: 18px; padding: 20px; text-align: left; }
html[data-upload-template="active"] .workspace-upload-reconnect-dialog:has([data-upload-reconnect-checklist]:not([hidden])) .workspace-upload-reconnect-progress > i { display: grid; width: 82px; height: 82px; flex-basis: 82px; }
html[data-upload-template="active"] .workspace-upload-reconnect-dialog:has([data-upload-reconnect-checklist]:not([hidden])) .workspace-upload-reconnect-progress > span { width: 100%; justify-self: stretch; justify-items: start; }
html[data-upload-template="active"] .workspace-upload-reconnect-progress-heading { display: flex; align-items: center; gap: 10px; min-width: 0; }
html[data-upload-template="active"] .workspace-upload-reconnect-dialog[data-mode="success"] [data-upload-draft-reconnect-progress-title] { color: #261d30; font-size: clamp(1.45rem, 2.8vw, 2.15rem); font-weight: 850; line-height: 1.05; }
html[data-upload-template="active"] [data-upload-draft-reconnect-progress-info] { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; padding: 0; border: 1px solid #8d72dc; border-radius: 50%; color: #6841d6; background: #fff; font-size: .78rem; font-weight: 900; cursor: pointer; }
html[data-upload-template="active"] [data-upload-draft-reconnect-progress-info][hidden] { display: none; }
html[data-upload-template="active"] [data-upload-draft-reconnect-progress-info]:hover,
html[data-upload-template="active"] [data-upload-draft-reconnect-progress-info][aria-expanded="true"] { color: #fff; background: #6841d6; }
html[data-upload-template="active"] [data-upload-draft-reconnect-progress-info]:focus-visible { outline: 2px solid #6841d6; outline-offset: 3px; }
html[data-upload-template="active"] .workspace-upload-reconnect-dialog[data-mode="success"] [data-upload-draft-reconnect-progress-detail]:not([hidden]) { display: block; margin-top: 10px; padding: 10px 12px; border: 1px solid rgba(104, 65, 214, .18); border-radius: 11px; color: #5f5368; background: #f7f3fc; }
html[data-upload-template="active"] [data-upload-artist-image-panel] > header > .has-summary-preview { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 4px 14px; align-items: center; min-width: 0; }
html[data-upload-template="active"] .has-summary-preview > .workspace-upload-artist-image-summary-preview { grid-column: 1; grid-row: 1 / span 2; }
html[data-upload-template="active"] .has-summary-preview > :is(strong, small) { grid-column: 2; min-width: 0; }
html[data-upload-template="active"] .workspace-upload-artist-image-summary-preview { display: block; width: 64px; height: 64px; flex: 0 0 64px; border: 3px solid var(--upload-artist-ring, transparent); border-radius: 50%; overflow: hidden; background: #efeaf8; }
html[data-upload-template="active"] .workspace-upload-artist-image-summary-preview img { display: block; width: 100%; height: 100%; object-fit: cover; transform: scale(var(--upload-artist-zoom, 1)); }
html[data-upload-template="active"] [data-upload-artist-image-panel][data-editing="true"] [data-upload-artist-image-summary-preview] { display: none !important; }
html[data-upload-template="active"] .upload-template-saved-results { width: min(800px, 92vw); max-height: 86dvh; overflow: hidden; border: 1px solid #ded3ef; border-top: 5px solid #7951d5; border-radius: 24px; padding: 0; color: #2d2338; background: #fffdfb; }
html[data-upload-template="active"] .upload-template-saved-results[open] { display: flex; flex-direction: column; }
html[data-upload-template="active"] .upload-template-saved-results::backdrop { background: #21132b99; }
html[data-upload-template="active"] .upload-template-saved-results > header { display: flex; flex: 0 0 auto; align-items: start; justify-content: space-between; gap: 18px; padding: 22px 26px 18px; border-bottom: 1px solid #e3dced; background: #fffdfb; }
html[data-upload-template="active"] .upload-template-saved-results-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 26px 26px; }
html[data-upload-template="active"] .upload-template-saved-results h2 { margin: 0; font-size: 1.65rem; }
html[data-upload-template="active"] .upload-template-saved-results h3 { font-size: 1.1rem; margin: 18px 0 8px; }
html[data-upload-template="active"] .upload-template-saved-results [data-upload-template-read-results-close] { flex: 0 0 44px; min-width: 44px; min-height: 44px; border: 1px solid #d9cce9; border-radius: 999px; color: #644196; background: #fff; cursor: pointer; }
html[data-upload-template="active"] .upload-template-saved-results :is(article, details) { margin-top: 16px; padding: 16px; border: 1px solid #e3dced; border-radius: 15px; background: #faf7ff; }
html[data-upload-template="active"] .upload-template-saved-results summary { font-weight: 750; cursor: pointer; }
html[data-upload-template="active"] .upload-template-saved-results summary small { display: block; margin-top: 4px; font-weight: 500; line-height: 1.4; }
html[data-upload-template="active"] .upload-template-saved-results :is(p, blockquote) { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; }
html[data-upload-template="active"] .upload-template-saved-results .readonly-note { padding: 12px 16px; border-radius: 12px; color: #644577; background: #f2edf9; }
@media (max-width: 600px) {
  html[data-upload-template="active"] .workspace-upload-reconnect-dialog .workspace-upload-dialog-shell { padding: 22px 18px; gap: 16px; }
  html[data-upload-template="active"] .workspace-upload-reconnect-dialog:has([data-upload-reconnect-checklist]:not([hidden])) .workspace-upload-reconnect-progress { grid-template-columns: 70px minmax(0, 1fr); gap: 12px; padding: 15px 10px; }
  html[data-upload-template="active"] .workspace-upload-reconnect-dialog:has([data-upload-reconnect-checklist]:not([hidden])) .workspace-upload-reconnect-progress > i { width: 70px; height: 70px; flex-basis: 70px; }
  html[data-upload-template="active"] .workspace-upload-reconnect-dialog[data-mode="success"] [data-upload-draft-reconnect-progress-title] { font-size: clamp(1.2rem, 6vw, 1.55rem); }
  html[data-upload-template="active"] [data-upload-draft-reconnect-progress-info] { width: 32px; height: 32px; flex-basis: 32px; }
  html[data-upload-template="active"] .upload-template-saved-results > header { padding: 18px 16px 14px; gap: 12px; }
  html[data-upload-template="active"] .upload-template-saved-results-body { padding: 0 16px 18px; }
  html[data-upload-template="active"] .workspace-upload-reconnect-summary.has-cover { grid-template-columns: 88px minmax(0, 1fr); gap: 14px; }
  html[data-upload-template="active"] .workspace-upload-reconnect-summary [data-saved-draft-cover] { width: 88px; height: 88px; }
  html[data-upload-template="active"] .workspace-upload-reconnect-dialog footer { display: flex; flex-direction: column; flex-wrap: nowrap; height: auto; gap: 10px; }
  html[data-upload-template="active"] .workspace-upload-reconnect-dialog footer button { flex: 0 0 auto; width: 100%; min-height: 48px; }
  html[data-upload-template="active"] [data-upload-artist-image-panel] > header { align-items: start; flex-wrap: wrap; }
}

/* Task 634 phase content: the stage remains wide, but only one primary surface is in flow. */
html[data-upload-template="active"] [data-upload-template-panel="1"][data-upload-template-upload-phase] {
  display: block;
  overflow-x: clip;
}

html[data-upload-template="active"] [data-upload-template-panel="1"] [data-upload-template-view] {
  grid-area: auto;
}

/* Task 637: compact track ordering, precise drag placement, and readable analysis. */
html[data-upload-template="active"] .upload-template-track-row:not(.is-review) {
  position: relative;
  grid-template-columns: 52px 44px 40px minmax(0, 1fr) auto;
  overflow: visible;
  scroll-margin-block: var(--upload-template-track-inset, 190px) 110px;
  transition: border-color .16s ease, box-shadow .16s ease, opacity .16s ease, transform .16s ease;
}

html[data-upload-template="active"] .upload-template-track-grip {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 9px;
  color: #776c80;
  background: transparent;
  font-size: 1.12rem;
  line-height: 1;
  cursor: grab;
  user-select: none;
}

html[data-upload-template="active"] .upload-template-track-grip:hover,
html[data-upload-template="active"] .upload-template-track-grip:focus-visible {
  color: var(--upload-template-purple-dark);
  background: #f1ecfa;
  outline: 2px solid rgba(115, 80, 230, .22);
  outline-offset: 1px;
}

html[data-upload-template="active"] .upload-template-track-grip:active {
  cursor: grabbing;
}

html[data-upload-template="active"] .upload-template-track-row.is-dragging {
  opacity: .42;
  transform: scale(.995);
}

html[data-upload-template="active"] .upload-template-track-row.is-drop-before::before,
html[data-upload-template="active"] .upload-template-track-row.is-drop-after::after {
  position: absolute;
  z-index: 8;
  right: 10px;
  left: 10px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #6841d6, #4ea8eb);
  box-shadow: 0 0 0 4px rgba(104, 65, 214, .12);
  content: "";
  pointer-events: none;
}

html[data-upload-template="active"] .upload-template-track-row.is-drop-before::before {
  top: -8px;
}

html[data-upload-template="active"] .upload-template-track-row.is-drop-after::after {
  bottom: -8px;
}

html[data-upload-template="active"] .upload-template-track-row .upload-template-track-actions {
  flex-wrap: nowrap;
}

html[data-upload-template="active"] .upload-template-compact-tracklist {
  overflow: visible;
}

html[data-upload-template="active"] .upload-template-track-menu-wrap {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  overflow: visible !important;
  color: inherit !important;
  font-size: inherit !important;
  text-transform: none !important;
}

html[data-upload-template="active"] .upload-template-track-row .upload-template-track-menu-trigger {
  display: grid;
  place-items: center;
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 0 4px;
  color: #352c3a;
  background: #f3eff7;
  font-size: 1.35rem;
  letter-spacing: 0;
  line-height: 1;
}

html[data-upload-template="active"] .upload-template-track-row .upload-template-track-menu-trigger[aria-expanded="true"] {
  color: #fff;
  background: #6841d6;
}

html[data-upload-template="active"] .upload-template-track-menu,
html[data-upload-template="active"] .upload-template-track-move-menu {
  position: absolute;
  z-index: 40;
  display: grid;
  min-width: 210px;
  padding: 7px;
  overflow: visible !important;
  border: 1px solid #ddd5e5;
  border-radius: 14px;
  color: #251e29 !important;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 18px 48px rgba(34, 24, 42, .2), 0 3px 10px rgba(34, 24, 42, .09);
  font-size: .8rem !important;
  text-transform: none !important;
}

html[data-upload-template="active"] .upload-template-track-menu {
  top: calc(100% + 8px);
  right: 0;
}

html[data-upload-template="active"] .upload-template-track-menu.is-open-up {
  top: auto;
  bottom: calc(100% + 8px);
}

html[data-upload-template="active"] .upload-template-track-move-menu {
  top: calc(100% + 8px);
  right: 0;
  min-width: 224px;
}

html[data-upload-template="active"] .upload-template-track-move-menu.is-open-up {
  top: auto;
  bottom: calc(100% + 8px);
}

html[data-upload-template="active"] .upload-template-track-menu[hidden],
html[data-upload-template="active"] .upload-template-track-move-menu[hidden] {
  display: none !important;
}

html[data-upload-template="active"] .upload-template-track-row .upload-template-track-menu button,
html[data-upload-template="active"] .upload-template-track-row .upload-template-track-move-menu button {
  justify-content: flex-start;
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 9px;
  color: #302736;
  background: transparent;
  font-size: .76rem;
  text-align: left;
}

html[data-upload-template="active"] .upload-template-track-row .upload-template-track-menu > button {
  justify-content: space-between;
}

html[data-upload-template="active"] .upload-template-track-move-heading {
  padding: 7px 10px 9px;
  border-bottom: 1px solid #ebe6ef;
  color: #655a69;
  font-size: .66rem;
  font-weight: 950;
  letter-spacing: .06em;
  text-transform: uppercase;
}

html[data-upload-template="active"] .upload-template-track-row .upload-template-track-menu button:hover,
html[data-upload-template="active"] .upload-template-track-row .upload-template-track-menu button:focus-visible,
html[data-upload-template="active"] .upload-template-track-row .upload-template-track-move-menu button:hover,
html[data-upload-template="active"] .upload-template-track-row .upload-template-track-move-menu button:focus-visible {
  color: #4e2db2;
  background: #f0eafa;
}

html[data-upload-template="active"] .upload-template-track-row .upload-template-track-menu button:disabled,
html[data-upload-template="active"] .upload-template-track-row .upload-template-track-move-menu button:disabled {
  color: #aaa2ad;
  background: transparent;
  cursor: not-allowed;
  opacity: 1;
}

html[data-upload-template="active"] .upload-template-track-position-picker {
  display: grid;
  gap: 6px;
  margin-top: 5px;
  padding: 10px;
  border-top: 1px solid #ebe6ef;
  color: #736a77 !important;
  font-size: .66rem !important;
  font-weight: 850;
  letter-spacing: .02em;
  text-transform: none !important;
}

html[data-upload-template="active"] .upload-template-track-position-picker > span {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  color: inherit !important;
  font-size: inherit !important;
  text-transform: none !important;
}

html[data-upload-template="active"] .upload-template-track-position-picker select {
  min-height: 36px;
  padding: 6px 28px 6px 9px;
  border: 1px solid #cbc2d3;
  border-radius: 9px;
  color: #2d2531;
  background: #fff;
  font: inherit;
}

html[data-upload-template="active"] .upload-template-track-row .upload-template-track-position-picker button {
  width: auto;
  min-height: 36px;
  color: #fff;
  background: #6841d6;
}

html[data-upload-template="active"] .upload-template-order-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  overflow: visible !important;
  color: inherit !important;
  font-size: inherit !important;
  text-transform: none !important;
}

html[data-upload-template="active"] .upload-template-upload-summary .is-save-order {
  border-color: #b6e4d5;
  color: #176b58;
  background: #e4f7f0;
}

html[data-upload-template="active"] .upload-template-analysis-host [data-upload-details-assistant] {
  color: #241d29;
  background: linear-gradient(125deg, #f7f3ff 0%, #fff 55%, #f3fbf8 100%);
}

html[data-upload-template="active"] .upload-template-analysis-host [data-upload-details-assistant] > header,
html[data-upload-template="active"] .upload-template-analysis-host [data-upload-details-assistant] > header strong,
html[data-upload-template="active"] .upload-template-analysis-host [data-upload-details-assistant] > header span {
  color: #241d29;
}

html[data-upload-template="active"] .upload-template-analysis-host [data-upload-details-assistant] > header small {
  color: #655b69;
}

html[data-upload-template="active"] .upload-template-analysis-host [data-upload-details-assistant] :where(p, small, span) {
  color: #655b69;
}

html[data-upload-template="active"] .upload-template-analysis-host [data-upload-details-assistant] :where(h2, h3, h4, strong) {
  color: #241d29;
}

@media (max-width: 780px) {
  html[data-upload-template="active"] .upload-template-track-row:not(.is-review) {
    grid-template-columns: 42px 44px 36px minmax(0, 1fr);
  }

  html[data-upload-template="active"] .upload-template-track-row .upload-template-track-actions {
    grid-column: 2 / -1;
    padding-left: 0;
  }

  html[data-upload-template="active"] .upload-template-order-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

html[data-upload-template="active"] .upload-template-notice-host:not(:empty) {
  margin-bottom: 16px;
}

html[data-upload-template="active"] .upload-template-receive-assurance,
html[data-upload-template="active"] .upload-template-ready-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-width: 0;
  margin-top: 16px;
  padding: 16px 18px;
  border: 1px solid #dcd5e8;
  border-radius: 18px;
  background: rgba(255, 255, 255, .86);
  color: var(--upload-template-ink);
}

html[data-upload-template="active"] .upload-template-receive-assurance > span,
html[data-upload-template="active"] .upload-template-ready-card > span {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e4f7f0;
  color: #176b58;
  font-weight: 950;
}

html[data-upload-template="active"] .upload-template-receive-assurance > div,
html[data-upload-template="active"] .upload-template-ready-card > div {
  min-width: 0;
}

html[data-upload-template="active"] .upload-template-receive-assurance strong,
html[data-upload-template="active"] .upload-template-receive-assurance small,
html[data-upload-template="active"] .upload-template-ready-card strong,
html[data-upload-template="active"] .upload-template-ready-card small {
  display: block;
}

html[data-upload-template="active"] .upload-template-receive-assurance small,
html[data-upload-template="active"] .upload-template-ready-card small {
  margin-top: 3px;
  color: var(--upload-template-muted);
}

html[data-upload-template="active"] .upload-template-ready-card {
  justify-content: flex-start;
  border-color: #b6e4d5;
  background: linear-gradient(105deg, #f7fffc, #f3fbff);
}

html[data-upload-template="active"] .upload-template-ready-card > div:last-child {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  margin-left: auto;
}

html[data-upload-template="active"] .upload-template-ready-card button {
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--upload-template-purple);
  border-radius: 999px;
  background: #fff;
  color: var(--upload-template-purple-dark);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

html[data-upload-template="active"] .upload-template-selected-tracks {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-top: 18px;
}

html[data-upload-template="active"] .upload-template-selected-tracks[hidden] {
  display: none !important;
}

html[data-upload-template="active"] [data-upload-template-analyze]:disabled {
  border-color: #d4cfda;
  background: #eeeaf1;
  color: #5c5262;
  box-shadow: none;
  cursor: default;
}

@media (max-width: 780px) {
  html[data-upload-template="active"] .upload-template-receive-assurance,
  html[data-upload-template="active"] .upload-template-ready-card {
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 14px;
  }

  html[data-upload-template="active"] .upload-template-ready-card > div:last-child {
    width: 100%;
    margin-left: 0;
  }

  html[data-upload-template="active"] .upload-template-ready-card button {
    flex: 1 1 150px;
  }
}

@media (max-width: 620px) {
  html[data-upload-template="active"] .workspace-upload-stage > .preview-section-inner,
  html[data-upload-template="active"] .workspace-upload-stage .preview-section-inner {
    width: calc(100% - 20px);
  }

  html[data-upload-template="active"] [data-upload-workflow-panel],
  html[data-upload-template="active"] .upload-template-panel {
    margin-bottom: 14px;
    padding: 22px 16px;
    border-radius: 22px;
  }

  html[data-upload-template="active"] .upload-template-stage-heading {
    margin-bottom: 22px;
  }

  html[data-upload-template="active"] .upload-template-stage-heading h1,
  html[data-upload-template="active"] .upload-template-stage-heading h2 {
    font-size: clamp(2rem, 10vw, 2.45rem);
  }

  html[data-upload-template="active"] .upload-template-stage-heading p {
    font-size: .96rem;
  }

  html[data-upload-template="active"] [data-upload-dropzone] {
    min-height: 340px;
    padding: 140px 18px 28px;
  }

  html[data-upload-template="active"] .upload-template-entry-actions {
    top: 32px;
    gap: 10px;
  }

  html[data-upload-template="active"] .upload-template-entry-choice {
    width: 78px;
    height: 78px;
    border-radius: 22px;
  }

  html[data-upload-template="active"] .upload-template-entry-choice svg {
    width: 36px;
    height: 36px;
  }

  html[data-upload-template="active"] [data-upload-dropzone] .workspace-upload-drop-icon,
  html[data-upload-template="active"] [data-upload-dropzone] .upload-template-file-icon {
    width: 82px;
    height: 82px;
    border-radius: 23px;
  }

  html[data-upload-template="active"] .upload-template-evidence-grid,
  html[data-upload-template="active"] .upload-template-destination-grid,
  html[data-upload-template="active"] .upload-template-territory-list {
    grid-template-columns: 1fr;
  }

  html[data-upload-template="active"] .upload-template-territory-card {
    grid-column: auto;
  }

  html[data-upload-template="active"] .upload-template-territory-head {
    align-items: flex-start;
    flex-direction: column;
  }

  html[data-upload-template="active"] .upload-template-track-row {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
  }

  html[data-upload-template="active"] .upload-template-track-row > :first-child,
  html[data-upload-template="active"] .upload-template-track-row > b:first-child {
    width: 38px;
    height: 38px;
  }

  html[data-upload-template="active"] .upload-template-track-row .upload-template-track-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
    padding-left: 48px;
  }

  html[data-upload-template="active"] .upload-template-package-shell {
    max-height: none;
    border-radius: 22px;
  }

  html[data-upload-template="active"] .upload-template-package-shell [data-upload-discovery],
  html[data-upload-template="active"] .upload-template-package-shell .workspace-package-scan {
    padding: 22px 14px 28px;
  }

  html[data-upload-template="active"] .upload-template-field-card,
  html[data-upload-template="active"] .upload-template-panel .upload-template-card,
  html[data-upload-template="active"] .upload-template-destination-card,
  html[data-upload-template="active"] .upload-template-territory-card,
  html[data-upload-template="active"] .upload-template-review-details {
    padding: 19px 16px;
    border-radius: 18px;
  }

  html[data-upload-template="active"] .upload-template-review-tracklist > header {
    align-items: flex-start;
    flex-direction: column;
  }

  html[data-upload-template="active"] .workspace-upload-workflow-actions {
    bottom: max(8px, env(safe-area-inset-bottom));
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 10px;
  }

  html[data-upload-template="active"] .workspace-upload-workflow-actions > span,
  html[data-upload-template="active"] .workspace-upload-workflow-actions .workspace-upload-workflow-status {
    grid-column: 1 / -1;
    grid-row: 1;
    font-size: .82rem;
  }

  html[data-upload-template="active"] .workspace-upload-workflow-actions button {
    grid-row: 2;
    min-width: 0;
    width: 100%;
    padding-inline: 13px;
  }

  html[data-upload-template="active"] .workspace-upload-workflow-actions [data-upload-next],
  html[data-upload-template="active"] .workspace-upload-workflow-actions .workspace-upload-next,
  html[data-upload-template="active"] .workspace-upload-workflow-actions button:last-child:not(:only-child) {
    min-width: 0;
  }
}

@media (max-width: 420px) {
  html[data-upload-template="active"] .upload-template-flow {
    border-radius: 16px;
  }

  html[data-upload-template="active"] .upload-template-flow button,
  html[data-upload-template="active"] .upload-template-flow [role="tab"] {
    min-height: 46px;
    padding-inline: 1px;
  }

  html[data-upload-template="active"] .upload-template-flow button > span,
  html[data-upload-template="active"] .upload-template-flow [role="tab"] > span {
    font-size: .61rem;
  }

  html[data-upload-template="active"] .upload-template-upload-summary {
    gap: 12px 8px;
    padding: 14px;
  }

  html[data-upload-template="active"] .upload-template-upload-summary b,
  html[data-upload-template="active"] .upload-template-upload-summary strong {
    font-size: 1.28rem;
  }

  html[data-upload-template="active"] .upload-template-review-details h2 {
    font-size: 1.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html[data-upload-template="active"] *,
  html[data-upload-template="active"] *::before,
  html[data-upload-template="active"] *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Production-backed template shell compatibility. */
html[data-upload-template="active"] .upload-template-app {
  width: 100%;
}

html[data-upload-template="active"] .upload-template-core-storage {
  display: none !important;
}

html[data-upload-template="active"] .upload-template-allowance-host {
  width: 100%;
}

html[data-upload-template="active"] .workspace-upload-entitlement-meter > i {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--upload-template-mint), #78d8e4);
}

html[data-upload-template="active"] [data-upload-dropzone] > span:not(.upload-template-file-icon) {
  color: var(--upload-template-muted);
}

html[data-upload-template="active"] [data-upload-dropzone] > small {
  color: var(--upload-template-purple);
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 3px;
}

html[data-upload-template="active"] [data-upload-dropzone] > .upload-template-browse-line {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 5px;
  font-size: 1.2rem;
  line-height: 1.4;
  text-decoration: none;
}

html[data-upload-template="active"] [data-upload-dropzone] .upload-template-browse-action {
  display: inline;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--upload-template-purple);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
}

html[data-upload-template="active"] [data-upload-dropzone] .upload-template-browse-action:disabled {
  cursor: not-allowed;
}

html[data-upload-template="active"] [data-upload-dropzone] .upload-template-browse-info {
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: var(--upload-template-purple-dark);
  background: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

html[data-upload-template="active"] [data-upload-dropzone] .upload-template-browse-info:focus-visible,
html[data-upload-template="active"] [data-upload-dropzone] .upload-template-browse-action:focus-visible {
  outline: 3px solid #7654df;
  outline-offset: 3px;
}

html[data-upload-template="active"] .upload-template-track-row {
  grid-template-columns: 52px 40px minmax(0, 1fr) auto;
}

html[data-upload-template="active"] .upload-template-track-row > span {
  min-width: 0;
}

html[data-upload-template="active"] .upload-template-track-row em {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--upload-template-purple-dark);
  font-size: .74rem;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-upload-template="active"] .upload-template-track-row > .upload-template-play {
  display: grid;
  place-items: center;
  width: 36px;
  min-height: 36px;
  padding: 0;
  color: var(--upload-template-purple);
}

html[data-upload-template="active"] .upload-template-track-row.is-review {
  grid-template-columns: 52px minmax(0, 1fr) auto;
}

html[data-upload-template="active"] .upload-template-evidence {
  margin-top: 22px;
}

html[data-upload-template="active"] .upload-template-evidence > header,
html[data-upload-template="active"] .upload-template-analysis > header,
html[data-upload-template="active"] .upload-template-compact-tracklist > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

html[data-upload-template="active"] .upload-template-evidence > header > span,
html[data-upload-template="active"] .upload-template-analysis > header > span,
html[data-upload-template="active"] .upload-template-compact-tracklist > header > span {
  min-width: 0;
}

html[data-upload-template="active"] .upload-template-evidence > header strong,
html[data-upload-template="active"] .upload-template-evidence > header small,
html[data-upload-template="active"] .upload-template-analysis > header strong,
html[data-upload-template="active"] .upload-template-analysis > header small,
html[data-upload-template="active"] .upload-template-compact-tracklist > header strong,
html[data-upload-template="active"] .upload-template-compact-tracklist > header small {
  display: block;
}

html[data-upload-template="active"] .upload-template-evidence > header strong,
html[data-upload-template="active"] .upload-template-analysis > header strong,
html[data-upload-template="active"] .upload-template-compact-tracklist > header strong {
  font-size: 1.25rem;
  font-weight: 900;
}

html[data-upload-template="active"] .upload-template-evidence > header small,
html[data-upload-template="active"] .upload-template-analysis > header small,
html[data-upload-template="active"] .upload-template-compact-tracklist > header small {
  margin-top: 3px;
  color: var(--upload-template-muted);
}

html[data-upload-template="active"] .upload-template-evidence > header > div,
html[data-upload-template="active"] .upload-template-compact-tracklist > header > div {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 8px;
}

html[data-upload-template="active"] .upload-template-evidence > header button,
html[data-upload-template="active"] .upload-template-analysis > header button,
html[data-upload-template="active"] .upload-template-compact-tracklist > header button {
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid var(--upload-template-purple);
  border-radius: 999px;
  background: #fff;
  color: var(--upload-template-purple-dark);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

html[data-upload-template="active"] .upload-template-evidence > header button.is-primary,
html[data-upload-template="active"] .upload-template-analysis > header button:not(:disabled) {
  border-color: transparent;
  background: linear-gradient(100deg, #9740ec, #3f9deb);
  color: #fff;
}

html[data-upload-template="active"] .upload-template-analysis > header button:disabled {
  border-color: #ded8e7;
  background: #f1eef5;
  color: #91899a;
  cursor: not-allowed;
}

html[data-upload-template="active"] .upload-template-evidence-grid > article {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

html[data-upload-template="active"] .upload-template-evidence-grid > article > div {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  overflow: hidden;
  border-radius: 14px;
  background: #f0eaff;
  color: var(--upload-template-purple);
  font-size: 1.5rem;
  font-weight: 900;
}

html[data-upload-template="active"] .upload-template-evidence-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

html[data-upload-template="active"] .upload-template-evidence-grid em {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--upload-template-muted);
  font-size: .7rem;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-upload-template="active"] .upload-template-analysis {
  margin-top: 24px;
  padding: 24px;
  border: 1px solid #dcd4ee;
  border-radius: 24px;
  background: linear-gradient(135deg, #faf7ff, #f4ffff);
}

html[data-upload-template="active"] .upload-template-analysis-subjects {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

html[data-upload-template="active"] .upload-template-analysis-subject {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 112px;
  padding: 16px;
  border: 1px solid #dcd6e1;
  border-radius: 18px;
  color: #211c24;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 8px 22px rgba(45, 34, 52, .05);
}

html[data-upload-template="active"] button.upload-template-analysis-subject {
  width: 100%;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

html[data-upload-template="active"] .upload-template-analysis-subject > span:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 3px;
}

html[data-upload-template="active"] .upload-template-analysis-subject-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid #ddd7e2;
  border-radius: 14px;
  color: #17131b;
  background: #f4f2f5;
  font-size: 1.28rem;
  font-weight: 900;
}

html[data-upload-template="active"] .upload-template-analysis-subject small,
html[data-upload-template="active"] .upload-template-analysis-subject strong,
html[data-upload-template="active"] .upload-template-analysis-subject em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-upload-template="active"] .upload-template-analysis-subject small {
  color: #706875;
  font-size: .62rem;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
}

html[data-upload-template="active"] .upload-template-analysis-subject strong {
  font-size: .86rem;
}

html[data-upload-template="active"] .upload-template-analysis-subject em {
  color: #736b77;
  font-size: .68rem;
  font-style: normal;
}

html[data-upload-template="active"] .upload-template-analysis-subject > b {
  align-self: start;
  padding: 6px 9px;
  border: 1px solid #d8d2dc;
  border-radius: 999px;
  color: #5a525e;
  background: #efedf0;
  font-size: .59rem;
  line-height: 1;
  white-space: nowrap;
}

html[data-upload-template="active"] .upload-template-analysis-subject > b.is-clear {
  border-color: #b6e4d5;
  color: #176b58;
  background: #e4f7f0;
}

html[data-upload-template="active"] .upload-template-analysis-subject > b.is-attention {
  border-color: #f2b8c8;
  color: #a32346;
  background: #ffe7ed;
}

html[data-upload-template="active"] .upload-template-analysis-subject > b.is-working {
  border-color: #cbc5ce;
  color: #2f2932;
  background: #e7e4e8;
}

html[data-upload-template="active"] .upload-template-analysis-subject-toggle {
  display: inline-flex;
  grid-column: 2 / -1;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  color: #17131b;
  font-size: .66rem;
  font-weight: 900;
}

html[data-upload-template="active"] .upload-template-analysis-subject-toggle svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  transition: transform .18s ease;
}

html[data-upload-template="active"] .upload-template-analysis-subject.is-track-toggle:hover,
html[data-upload-template="active"] .upload-template-analysis-subject.is-track-toggle:focus-visible,
html[data-upload-template="active"] .upload-template-analysis-subject.is-track-toggle[aria-expanded="true"] {
  border-color: #17131b;
  box-shadow: 0 10px 25px rgba(23, 19, 27, .11);
  outline: none;
}

html[data-upload-template="active"] .upload-template-analysis-subject.is-track-toggle[aria-expanded="true"] .upload-template-analysis-subject-toggle svg {
  transform: rotate(180deg);
}

html[data-upload-template="active"] .upload-template-selected-tracks.is-analysis-disclosure:not([hidden]) {
  margin-top: 16px;
  animation: upload-template-analysis-disclosure-in .2s ease-out both;
}

@keyframes upload-template-analysis-disclosure-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

html[data-upload-template="active"] .upload-template-analysis-host {
  margin-top: 18px;
}

html[data-upload-template="active"] .upload-template-analysis-host [data-upload-details-assistant] {
  margin: 0;
  background: #fff;
}

html[data-upload-template="active"] .upload-template-analysis-host .workspace-upload-details-assistant-action {
  display: none !important;
}

html[data-upload-template="active"] .upload-template-compact-tracklist {
  margin-top: 26px;
  overflow: hidden;
  border: 1px solid var(--upload-template-line);
  border-radius: 20px;
  background: #fff;
}

html[data-upload-template="active"] .upload-template-compact-tracklist > header {
  padding: 18px 20px;
  background: #faf7fd;
}

html[data-upload-template="active"] .upload-template-compact-tracklist .upload-template-track-row {
  border-width: 1px 0 0;
  border-radius: 0;
}

html[data-upload-template="active"] .workspace-upload-details-assistant > header .upload-template-analysis-label {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
}

html[data-upload-template="active"] .workspace-upload-details-assistant > header .upload-template-analysis-label > small {
  margin: 0;
  color: #605a69;
}

html[data-upload-template="active"] .workspace-upload-details-assistant .upload-template-analysis-info {
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  padding: 0;
  border: 1px solid #aca4bb;
  border-radius: 50%;
  color: #453b59;
  background: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  box-shadow: none;
  cursor: pointer;
}

html[data-upload-template="active"] .workspace-upload-details-assistant .upload-template-analysis-info:focus-visible {
  outline: 3px solid #7654df;
  outline-offset: 3px;
}

html[data-upload-template="active"] .upload-template-info-popover {
  position: fixed;
  z-index: 12000;
  inset: auto;
  top: 12px;
  left: 0;
  box-sizing: border-box;
  width: min(380px, calc(100vw - 24px));
  margin: 0;
  padding: 18px;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #413949;
  border-radius: 16px;
  background: #17131f;
  color: #fff;
  font-size: .875rem;
  font-weight: 400;
  line-height: 1.55;
  box-shadow: 0 18px 44px rgba(23, 19, 31, .24);
}

html[data-upload-template="active"] .upload-template-info-popover::backdrop { background: transparent; }

html[data-upload-template="active"] .upload-template-info-popover > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0;
  margin: 0 0 10px;
  background: none;
}

html[data-upload-template="active"] .upload-template-info-popover strong { color: #fff; font-size: .95rem; }

html[data-upload-template="active"] .upload-template-info-popover p {
  margin: 0;
  color: #f2edf7;
  font-size: .875rem;
  line-height: 1.55;
}

html[data-upload-template="active"] .upload-template-info-popover > header > button {
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  min-width: 32px;
  padding: 0;
  border: 1px solid #7b718c;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

html[data-upload-template="active"] .upload-template-info-popover > header > button:focus-visible {
  outline: 2px solid #cbb9ff;
  outline-offset: 3px;
}

html[data-upload-template="active"] .upload-template-card-kicker {
  display: block;
  margin-bottom: 16px;
  color: var(--upload-template-purple);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
}

html[data-upload-template="active"] .upload-template-field-card > small {
  display: block;
  margin-top: 12px;
  color: var(--upload-template-muted);
}

html[data-upload-template="active"] .upload-template-quick-dates,
html[data-upload-template="active"] .upload-template-segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 14px 0 18px;
}

html[data-upload-template="active"] .upload-template-segmented button {
  min-height: 42px;
  padding: 10px 17px;
  border: 1px solid #d9d2e2;
  border-radius: 999px;
  background: #fff;
  color: var(--upload-template-ink);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

html[data-upload-template="active"] .upload-template-segmented button[aria-pressed="true"] {
  border-color: var(--upload-template-purple);
  background: var(--upload-template-purple);
  color: #fff;
}

html[data-upload-template="active"] .upload-template-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

html[data-upload-template="active"] .upload-template-switch span,
html[data-upload-template="active"] .upload-template-switch strong,
html[data-upload-template="active"] .upload-template-switch small {
  display: block;
}

html[data-upload-template="active"] .upload-template-switch small {
  margin-top: 3px;
  color: var(--upload-template-muted);
  font-weight: 500;
}

html[data-upload-template="active"] .upload-template-switch input {
  flex: 0 0 auto;
  width: 48px;
  height: 26px;
  accent-color: var(--upload-template-purple);
}

html[data-upload-template="active"] .upload-template-service-card.is-concept {
  border-style: dashed;
  background: linear-gradient(135deg, #f5f0ff, #eef9ff);
  cursor: not-allowed;
}

html[data-upload-template="active"] .upload-template-service-card.is-concept::after {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e6def8;
  color: #6546bd;
  content: "NOT ACTIVE";
  font-size: .62rem;
  font-weight: 900;
  letter-spacing: .05em;
}

html[data-upload-template="active"] .upload-template-policy-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 22px;
  padding: 15px 17px;
  border-left: 4px solid var(--upload-template-purple);
  background: #f0ebff;
}

html[data-upload-template="active"] .upload-template-policy-note strong {
  flex: 0 0 auto;
  color: var(--upload-template-purple-dark);
}

html[data-upload-template="active"] .upload-template-territory-card {
  margin-top: 18px;
}

html[data-upload-template="active"] .upload-template-territory-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

html[data-upload-template="active"] .upload-template-territory-card > header span,
html[data-upload-template="active"] .upload-template-territory-card > header strong,
html[data-upload-template="active"] .upload-template-territory-card > header small {
  display: block;
}

html[data-upload-template="active"] .upload-template-territory-card > header small,
html[data-upload-template="active"] .upload-template-territory-card > p {
  margin-top: 4px;
  color: var(--upload-template-muted);
}

html[data-upload-template="active"] .upload-template-territory-card > header button {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 10px 17px;
  border: 1px solid var(--upload-template-purple);
  border-radius: 999px;
  background: #fff;
  color: var(--upload-template-purple-dark);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

html[data-upload-template="active"] .upload-template-territory-list span,
html[data-upload-template="active"] .upload-template-territory-list small {
  display: block;
  min-width: 0;
}

html[data-upload-template="active"] .upload-template-territory-list small {
  color: var(--upload-template-muted);
  font-size: .68rem;
}

html[data-upload-template="active"] .upload-template-review-details h3 {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1.05;
}

html[data-upload-template="active"] .upload-template-review-details > p {
  grid-column: 1 / -1;
  margin: 4px 0 16px;
  color: var(--upload-template-muted);
}

html[data-upload-template="active"] .upload-template-policy-host,
html[data-upload-template="active"] .upload-template-review-core {
  margin-top: 24px;
}

html[data-upload-template="active"] .upload-template-revision-disclosure > summary {
  width: max-content;
  max-width: 100%;
  padding: 4px 0;
  color: var(--upload-template-purple-dark);
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

html[data-upload-template="active"] .upload-template-revision-disclosure > header,
html[data-upload-template="active"] .upload-template-revision-disclosure > div {
  margin-top: 14px;
}

html[data-upload-template="active"] .upload-template-field-invalid input {
  border-color: #c0324f !important;
  background: #fff3cb !important;
  animation: upload-template-invalid-pulse .65s ease-in-out 2;
}

html[data-upload-template="active"] .upload-template-field-validation {
  display: block;
  margin-top: 6px;
  color: #a4213b !important;
  font-size: .72rem;
  font-weight: 800 !important;
}

html[data-upload-template="active"] .upload-template-form-error {
  flex-direction: column;
}

html[data-upload-template="active"] .upload-template-package-shell > header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--upload-template-line);
  border-radius: 28px 28px 0 0;
  background: var(--upload-template-paper);
}

html[data-upload-template="active"] .upload-template-package-shell > header h2 {
  flex: 1;
  margin: 0;
  font-size: 1.15rem;
  text-align: center;
  outline: none;
}

html[data-upload-template="active"] .upload-template-package-back {
  padding: 12px 18px;
  border: 0;
  border-radius: 999px;
  background: #f1edf8;
  color: var(--upload-template-ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

html[data-upload-template="active"] .upload-template-package-back:focus-visible {
  outline: 3px solid var(--upload-template-purple);
  outline-offset: 3px;
}

@media (max-width: 600px) {
  html[data-upload-template="active"] .upload-template-package-shell > header {
    gap: 8px;
    padding: 12px;
  }
  html[data-upload-template="active"] .upload-template-package-shell > header h2 {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
}

html[data-upload-template="active"] .upload-template-package-shell > header span,
html[data-upload-template="active"] .upload-template-package-shell > header strong,
html[data-upload-template="active"] .upload-template-package-shell > header small {
  display: block;
}

html[data-upload-template="active"] .upload-template-package-shell > header small {
  color: var(--upload-template-muted);
}

html[data-upload-template="active"] .upload-template-package-close {
  position: static;
  float: none;
  flex: 0 0 auto;
  margin: 0;
}

html[data-upload-template="active"] .upload-template-actions {
  position: sticky;
  bottom: 16px;
  z-index: 44;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  width: 100%;
  margin: 0;
  padding: 14px 18px;
  border: 1px solid #ddd6e8;
  border-radius: 22px;
  background: rgba(255, 254, 250, .97);
  box-shadow: var(--upload-template-shadow);
  backdrop-filter: blur(16px);
}

html[data-upload-template="active"] .upload-template-actions > span {
  min-width: 0;
  color: var(--upload-template-muted);
  text-align: center;
}

html[data-upload-template="active"] .upload-template-actions button {
  min-height: 46px;
  padding: 11px 20px;
  border: 1px solid #d9d1e1;
  border-radius: 999px;
  background: #fff;
  color: var(--upload-template-ink);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

html[data-upload-template="active"] .upload-template-actions button:disabled {
  opacity: .42;
  cursor: not-allowed;
}

html[data-upload-template="active"] .upload-template-actions button.is-primary {
  min-width: 220px;
  border-color: transparent;
  background: linear-gradient(100deg, #9740ec, #3f9deb);
  color: #fff;
}

/* Keep the next requirement visible without starting work on the user's behalf. */
html[data-upload-template="active"] .upload-template-guidance {
  position: sticky;
  top: var(--upload-template-guidance-top, 190px);
  z-index: 46;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto 36px;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid #dca65b;
  border-radius: 18px;
  background: #fffbf2;
  color: #33291d;
  box-shadow: 0 12px 36px rgba(31, 22, 43, .13);
}
html[data-upload-template="active"] .upload-template-guidance[hidden] { display: none; }
html[data-upload-template="active"] .upload-template-guidance[data-guidance-tone="attention"] {
  border-color: #bd5867;
  background: #fff5f6;
  color: #722b38;
}
html[data-upload-template="active"] .upload-template-guidance-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-weight: 900;
}
html[data-upload-template="active"] .upload-template-guidance-copy { min-width: 0; }
html[data-upload-template="active"] .upload-template-guidance-copy strong { color: inherit; font-size: 1rem; }
html[data-upload-template="active"] .upload-template-guidance-copy p {
  margin: 5px 0 0;
  color: inherit;
  font-size: .9rem;
  line-height: 1.45;
  font-weight: 400;
}
html[data-upload-template="active"] .upload-template-guidance button {
  min-height: 40px;
  border: 1px solid #c8bbab;
  border-radius: 999px;
  padding: 9px 16px;
  background: #fff;
  color: #29212f;
  font: inherit;
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
}
html[data-upload-template="active"] .upload-template-guidance button[hidden] { display: none; }
html[data-upload-template="active"] .upload-template-guidance .upload-template-guidance-dismiss {
  grid-column: 4;
  padding: 0;
  width: 36px;
  min-height: 36px;
  font-size: 1.35rem;
}
html[data-upload-template="active"] .upload-template-action-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
html[data-upload-template="active"] .upload-template-actions .upload-template-next-help {
  width: auto;
  min-height: 28px;
  padding: 2px 8px;
  border: 0;
  border-radius: 6px;
  color: #49349f;
  background: transparent;
  text-decoration: underline;
  font-size: .85rem;
  font-weight: 700;
}
html[data-upload-template="active"] .upload-template-actions .upload-template-next-help[hidden] { display: none; }
html[data-upload-template="active"] .upload-template-actions button.is-primary:disabled {
  border-color: #d8d3dc;
  background: #e7e4ea;
  color: #736b7c;
  opacity: 1;
  box-shadow: none;
  cursor: not-allowed;
}
html[data-upload-template="active"] .upload-template-attention-target {
  outline: 3px solid #7654df;
  outline-offset: 5px;
  animation: upload-template-guidance-pulse .8s ease-in-out 2;
}
@media (prefers-reduced-motion: reduce) {
  html[data-upload-template="active"] .upload-template-attention-target { animation: none; }
}
@media (max-width: 780px) {
  html[data-upload-template="active"] .upload-template-guidance {
    grid-template-columns: 26px minmax(0, 1fr) 32px;
    gap: 9px;
    padding: 12px;
    max-height: min(40vh, 300px);
    overflow: auto;
  }
  html[data-upload-template="active"] .upload-template-guidance-mark { width: 24px; height: 24px; }
  html[data-upload-template="active"] .upload-template-guidance-copy strong { font-size: .9rem; }
  html[data-upload-template="active"] .upload-template-guidance-copy p { font-size: .8rem; }
  html[data-upload-template="active"] .upload-template-guidance [data-upload-template-guidance-action] { grid-column: 2; justify-self: start; min-height: 34px; padding: 6px 12px; }
  html[data-upload-template="active"] .upload-template-guidance .upload-template-guidance-dismiss { grid-column: 3; grid-row: 1; width: 32px; min-height: 32px; align-self: start; }
}

@keyframes upload-template-invalid-pulse {
  50% { box-shadow: 0 0 0 5px rgba(192, 50, 79, .18); }
}

@keyframes upload-template-guidance-pulse {
  50% { box-shadow: 0 0 0 7px rgba(118, 84, 223, .2); }
}

@media (max-width: 780px) {
  html[data-upload-template="active"] .upload-template-evidence > header,
  html[data-upload-template="active"] .upload-template-analysis > header,
  html[data-upload-template="active"] .upload-template-compact-tracklist > header {
    align-items: flex-start;
    flex-direction: column;
  }

  html[data-upload-template="active"] .upload-template-analysis-subjects {
    grid-template-columns: 1fr;
  }

  html[data-upload-template="active"] .upload-template-track-row {
    grid-template-columns: 42px 36px minmax(0, 1fr);
  }

  html[data-upload-template="active"] .upload-template-track-row .upload-template-track-actions {
    grid-column: 2 / -1;
    justify-content: flex-start;
    padding-left: 0;
  }

  html[data-upload-template="active"] .upload-template-actions {
    bottom: max(8px, env(safe-area-inset-bottom));
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 10px;
  }

  html[data-upload-template="active"] .upload-template-actions > span {
    grid-column: 1 / -1;
    grid-row: 1;
    font-size: .82rem;
  }

  html[data-upload-template="active"] .upload-template-actions button {
    grid-row: 2;
    width: 100%;
    min-width: 0;
  }
  html[data-upload-template="active"] .upload-template-actions button.is-primary {
    min-width: 0;
    max-width: 100%;
  }
}

@media (max-width: 620px) {
  html[data-upload-template="active"] .upload-template-analysis {
    padding: 18px 14px;
    border-radius: 18px;
  }

  html[data-upload-template="active"] .upload-template-territory-card > header {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Task 634: keep each Upload substage in one stable, replacing workspace. */
html[data-upload-template="active"] .upload-template-upload-workspace,
html[data-upload-template="active"] .upload-template-upload-shell,
html[data-upload-template="active"] [data-upload-template-upload-phase] {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-inline-size: 0;
  align-content: start;
}

html[data-upload-template="active"] [data-upload-template-view] {
  grid-area: 1 / 1;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-inline-size: 0;
}

html[data-upload-template="active"] [data-upload-template-upload-phase] > *,
html[data-upload-template="active"] [data-upload-template-view] > * {
  max-width: 100%;
  min-width: 0;
  min-inline-size: 0;
}

html[data-upload-template="active"] [data-upload-template-view][hidden],
html[data-upload-template="active"] [data-upload-template-upload-phase="receive"] [data-upload-template-view]:not([data-upload-template-view="receive"]),
html[data-upload-template="active"] [data-upload-template-upload-phase="confirm"] [data-upload-template-view]:not([data-upload-template-view="confirm"]),
html[data-upload-template="active"] [data-upload-template-upload-phase="analyze"] [data-upload-template-view]:not([data-upload-template-view="analyze"]),
html[data-upload-template="active"] [data-upload-template-upload-phase="analysis"] [data-upload-template-view]:not([data-upload-template-view="analysis"]),
html[data-upload-template="active"] [data-upload-template-upload-phase="ready"] [data-upload-template-view]:not([data-upload-template-view="ready"]) {
  display: none !important;
}

html[data-upload-template="active"] [data-upload-template-view="receive"]:not([hidden]),
html[data-upload-template="active"] [data-upload-template-view="confirm"]:not([hidden]),
html[data-upload-template="active"] [data-upload-template-view="analyze"]:not([hidden]),
html[data-upload-template="active"] [data-upload-template-view="analysis"]:not([hidden]),
html[data-upload-template="active"] [data-upload-template-view="ready"]:not([hidden]) {
  animation: upload-template-phase-view-in .24s ease-out both;
}

html[data-upload-template="active"] [data-upload-template-view="confirm"]:not([hidden]),
html[data-upload-template="active"] [data-upload-template-view="analyze"]:not([hidden]),
html[data-upload-template="active"] [data-upload-template-view="analysis"]:not([hidden]),
html[data-upload-template="active"] [data-upload-template-view="ready"]:not([hidden]) {
  display: grid;
  gap: 22px;
  align-content: start;
}

html[data-upload-template="active"] [data-upload-template-view="confirm"] .upload-template-evidence,
html[data-upload-template="active"] [data-upload-template-view="analyze"] .upload-template-analysis,
html[data-upload-template="active"] [data-upload-template-view="analysis"] .upload-template-analysis,
html[data-upload-template="active"] [data-upload-template-view="ready"] .upload-template-track-cards,
html[data-upload-template="active"] [data-upload-template-view="ready"] .upload-template-upload-summary {
  margin-top: 0;
}

html[data-upload-template="active"] [data-upload-template-view="analyze"] :where(
  [data-upload-details-assistant],
  [data-upload-details-assistant-results],
  .workspace-upload-analysis-lyrics
),
html[data-upload-template="active"] [data-upload-template-view="analysis"] :where(
  [data-upload-details-assistant],
  [data-upload-details-assistant-results],
  .workspace-upload-analysis-lyrics
) {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-inline-size: 0;
}

html[data-upload-template="active"] .upload-template-ready-status,
html[data-upload-template="active"] [data-upload-template-ready-status],
html[data-upload-template="active"] [data-upload-template-ready-summary] {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-width: 0;
  padding: 16px 18px;
  border: 1px solid #b6e4d5;
  border-radius: 18px;
  background: #f2fbf8;
  color: #176b58;
}

/* The same compact moderation result sits beside Edit metadata on Upload and Details. */
html[data-upload-template="active"] .upload-template-track-row .upload-template-track-actions {
  max-width: 100%;
  min-width: 0;
  min-inline-size: 0;
  flex-wrap: wrap;
}

html[data-upload-template="active"] .upload-template-track-row [data-upload-moderation-state] {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 5px;
  max-width: 100%;
  min-height: 30px;
  padding: 6px 10px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 999px;
  box-shadow: none;
  font-size: .72rem;
  font-weight: 900;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-upload-template="active"] .upload-template-track-row [data-upload-moderation-state="clear"] {
  border-color: #b6e4d5;
  background: #e4f7f0;
  color: #176b58;
}

html[data-upload-template="active"] .upload-template-track-row [data-upload-moderation-state="attention"] {
  border-color: #f2b8c8;
  background: #ffe7ed;
  color: #a32346;
}

html[data-upload-template="active"] .upload-template-track-row [data-upload-moderation-state="pending"] {
  border-color: #d8d1dc;
  background: #eeeaf1;
  color: #5c5262;
}

html[data-upload-template="active"] .upload-template-track-row button[data-upload-moderation-state] {
  min-height: 30px;
  padding: 6px 10px;
  cursor: pointer;
}

html[data-upload-template="active"] .upload-template-track-row button[data-upload-moderation-state="clear"]:hover,
html[data-upload-template="active"] .upload-template-track-row button[data-upload-moderation-state="clear"]:focus-visible {
  background: #d5f1e7;
  color: #125746;
}

html[data-upload-template="active"] .upload-template-track-row button[data-upload-moderation-state="attention"]:hover,
html[data-upload-template="active"] .upload-template-track-row button[data-upload-moderation-state="attention"]:focus-visible {
  background: #ffdae4;
  color: #861c39;
}

html[data-upload-template="active"] .upload-template-track-row button[data-upload-moderation-state="pending"]:hover,
html[data-upload-template="active"] .upload-template-track-row button[data-upload-moderation-state="pending"]:focus-visible {
  background: #e4dfe9;
  color: #49404f;
}

html[data-upload-template="active"] .upload-template-track-row button[data-upload-moderation-state]:focus-visible {
  outline: 2px solid rgba(115, 80, 230, .3);
  outline-offset: 2px;
}

html[data-upload-template="active"] .upload-template-track-row button[data-upload-moderation-state]:disabled {
  opacity: 1;
  cursor: default;
}

@keyframes upload-template-phase-view-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 780px) {
  html[data-upload-template="active"] .upload-template-upload-workspace,
  html[data-upload-template="active"] .upload-template-upload-shell,
  html[data-upload-template="active"] [data-upload-template-upload-phase],
  html[data-upload-template="active"] [data-upload-template-view],
  html[data-upload-template="active"] [data-upload-template-view] > *,
  html[data-upload-template="active"] .upload-template-track-row,
  html[data-upload-template="active"] .upload-template-track-row > span,
  html[data-upload-template="active"] .upload-template-track-row .upload-template-track-actions {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-inline-size: 0;
  }

  html[data-upload-template="active"] [data-upload-template-view] {
    overflow-wrap: anywhere;
  }

  html[data-upload-template="active"] .upload-template-track-row {
    overflow: visible;
  }

  html[data-upload-template="active"] .upload-template-track-row .upload-template-track-actions {
    grid-column: 2 / -1;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  html[data-upload-template="active"] .upload-template-track-row [data-upload-moderation-state] {
    max-width: min(100%, 220px);
  }

  html[data-upload-template="active"] .upload-template-ready-status,
  html[data-upload-template="active"] [data-upload-template-ready-status],
  html[data-upload-template="active"] [data-upload-template-ready-summary] {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* The phase controller lives on the panel alongside shared notices and tracks. */
html[data-upload-template="active"] [data-upload-template-panel="1"][data-upload-template-upload-phase] {
  display: block;
  overflow-x: clip;
}

html[data-upload-template="active"] [data-upload-template-panel="1"] [data-upload-template-view] {
  grid-area: auto;
}

/* Task 640: one spacious analysis surface and a legible, state-aware stage rail. */
html[data-upload-template="active"] .upload-template-ready-card.has-cover-warning {
  border-color: #e8cf93;
  background: #fffbf0;
}

html[data-upload-template="active"] .upload-template-ready-card.has-cover-warning > span {
  color: #634612;
  background: #fbe7b6;
}

html[data-upload-template="active"] .upload-template-flow {
  gap: clamp(12px, 1.5vw, 28px);
  margin-bottom: 32px;
  padding: 20px 18px 16px;
  border: 0;
  border-radius: 20px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 8px 30px rgba(28, 24, 34, .06);
}

html[data-upload-template="active"] .upload-template-flow button {
  grid-template-columns: auto minmax(0, 1fr) minmax(44px, auto);
  gap: 14px;
  min-height: 76px;
  padding: 8px 4px 18px;
  border-bottom: 5px solid #d5d2db;
  color: #a09aa9;
}

html[data-upload-template="active"] .upload-template-flow button > b {
  font-size: clamp(2.1rem, 2.8vw, 3rem);
  font-weight: 400;
}

html[data-upload-template="active"] .upload-template-flow button > span {
  font-size: clamp(.94rem, 1.2vw, 1.22rem);
  line-height: 1.25;
  font-weight: 650;
}

html[data-upload-template="active"] .upload-template-flow button > span strong {
  font-weight: inherit;
}

html[data-upload-template="active"] .upload-template-flow button small {
  margin-top: 6px;
  font-size: .76rem;
  line-height: 1.3;
}

html[data-upload-template="active"] .upload-template-flow button.is-complete {
  color: #1b1822;
  border-bottom-color: #1b1822;
}

html[data-upload-template="active"] .upload-template-flow button.is-incomplete {
  color: #51445f;
  border-bottom-color: #b9a8f1;
}

html[data-upload-template="active"] .upload-template-flow button.is-active {
  color: var(--upload-template-purple);
}

html[data-upload-template="active"] .upload-template-flow button.is-active:not(.is-incomplete) {
  border-bottom-color: var(--upload-template-purple);
}

html[data-upload-template="active"] .upload-template-flow button.is-active.is-incomplete {
  border-bottom-color: var(--upload-template-purple);
}

html[data-upload-template="active"] .upload-template-flow .upload-template-step-state {
  display: inline-flex;
  width: auto;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border: 1px solid #cfc3ef;
  border-radius: 999px;
  background: #f4f0ff;
  color: #5e42bd;
  font-size: .66rem;
  font-weight: 800;
  font-style: normal;
  letter-spacing: .02em;
  line-height: 1;
}

html[data-upload-template="active"] .upload-template-flow .upload-template-step-state[hidden] {
  display: none;
}

/* Location and issue severity are independent: active titles remain purple. */
html[data-upload-template="active"] .upload-template-flow button.is-advisory,
html[data-upload-template="active"] .upload-template-flow button.is-active.is-advisory {border-bottom-color:#e6a026}
html[data-upload-template="active"] .upload-template-flow button.is-blocked,
html[data-upload-template="active"] .upload-template-flow button.is-active.is-blocked {border-bottom-color:#d04451}
html[data-upload-template="active"] .upload-template-flow button.is-advisory .upload-template-step-state,
html[data-upload-template="active"] .upload-template-flow button.is-blocked .upload-template-step-state {width:24px;height:24px;min-width:24px;padding:0;border:0;font-size:1rem}
html[data-upload-template="active"] .upload-template-flow button.is-advisory .upload-template-step-state {background:#ffe6aa;color:#714600}
html[data-upload-template="active"] .upload-template-flow button.is-blocked .upload-template-step-state {background:#fbe0e3;color:#a41f30}
html[data-upload-template="active"] .upload-template-flow button.is-incomplete:not(.is-blocked) .upload-template-step-state {background:#f3f1f5;color:#665e70;border-color:#ded9e4}
html[data-upload-template="active"] .upload-template-stage-issue-detail {display:flex;align-items:center;gap:16px;flex-wrap:wrap;padding:24px;border:1px solid #e0d9ec;border-radius:20px;background:#fffdf7;margin:auto;color:#36303e;width:min(680px,90vw);box-sizing:border-box;max-height:80vh;overflow:auto;box-shadow:0 20px 70px #16112855}
html[data-upload-template="active"] .upload-template-stage-issue-detail::backdrop {background:#17132688;backdrop-filter:blur(3px)}
html[data-upload-template="active"] .upload-template-stage-issue-detail p {flex:1;min-width:220px;margin:0;line-height:1.5}
html[data-upload-template="active"] .upload-template-stage-issue-detail button {padding:10px 16px;border:1px solid #cfc4e7;border-radius:24px;background:#f1ecfb;color:#5f45b2;font:inherit}

html[data-upload-template="active"] .upload-template-flow button:focus-visible {
  outline: 2px solid #6750d8;
  outline-offset: 4px;
}

html[data-upload-template="active"] .upload-template-analysis {
  padding: clamp(4px, 1.3vw, 22px) 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

html[data-upload-template="active"] .upload-template-analysis > header {
  gap: 28px;
  padding-bottom: 8px;
}
html[data-upload-template="active"] .upload-template-analysis-actions {
  display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px;
  margin-left: auto; flex: 0 1 auto; min-width: 0;
}
html[data-upload-template="active"] .upload-template-analysis > header .upload-template-analysis-actions > button { min-height: 44px; }
html[data-upload-template="active"] .upload-template-analysis-actions > button[hidden] { display: none !important; }
html[data-upload-template="active"] .upload-template-genre-host { display: none !important; }
html[data-upload-template="active"] [data-upload-template-genre-note] { margin: 8px 0 0; color: #665d71; font-size: .75rem; line-height: 1.5; }
html[data-upload-template="active"] [data-upload-template-genre-note][hidden] { display: none !important; }
@media (max-width: 780px) {
  html[data-upload-template="active"] .upload-template-analysis-actions { margin-left: 0; justify-content: flex-start; width: 100%; }
  html[data-upload-template="active"] .upload-template-analysis-actions > button { max-width: 100%; white-space: normal; }
}

html[data-upload-template="active"] .upload-template-analysis-subjects {
  gap: 0;
  margin-top: 24px;
  padding: 22px 0;
  border-block: 1px solid #e9e5ec;
  background: transparent;
}

html[data-upload-template="active"] .upload-template-analysis-subject {
  min-height: 108px;
  padding: 10px clamp(14px, 1.8vw, 30px);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

html[data-upload-template="active"] .upload-template-analysis-subject + .upload-template-analysis-subject {
  border-left: 1px solid #e9e5ec;
}

html[data-upload-template="active"] .upload-template-analysis-subject-icon {
  border: 0;
  background: #f2eefb;
  color: #6950cf;
}

html[data-upload-template="active"] .upload-template-analysis-subject strong {
  font-size: 1rem;
  font-weight: 650;
}

html[data-upload-template="active"] .upload-template-analysis-subject small {
  font-size: .68rem;
}

html[data-upload-template="active"] .upload-template-analysis-subject em {
  font-size: .76rem;
  line-height: 1.5;
  white-space: normal;
}

html[data-upload-template="active"] .upload-template-analysis-subject > b {
  border: 0;
  font-size: .66rem;
}

html[data-upload-template="active"] .upload-template-analysis-subject > b.is-warning {
  color: #705015;
  background: #fff4d8;
}

html[data-upload-template="active"] .upload-template-analysis-subject-toggle {
  justify-content: flex-start;
  font-size: .78rem;
  font-weight: 650;
}

html[data-upload-template="active"] .upload-template-analysis-subject.is-track-toggle:hover,
html[data-upload-template="active"] .upload-template-analysis-subject.is-track-toggle[aria-expanded="true"] {
  background: #f8f6fc;
  box-shadow: none;
}

html[data-upload-template="active"] .upload-template-analysis-subject.is-track-toggle:focus-visible {
  outline: 2px solid #6750d8;
  outline-offset: -2px;
  box-shadow: none;
}

html[data-upload-template="active"] .upload-template-analysis-host {
  margin-top: 34px;
}

/* Task711: the same optional listening card follows analysis, never Details. */
html[data-upload-template="active"] .upload-template-genre-host { margin-top: 24px; min-width: 0; }
html[data-upload-template="active"] .upload-template-genre-host:has(> [hidden]) { display: none; }
html[data-upload-template="active"] .upload-template-genre-host .workspace-upload-genre-suggestion { box-sizing: border-box; margin-top: 0; }

html[data-upload-template="active"] .upload-template-analysis-host [data-upload-details-assistant] {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

@media (max-width: 1100px) and (min-width: 781px) {
  html[data-upload-template="active"] .upload-template-analysis-subject {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 10px;
  }

  html[data-upload-template="active"] .upload-template-analysis-subject > b {
    grid-column: 2;
    justify-self: start;
  }

  html[data-upload-template="active"] .upload-template-analysis-subject-icon {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 900px) {
  html[data-upload-template="active"] .upload-template-flow {
    gap: 10px;
    padding: 14px 10px 12px;
  }

  html[data-upload-template="active"] .upload-template-flow button {
    min-height: 82px;
    padding: 4px 2px 12px;
  }

  html[data-upload-template="active"] .upload-template-flow button > b {
    font-size: 1.9rem;
  }

  html[data-upload-template="active"] .upload-template-flow button > span {
    margin-top: 6px;
    font-size: .8rem;
  }

  html[data-upload-template="active"] .upload-template-flow .upload-template-step-state {
    position: absolute;
    top: 1px;
    right: 2px;
    min-height: 18px;
    padding: 3px 6px;
    font-size: .58rem;
  }
}

@media (max-width: 780px) {
  html[data-upload-template="active"] .upload-template-analysis-subjects {
    padding: 10px 0;
  }

  html[data-upload-template="active"] .upload-template-analysis-subject {
    min-height: 100px;
    padding: 18px 2px;
  }

  html[data-upload-template="active"] .upload-template-analysis-subject + .upload-template-analysis-subject {
    border-left: 0;
    border-top: 1px solid #e9e5ec;
  }

  html[data-upload-template="active"] .upload-template-analysis-host {
    margin-top: 26px;
  }
}

@media (max-width: 480px) {
  html[data-upload-template="active"] .upload-template-flow {
    gap: 5px;
    padding: 12px 7px 10px;
  }

  html[data-upload-template="active"] .upload-template-flow button > span {
    font-size: .67rem;
  }

  html[data-upload-template="active"] .upload-template-flow .upload-template-step-state {
    right: 0;
    min-height: 16px;
    padding: 2px 4px;
  }
}

/* Task 671: quiet, continuous local-package summary, without nested cards. */
html[data-upload-template="active"] .upload-template-evidence-grid {
  gap: 0;
  padding-block: 24px;
  border-top: 1px solid var(--upload-template-line);
}
html[data-upload-template="active"] .upload-template-evidence-grid > article {
  padding: 4px 20px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
html[data-upload-template="active"] .upload-template-evidence-grid > article:first-child { padding-left: 0; }
html[data-upload-template="active"] .upload-template-evidence-grid > article + article { border-left: 1px solid var(--upload-template-line); }
html[data-upload-template="active"] [data-upload-template-upload-phase="confirm"] .upload-template-upload-summary {
  margin-top: 0;
  padding: 22px 0;
  border: 0;
  border-block: 1px solid var(--upload-template-line);
  border-radius: 0;
  background: transparent;
}
html[data-upload-template="active"] .workspace-upload-details-assistant[data-state="complete"] .workspace-upload-details-assistant-mark {
  color: #286f60;
  background: #e3f5ee;
}
@media (max-width: 1000px) {
  html[data-upload-template="active"] .upload-template-evidence-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 0; }
  html[data-upload-template="active"] .upload-template-evidence-grid > article:nth-child(odd) { border-left: 0; padding-left: 0; }
}
@media (max-width: 560px) {
  html[data-upload-template="active"] .upload-template-evidence-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  html[data-upload-template="active"] .upload-template-evidence-grid > article { padding: 0; }
  html[data-upload-template="active"] .upload-template-evidence-grid > article + article { border-left: 0; }
}

/* Studio Task 644: one stable, visible analysis-progress surface. */
html[data-upload-template="active"] .upload-template-analysis-progress {
  display: grid;
  gap: 9px;
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid #dcd3ee;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 9px 24px rgba(54, 36, 83, .06);
}

html[data-upload-template="active"] .upload-template-analysis-progress[hidden] { display: none; }

html[data-upload-template="active"] .upload-template-analysis-progress > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

html[data-upload-template="active"] .upload-template-analysis-progress strong { color: #2f2736; font-size: .76rem; }
html[data-upload-template="active"] .upload-template-analysis-progress span { color: #6548c7; font-size: .68rem; font-weight: 900; white-space: nowrap; }
html[data-upload-template="active"] .upload-template-analysis-progress small { color: #716977; font-size: .64rem; line-height: 1.45; }

html[data-upload-template="active"] [data-upload-template-analysis-transfers] {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 24px;
}
html[data-upload-template="active"] [data-upload-template-analysis-transfers][hidden] { display: none; }
html[data-upload-template="active"] .upload-template-transfer { min-width: 0; line-height: 1.4; }
html[data-upload-template="active"] .upload-template-transfer b {
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: .75rem; font-weight: 650; color: #40364e;
}
html[data-upload-template="active"] .upload-template-transfer span {
  display: block; white-space: normal; font-size: .72rem; font-weight: 500;
  font-variant-numeric: tabular-nums; color: #665d71;
}
html[data-upload-template="active"] .upload-template-transfer progress {
  display: block; width: 100%; height: 6px; margin-top: 8px;
  border: 0; border-radius: 999px; overflow: hidden; accent-color: #7862df;
  background: #ece8f2;
}
html[data-upload-template="active"] .upload-template-transfer progress::-webkit-progress-bar { background: #ece8f2; }
html[data-upload-template="active"] .upload-template-transfer progress::-webkit-progress-value { background: #7862df; }
html[data-upload-template="active"] .upload-template-transfer progress::-moz-progress-bar { background: #7862df; }
@media (max-width: 600px) {
  html[data-upload-template="active"] [data-upload-template-analysis-transfers] { grid-template-columns: minmax(0, 1fr); }
}

html[data-upload-template="active"] [data-upload-template-analysis-progress-bar] {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: #ece8f1;
}

html[data-upload-template="active"] [data-upload-template-analysis-progress-bar] > i {
  display: block;
  width: var(--analysis-progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8a5be5, #53c5d8, #86d9bd);
  transition: width .22s ease;
}

html[data-upload-template="active"] .upload-template-analysis-subject-icon.is-artwork svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (prefers-reduced-motion: reduce) {
  html[data-upload-template="active"] [data-upload-template-analysis-progress-bar] > i { transition: none; }
}

/* Task 648: integrated progress with motion only while checks are running. */
html[data-upload-template="active"] .upload-template-analysis-progress {
  border: 0; border-radius: 0; background: transparent; box-shadow: none;
  padding: 12px 0 18px;
}
html[data-upload-template="active"] [data-upload-template-analysis-progress-bar] { height: 16px; position: relative; }
html[data-upload-template="active"] [data-upload-template-analysis-progress-bar] > i { position: relative; overflow: hidden; }
html[data-upload-template="active"] .upload-template-analysis-progress[data-running="true"] [data-upload-template-analysis-progress-bar]::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 30%, #ffffff80 48%, transparent 66%);
  transform: translateX(-100%); animation: upload-analysis-flow 1.8s linear infinite;
}
@keyframes upload-analysis-flow { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) {
  html[data-upload-template="active"] .upload-template-analysis-progress[data-running="true"] [data-upload-template-analysis-progress-bar]::after { animation: none; display: none; }
}
/* Task 665: dock the original progress surface below the measured header stack.
   Its box never changes size on scroll; the backdrop joins the stages' width. */
html[data-upload-template="active"] .upload-template-app.has-docked-progress {
  overflow-anchor: none;
}
html[data-upload-template="active"] .upload-template-analysis-progress {
  position: sticky;
  top: var(--upload-template-progress-top, 190px);
  z-index: 44;
  align-self: start;
}
html[data-upload-template="active"] .upload-template-analysis-progress[data-docked="true"]::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset-block: 0;
  left: calc(-1 * var(--progress-bleed-left, 0px));
  right: calc(-1 * var(--progress-bleed-right, 0px));
  border-bottom: 1px solid #e9e5ec;
  border-radius: 0 0 18px 18px;
  background: #fff;
  box-shadow: 0 10px 20px rgba(45, 30, 77, .07);
  pointer-events: none;
}
@media (max-width: 600px) {
  html[data-upload-template="active"] .upload-template-analysis-progress > div:first-child {
    flex-wrap: wrap;
    gap: 4px 12px;
  }
}

/* Task 649: quiet release preview, progressive image framing, spacious track rows. */
html[data-upload-template="active"] .upload-template-add-more { padding: 16px 0 4px; }
html[data-upload-template="active"] .upload-template-add-more button { display: inline-flex; align-items: center; gap: 10px; border: 0; background: transparent; color: #44365d; font: inherit; font-weight: 650; cursor: pointer; }
html[data-upload-template="active"] .upload-template-add-more button > span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: #fff; background: #211b2c; font-size: 1.3rem; }
html[data-upload-template="active"] .workspace-upload-release-preview {
  padding: 26px; border: 0; border-radius: 18px; background: #f7f6fa; box-shadow: none;
}
html[data-upload-template="active"] .workspace-upload-artist-input > button {
  right: 4px; min-height: 38px; padding: 4px; border: 0; border-radius: 999px; background: transparent; box-shadow: none;
}
html[data-upload-template="active"] .workspace-upload-artist-input > button > span { width: 28px; height: 28px; background: #17151b; color: #fff; }
html[data-upload-template="active"] .workspace-upload-artist-input > button[data-state="matched"] > span { box-shadow: 0 0 0 2px #81cfc3; }
html[data-upload-template="active"] .workspace-upload-artist-input > button[data-state="matched"] > small {
  color: #27816c; background: transparent; border: 0; font-size: 1.1rem; opacity: 0; transition: opacity .15s;
}
html[data-upload-template="active"] .workspace-upload-artist-input > button[data-state="matched"]:is(:hover, :focus-visible) > small { opacity: 1; }
html[data-upload-template="active"] .upload-template-compact-tracklist { border: 0; background: transparent; overflow: visible; }
html[data-upload-template="active"] .upload-template-compact-tracklist > header { padding: 12px 0 18px; background: transparent; }
/* Details-only disclosure: hidden descendants stay out of the tab order. */
html[data-upload-template="active"] [data-upload-template-details-track-content][hidden] { display: none !important; }
html[data-upload-template="active"] .upload-template-compact-tracklist > header > .upload-template-details-disclosure {
  display: flex; align-items: center; justify-content: space-between; flex: 1 1 auto; gap: 20px; min-width: 0; min-height: 58px;
  padding: 10px 0; border: 0; border-radius: 8px; background: transparent; color: var(--upload-template-ink); text-align: left;
}
html[data-upload-template="active"] .upload-template-details-disclosure > span:first-child { min-width: 0; }
html[data-upload-template="active"] .upload-template-details-disclosure-label { display: inline-flex; align-items: center; gap: 9px; flex: 0 0 auto; color: var(--upload-template-purple-dark); font-size: .85rem; }
html[data-upload-template="active"] .upload-template-details-disclosure-label > [aria-hidden] { font-size: 1.2rem; }
html[data-upload-template="active"] .upload-template-details-disclosure:hover .upload-template-details-disclosure-label { text-decoration: underline; text-underline-offset: 3px; }
html[data-upload-template="active"] .upload-template-details-disclosure:focus-visible { outline: 2px solid var(--upload-template-purple); outline-offset: 4px; }
@media (max-width: 780px) {
  html[data-upload-template="active"] .upload-template-compact-tracklist > header > .upload-template-details-disclosure { width: 100%; }
}
html[data-upload-template="active"] .upload-template-track-row.is-expandable {
  display: grid; grid-template-columns: 30px 24px 36px minmax(140px, 1fr) auto auto; align-items: center; gap: 14px;
  margin: 12px 0; padding: 18px 22px; border: 1px solid #e6e1ee; border-radius: 36px; background: #fff;
}
html[data-upload-template="active"] .upload-template-track-row.is-expandable > b { width: auto; height: auto; background: transparent; color: #98909f; font-size: .88rem; }
html[data-upload-template="active"] .upload-template-track-row.is-expandable > .upload-template-track-grip { width: 24px; height: 36px; }
html[data-upload-template="active"] .upload-template-track-row.is-expandable > .upload-template-track-title {
  display: flex; flex-direction: column; align-items: flex-start; gap: 5px; min-width: 0; padding: 4px 0;
  border: 0; border-radius: 6px; background: transparent; color: #211b2c; text-align: left; font: inherit;
}
html[data-upload-template="active"] .upload-template-track-title strong { max-width: 100%; overflow-wrap: anywhere; font-size: 1rem; }
html[data-upload-template="active"] .upload-template-track-title small { color: #6a5890; font-size: .74rem; }
/* Title disclosure stays text-like with a keyboard-only focus indicator. */
html[data-upload-template="active"] .upload-template-track-row.is-expandable > .upload-template-track-title:is(:hover, :focus) {
  background: transparent; color: #211b2c; border: 0; outline: none; box-shadow: none;
}
html[data-upload-template="active"] .upload-template-track-row.is-expandable > .upload-template-track-title:focus-visible {
  outline: 2px solid #7654df; outline-offset: 4px;
}
html[data-upload-template="active"] .upload-template-track-title:hover small { color: #4f2d91; text-decoration: underline; text-underline-offset: 3px; }
html[data-upload-template="active"] .upload-template-track-row.is-expandable > .upload-template-track-duration {
  font-weight: 650; font-variant-numeric: tabular-nums; color: #282130; white-space: nowrap; font-size: .85rem;
}
html[data-upload-template="active"] [data-upload-playback-remaining] { color: #746981; }
html[data-upload-template="active"] .upload-template-play svg { display: block; fill: currentColor; }
html[data-upload-template="active"] .upload-template-play.is-playing { color: #5636bf; background: #eae3fa; }
html[data-upload-template="active"] .upload-template-track-row.is-expandable > .upload-template-track-actions { grid-column: auto; gap: 10px; padding: 0; width: auto; }
html[data-upload-template="active"] .upload-template-track-row.is-expandable .upload-template-track-details {
  grid-column: 1 / -1; padding: 18px 0 4px; margin-top: 4px; border-top: 1px solid #eeebf2; color: #736a7d;
}
html[data-upload-template="active"] .upload-template-track-details[hidden] { display: none !important; }
html[data-upload-template="active"] .upload-template-track-details p { margin: 0 0 14px; font-size: .8rem; }
html[data-upload-template="active"] .upload-template-track-detail-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
html[data-upload-template="active"] .upload-template-track-detail-controls label { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .8rem; }
html[data-upload-template="active"] .upload-template-track-detail-controls input { width: 76px; min-height: 38px; border: 1px solid #dcd5e7; border-radius: 8px; padding: 6px; background: #fff; color: #282130; }
html[data-upload-template="active"] .upload-template-track-detail-controls button { border: 1px solid #dcd5e7; border-radius: 999px; padding: 10px 14px; background: #f8f6fb; color: #564178; font-size: .8rem; }
html[data-upload-template="active"] .upload-template-preview-feedback { font-size: .76rem; color: #287d69; }
@media (max-width: 1100px) {
  html[data-upload-template="active"] .upload-template-track-row.is-expandable { grid-template-columns: 24px 24px 32px minmax(0, 1fr) auto; }
  html[data-upload-template="active"] .upload-template-track-row.is-expandable > .upload-template-track-actions { grid-column: 4 / -1; justify-content: flex-end; }
}
@media (max-width: 600px) {
  html[data-upload-template="active"] .upload-template-track-row.is-expandable { grid-template-columns: 20px 30px minmax(0, 1fr) auto; padding: 16px; gap: 10px; border-radius: 24px; }
  html[data-upload-template="active"] .upload-template-track-row.is-expandable > .upload-template-track-grip { display: none; }
  html[data-upload-template="active"] .upload-template-track-row.is-expandable > .upload-template-track-actions { grid-column: 2 / -1; justify-content: space-between; }
  html[data-upload-template="active"] .upload-template-track-row.is-expandable [data-upload-moderation-state] { max-width: calc(100% - 54px); }
}
@media (prefers-reduced-motion: reduce) {
  html[data-upload-template="active"] .workspace-upload-artist-input > button > small { transition: none; }
}

/* Read-only Review and an isolated, single-flight completion surface. */
html[data-upload-template="active"] [data-upload-reconnect-notice-close] { position: absolute; top: 5px; right: 5px; z-index: 1; pointer-events: auto; border: 0; border-radius: 50%; background: #fff; color: #514660; font-size: 23px; width: 30px; height: 30px; padding: 0; cursor: pointer; }
html[data-upload-template="active"] [data-studio-update-notice]:has([data-upload-reconnect-notice-close]) .workspace-draft-save-notice-copy { padding-right: 36px; }
html[data-upload-template="active"] .upload-template-core-storage { display: none !important; }
html[data-upload-template="active"] [data-upload-meta][aria-invalid="true"] { border-color: #b5374b; background: #fff5f6; }
html[data-upload-template="active"] .upload-template-review-tracklist > header > span { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; width: 100%; }
html[data-upload-template="active"] [data-upload-template-revise-tracks] { flex-basis: 100%; border: 0; padding: 8px 0; background: transparent; color: #6651c9; text-align: left; font: inherit; font-weight: 650; cursor: pointer; }
html[data-upload-template="active"] .upload-template-review-track { display: grid; grid-template-columns: 48px minmax(0,1fr) auto; align-items: center; gap: 22px; padding: 28px 20px; min-height: 95px; }
html[data-upload-template="active"] .upload-template-review-track > b { color: #817b90; font-weight: 500; }
html[data-upload-template="active"] .upload-template-review-track > span { position: relative; min-width: 0; }
html[data-upload-template="active"] .upload-template-review-track strong { font-size: 19px; font-weight: 600; overflow-wrap: anywhere; }
html[data-upload-template="active"] .upload-template-review-track time { color: #756f82; font-variant-numeric: tabular-nums; }
html[data-upload-template="active"] .upload-template-review-track-info { display: inline-grid; place-items: center; width: 30px; height: 30px; min-height: 0; margin-left: 10px; padding: 0; border: 0; border-radius: 50%; background: #f0edf8; color: #6551bc; font: 700 15px Georgia,serif; cursor: pointer; }
html[data-upload-template="active"] .upload-template-review-track-balloon { display: block; position: absolute; top: calc(100% + 8px); left: 0; z-index: 8; width: min(360px,100%); padding: 16px 20px; border-radius: 15px; background: #201c27; color: #fff; box-shadow: 0 12px 30px #231c3433; font-size: 14px; line-height: 1.65; overflow-wrap: anywhere; }
html[data-upload-template="active"] .upload-template-review-track-balloon[hidden] { display: none; }
html[data-upload-template="active"] .upload-template-agreements { margin: 32px 0 20px; padding: 24px; background: #fff; border: 0; border-radius: 24px; }
html[data-upload-template="active"] .upload-template-agreements h3 { margin: 0 0 18px; font-size: 22px; }
html[data-upload-template="active"] .upload-template-agreements label { margin: 0; padding: 20px 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
html[data-upload-template="active"] .upload-template-agreements label + label { border-top: 1px solid #eeebf2; }
html[data-upload-template="active"] .workspace-upload-edit-policy { margin: 20px 0 10px; padding: 26px; border: 0; background: linear-gradient(110deg,#f7f4fd,#f2faf8); border-radius: 24px; }
html[data-upload-template="active"] .upload-template-revision-disclosure > summary { color: #6651c9; font-size: 20px; font-weight: 700; cursor: pointer; padding: 8px 0; text-decoration: none; }
html[data-upload-template="active"] .upload-template-revision-disclosure > header { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin: 20px 0; }
html[data-upload-template="active"] .upload-template-revision-disclosure > header small { display: none; }
html[data-upload-template="active"] .upload-template-revision-disclosure > header strong { display: block; font-size: 20px; line-height: 1.5; }
html[data-upload-template="active"] .upload-template-revision-disclosure > header > span { flex-shrink: 0; padding: 7px 12px; border-radius: 20px; background: #eae6f5; color: #62558e; font-size: 13px; }
html[data-upload-template="active"] .upload-template-revision-disclosure > div { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; }
html[data-upload-template="active"] .upload-template-revision-disclosure article { padding: 18px; border: 0; border-radius: 16px; background: #ffffffb8; box-shadow: none; }
html[data-upload-template="active"] .upload-template-revision-disclosure article b { display: block; margin-bottom: 12px; font-size: 18px; }
html[data-upload-template="active"] .upload-template-revision-disclosure article span { display: block; font-size: 15px; line-height: 1.75; color: #716a80; }
html[data-upload-template="active"] .upload-template-complete-button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 56px; }
html[data-upload-template="active"] .upload-template-complete-button svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; }
html[data-upload-template="active"] .upload-template-complete-help { display: block; max-width: 470px; margin-top: 5px; font-size: 13px; line-height: 1.5; }
html[data-upload-template="active"][data-upload-completion]:not([data-upload-completion=""]) .upload-template-app > :not(.upload-template-completion-page):not(dialog),
html[data-upload-template="active"][data-upload-completion]:not([data-upload-completion=""]) .upload-template-banner { display: none !important; }
html[data-upload-template="active"][data-upload-completion]:not([data-upload-completion=""]) [data-studio-update-notice],
html[data-upload-template="active"][data-upload-completion]:not([data-upload-completion=""]) .workspace-titlebar,
html[data-upload-template="active"][data-upload-completion]:not([data-upload-completion=""]) .workspace-view-tabs,
html[data-upload-template="active"][data-upload-completion]:not([data-upload-completion=""]) .workspace-catalog { display: none !important; }
html[data-upload-template="active"] .upload-template-completion-page { min-height: 75vh; padding: 70px 24px; text-align: center; background: #fff; border-radius: 32px; scroll-margin-top: 90px; }
html[data-upload-template="active"] .upload-template-completion-page[hidden] { display: none; }
html[data-upload-template="active"] .upload-template-completion-page h2 { margin: 24px 0 16px; font-size: clamp(32px,4vw,54px); line-height: 1.1; }
html[data-upload-template="active"] .upload-template-completion-page p { max-width: 650px; margin: 0 auto 28px; color: #766e85; line-height: 1.7; }
html[data-upload-template="active"] .upload-template-completion-mark { display: inline-block; width: 64px; height: 64px; border: 5px solid #ece7f7; border-top-color: #7959dc; border-radius: 50%; animation: upload-completion-spin 1.1s linear infinite; }
html[data-upload-template="active"][data-upload-completion="success"] .upload-template-completion-mark { border: 0; background: #e1f5ed; color: #227e5e; animation: none; }
html[data-upload-template="active"][data-upload-completion="success"] .upload-template-completion-mark::after { content: '✓'; font-size: 42px; line-height: 64px; }
html[data-upload-template="active"] .upload-template-completion-page ol { display: inline-grid; gap: 18px; padding: 22px; list-style: none; text-align: left; }
html[data-upload-template="active"] .upload-template-completion-page li::before { content: '○'; margin-right: 14px; color: #a7a0b4; }
html[data-upload-template="active"] .upload-template-completion-page li[data-state="done"]::before { content: '✓'; color: #227e5e; }
html[data-upload-template="active"] .upload-template-completion-page li[data-state="active"] { color: #7050c8; font-weight: 700; }
html[data-upload-template="active"] [data-upload-template-completion-links] { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin-top: 28px; }
html[data-upload-template="active"] [data-upload-template-completion-links][hidden] { display: none; }
html[data-upload-template="active"] [data-upload-template-completion-links] a { padding: 16px 24px; border-radius: 32px; background: #f1edf9; color: #6551bc; text-decoration: none; font-weight: 700; }
html[data-upload-template="active"] [data-upload-template-completion-links] .is-primary { background: linear-gradient(100deg,#894beb,#459de6); color: white; }
@keyframes upload-completion-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { html[data-upload-template="active"] .upload-template-completion-mark { animation: none; } }
@media (max-width: 760px) {
  html[data-upload-template="active"][data-upload-template-stage="5"] .upload-template-actions { grid-template-columns: 70px minmax(0,1fr); }
  html[data-upload-template="active"][data-upload-template-stage="5"] .upload-template-action-status { grid-row: 1; grid-column: 1 / -1; }
  html[data-upload-template="active"][data-upload-template-stage="5"] [data-upload-template-position] { display: none; }
  html[data-upload-template="active"][data-upload-template-stage="5"] .upload-template-check-actions { grid-row: 2; grid-column: 2; }
  html[data-upload-template="active"][data-upload-template-stage="5"] [data-upload-template-back] { grid-row: 2; grid-column: 1; }
  html[data-upload-template="active"] .upload-template-revision-disclosure > div { grid-template-columns: 1fr; gap: 14px; }
  html[data-upload-template="active"] .upload-template-revision-disclosure > header { flex-direction: column; }
  html[data-upload-template="active"] .upload-template-review-track { grid-template-columns: 22px minmax(0,1fr) auto; gap: 12px; padding: 22px 0; }
  html[data-upload-template="active"] .upload-template-review-track strong { font-size: 17px; }
  html[data-upload-template="active"] .upload-template-agreements { padding: 20px 0; }
  html[data-upload-template="active"] .upload-template-complete-button { white-space: normal; }
}

/* Incomplete analysis has its own neutral retry affordance. */
html[data-upload-template="active"] button.upload-template-license { border: 1px solid #d8d0e4; background: #fff; color: #6246a5; border-radius: 999px; padding: 10px 16px; min-height: 44px; font-size: 16px; white-space: nowrap; }
html[data-upload-template="active"] button.upload-template-license:hover { background: #f3eff9; }
html[data-upload-template="active"] .upload-template-license > span { font-size: 20px; margin-right: 5px; }

/* Approved track guidance: simple before checks, unobstructed controls afterwards. */
html[data-upload-template="active"] .upload-template-track-menu-wrap[hidden] { display: none !important; }
html[data-upload-template="active"] .is-reordering-tracks .upload-template-track-details { display: none !important; }
html[data-upload-template="active"] .upload-template-track-menu[popover],
html[data-upload-template="active"] .upload-template-track-move-menu[popover] { margin: 0; max-width: calc(100vw - 32px); max-height: calc(100dvh - 180px); overflow-y: auto !important; }
html[data-upload-template="active"] button.upload-template-license { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-size: 18px; font-weight: 600; min-height: 48px; padding: 10px 20px; color: #17263d; }
html[data-upload-template="active"] button.upload-template-license:hover { color: #8664f7; border-color: #9679ff; background: #fff; }
html[data-upload-template="active"] .upload-template-track-row.is-expandable > .upload-template-track-duration { font-size: 18px; font-weight: 600; color: #17263d; font-variant-numeric: tabular-nums; }
html[data-upload-template="active"] .upload-template-license svg,
html[data-upload-template="active"] .upload-template-track-remove svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
html[data-upload-template="active"] button.upload-template-track-remove { display: grid; place-items: center; width: 48px; min-width: 48px; height: 48px; padding: 10px; color: #da3833; background: transparent; border: 0; border-radius: 50%; }
html[data-upload-template="active"] button.upload-template-track-remove:hover { background: #fff0ee; }
html[data-upload-template="active"] button.upload-template-moderation-check { display: grid; place-items: center; width: 44px; min-width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: #e3f5ee; color: #286f60; font-size: 23px; }
html[data-upload-template="active"] .upload-template-check-dialog { width: min(460px, calc(100vw - 32px)); padding: 28px; border: 1px solid #ded6ed; border-radius: 24px; background: #fff; color: #21192e; font-size: 17px; line-height: 1.6; }
html[data-upload-template="active"] .upload-template-check-dialog::backdrop { background: #21192e70; }
html[data-upload-template="active"] .upload-template-check-dialog h3 { margin-top: 0; }
html[data-upload-template="active"] .upload-template-check-dialog { max-height: calc(100dvh - 48px); overflow: auto; }
html[data-upload-template="active"] .upload-template-check-dialog label { display: block; margin: 16px 0; }
html[data-upload-template="active"] .upload-template-check-dialog textarea { display: block; box-sizing: border-box; width: 100%; margin-top: 8px; padding: 12px; border: 1px solid #cfc5df; border-radius: 12px; background: #fff; color: #21192e; font: inherit; }
html[data-upload-template="active"] .upload-template-check-dialog button { margin: 8px 10px 0 0; }
html[data-upload-template="active"] .upload-template-quality-result { min-height: 44px; padding: 9px 14px; border: 0; border-radius: 999px; background: #f4edda; color: #655022; font: inherit; font-size: 16px; }
html[data-upload-template="active"] .upload-template-check-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
html[data-upload-template="active"] button.upload-template-quality-warning { display: grid; place-items: center; width: 44px; min-width: 44px; height: 44px; padding: 10px; border: 0; border-radius: 50%; background: #fff3d2; color: #805700; }
html[data-upload-template="active"] .upload-template-quality-warning svg { width: 24px; height: 24px; }
html[data-upload-template="active"] .upload-template-check-dialog button { min-height: 46px; padding: 10px 24px; background: #6950df; color: #fff; border: 0; border-radius: 999px; font: inherit; }
/* Task 695: uploader ticks belong only to its stage and body-mounted dialogs,
   not shared controls such as Privacy Choices (which owns its ::before tick).
   :where keeps specificity unchanged for the artwork exception below. */
html[data-upload-template="active"] :where([data-upload-stage], .upload-template-check-dialog, .workspace-upload-cover-request-dialog, .workspace-license-dialog, [data-upload-track-metadata-dialog], .workspace-artist-global-confirm) input[type="checkbox"] { appearance: none; display: inline-grid; place-content: center; width: 20px; height: 20px; min-width: 20px; border: 2px solid #8a77ba; border-radius: 4px; background: #fff; vertical-align: middle; }
html[data-upload-template="active"] :where([data-upload-stage], .upload-template-check-dialog, .workspace-upload-cover-request-dialog, .workspace-license-dialog, [data-upload-track-metadata-dialog], .workspace-artist-global-confirm) input[type="checkbox"]:checked::after { content: "✓"; color: #654cda; font-size: 16px; font-weight: 700; line-height: 1; }
/* Artwork already draws its tick with ::before in the shared workspace. */
html[data-upload-template="active"] :where([data-upload-stage], .upload-template-check-dialog, .workspace-upload-cover-request-dialog, .workspace-license-dialog, [data-upload-track-metadata-dialog], .workspace-artist-global-confirm) .workspace-package-artwork-ack-content input[type="checkbox"]::after { content: none; }
html[data-upload-template="active"] :where([data-upload-stage], .upload-template-check-dialog, .workspace-upload-cover-request-dialog, .workspace-license-dialog, [data-upload-track-metadata-dialog], .workspace-artist-global-confirm) input[type="checkbox"]:focus-visible { outline: 3px solid #b9a4fb; outline-offset: 3px; }
@media (forced-colors: active) {
  html[data-upload-template="active"] :where([data-upload-stage], .upload-template-check-dialog, .workspace-upload-cover-request-dialog, .workspace-license-dialog, [data-upload-track-metadata-dialog], .workspace-artist-global-confirm) .workspace-package-artwork-ack-content input[type="checkbox"] { appearance: auto; }
  html[data-upload-template="active"] :where([data-upload-stage], .upload-template-check-dialog, .workspace-upload-cover-request-dialog, .workspace-license-dialog, [data-upload-track-metadata-dialog], .workspace-artist-global-confirm) .workspace-package-artwork-ack-content input[type="checkbox"]::before { content: none; }
}
@media (max-width: 600px) {
  html[data-upload-template="active"] .upload-template-track-grip-placeholder { display: none; }
  html[data-upload-template="active"] button.upload-template-license { font-size: 16px; padding: 10px 12px; }
  html[data-upload-template="active"] .upload-template-track-actions { flex-wrap: wrap !important; gap: 10px; }
}
html[data-upload-template="active"] .upload-template-moderation-pill.is-retry,
html[data-upload-template="active"] .upload-template-analysis-subject > b.is-retry { background: #eee8fa; color: #66518b; border-color: #ddd2ef; }
html[data-upload-template="active"] button.upload-template-retry { border: 1px solid #c6b8e5; background: #fff; color: #6044a2; padding: 10px 16px; border-radius: 999px; font-size: 16px; white-space: nowrap; }
html[data-upload-template="active"] button.upload-template-retry:hover:not(:disabled) { background: #eee8fa; }
/* Task 662: failed checks and their resolution stay visibly connected. */
html[data-upload-template="active"] .upload-template-subject-group { min-width: 0; }
html[data-upload-template="active"] .upload-template-subject-group + .upload-template-subject-group { border-left: 1px solid #e9e5ec; }
html[data-upload-template="active"] .upload-template-subject-group > .upload-template-analysis-subject { width: 100%; }
html[data-upload-template="active"] .upload-template-subject-resolve { margin: 8px clamp(14px, 1.8vw, 30px) 4px; padding: 10px 16px; min-height: 44px; font-size: 14px; font-weight: 650; border-radius: 999px; }
html[data-upload-template="active"] .upload-template-check-alert { width: 22px; height: 22px; flex: 0 0 22px; display: inline-block; vertical-align: middle; fill: none; stroke: #b14450; stroke-width: 2; stroke-linecap: round; }
html[data-upload-template="active"] .upload-template-analysis-subject > b.is-retry,
html[data-upload-template="active"] .upload-template-analysis-subject > b.is-attention,
html[data-upload-template="active"] .upload-template-moderation-pill.is-retry { display: inline-flex; align-items: center; gap: 6px; color: #a23b47; background: #fff0f1; }
html[data-upload-template="active"] .upload-template-track-resolution { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
html[data-upload-template="active"] button.upload-template-retry,
html[data-upload-template="active"] button.upload-template-subject-resolve { border: 2px solid #aa92d4; background: #fff !important; color: #6044a2 !important; box-shadow: none; }
html[data-upload-template="active"] button.upload-template-retry:hover:not(:disabled),
html[data-upload-template="active"] button.upload-template-subject-resolve:hover:not(:disabled) { border-color: #6440b4; background: #eee7fa !important; color: #4f2d91 !important; text-decoration: underline; text-underline-offset: 3px; }
html[data-upload-template="active"] button.upload-template-retry:focus-visible,
html[data-upload-template="active"] button.upload-template-subject-resolve:focus-visible { outline: 3px solid #9875d2; outline-offset: 3px; }
@media (max-width: 780px) {
  html[data-upload-template="active"] .upload-template-subject-group + .upload-template-subject-group { border-left: 0; border-top: 1px solid #e9e5ec; }
}
html[data-upload-template="active"] button.upload-template-retry:disabled { opacity: .55; cursor: wait; }
@media (max-width: 600px) {
  html[data-upload-template="active"] .upload-template-track-row.is-expandable > .upload-template-track-actions { flex-wrap: wrap; gap: 10px; }
}

/* Task 670: explicit file-review navigation and readable package controls. */
html[data-upload-template="active"] .upload-template-notice-host,
html[data-upload-template="active"] [data-upload-playback-total][hidden],
html[data-upload-template="active"] [data-upload-playback-clocks][hidden],
html[data-upload-template="active"] .upload-template-package-page .workspace-package-guide-actions [data-upload-package-manage-files],
html[data-upload-template="active"] .upload-template-package-page[data-package-view="files"] [data-upload-discovery] > :not([data-upload-package-inventory]),
html[data-upload-template="active"] .upload-template-package-page:not([data-package-view="files"]) .workspace-package-inventory-guide-link {
  display: none !important;
}
html[data-upload-template="active"] .upload-template-package-page [data-upload-package-inventory] {
  padding: clamp(20px, 2.5vw, 36px);
  gap: 20px;
  scroll-margin-top: var(--upload-template-guidance-top, 190px);
}
html[data-upload-template="active"] .upload-template-package-page .workspace-package-guide-head {
  gap: 28px;
  padding: clamp(24px, 3vw, 40px);
}
html[data-upload-template="active"] .upload-template-package-page .workspace-package-guide-head > div > span,
html[data-upload-template="active"] .workspace-package-inventory > header > div > span { font-size: 16px; }
html[data-upload-template="active"] .upload-template-package-page .workspace-package-guide-head h3 { font-size: clamp(28px, 2.5vw, 40px); line-height: 1.2; }
html[data-upload-template="active"] .upload-template-package-page .workspace-package-guide-head aside { display: grid; gap: 8px; min-width: 210px; }
html[data-upload-template="active"] .upload-template-package-page .workspace-package-guide-head aside strong { font-size: 30px; color: #6548c5; line-height: 1.2; }
html[data-upload-template="active"] .upload-template-package-page .workspace-package-guide-head aside > span { font-size: 17px; color: #51465e; line-height: 1.4; }
html[data-upload-template="active"] .workspace-package-inventory h4 { font-size: 26px; line-height: 1.3; margin: 4px 0 8px; }
html[data-upload-template="active"] .workspace-package-inventory-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; font-size: 16px; color: #51465e; }
html[data-upload-template="active"] .workspace-package-inventory-facts > span { font-size: 16px; font-weight: 500; color: #51465e; text-transform: none; letter-spacing: normal; }
html[data-upload-template="active"] .workspace-package-inventory-header-actions { flex-wrap: wrap; gap: 16px; }
html[data-upload-template="active"] .workspace-package-inventory-header-actions button,
html[data-upload-template="active"] .workspace-package-inventory-guide-link button,
html[data-upload-template="active"] .upload-template-package-page .workspace-package-guide-actions button {
  min-height: 48px; padding: 12px 22px; font-size: 17px; font-weight: 650;
  border: 2px solid #b6a3de; border-radius: 999px; color: #5b3cac; background: #fff;
}
html[data-upload-template="active"] .workspace-package-inventory-header-actions [data-upload-package-inventory-add] {
  background: #7051d4; border-color: #7051d4; color: #fff;
}
html[data-upload-template="active"] .workspace-package-inventory-header-actions [data-upload-package-inventory-add]:hover { background: #5737b6; border-color: #5737b6; }
html[data-upload-template="active"] .workspace-package-inventory > nav { gap: 10px; }
html[data-upload-template="active"] .workspace-package-inventory > nav button { min-height: 44px; padding: 10px 16px; font-size: 15px; font-weight: 650; }
html[data-upload-template="active"] .workspace-package-inventory-list { max-height: 480px; }
html[data-upload-template="active"] .workspace-package-inventory-list article { grid-template-columns: 86px minmax(0, 1fr) auto auto; gap: 14px; padding: 16px; }
html[data-upload-template="active"] .workspace-package-inventory-list article > span { font-size: 12px; }
html[data-upload-template="active"] .workspace-package-inventory-list article strong { font-size: 16px; }
html[data-upload-template="active"] .workspace-package-inventory-list article small { font-size: 14px; line-height: 1.5; white-space: normal; overflow-wrap: anywhere; }
html[data-upload-template="active"] .workspace-package-inventory-list article b { font-size: 14px; }
html[data-upload-template="active"] .workspace-package-inventory-list article > button { min-height: 40px; font-size: 14px; padding: 8px 12px; }
html[data-upload-template="active"] .workspace-package-review-info { position: relative; display: inline-flex; flex: 0 0 auto; width: fit-content; max-width: 100%; margin: 4px 0; }
html[data-upload-template="active"] .workspace-package-file-count { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
html[data-upload-template="active"] .workspace-package-help-balloon { position: fixed; inset: auto; width: min(320px, calc(100vw - 32px)); box-sizing: border-box; margin: 0; padding: 18px 20px; border: 0; border-radius: 16px; color: #fff !important; background: #211b2c; box-shadow: 0 12px 35px #211b2c30; font: 400 15px/1.6 sans-serif; text-align: left; z-index: 50; }
html[data-upload-template="active"] .workspace-package-review-info > :is(summary, button) {
  display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid #bcb1cf;
  border-radius: 50%; background: #fff; color: #625275; font-size: 18px; font-weight: 650; cursor: pointer; list-style: none;
}
html[data-upload-template="active"] .workspace-package-review-info > summary::-webkit-details-marker { display: none; }
html[data-upload-template="active"] .workspace-package-review-info > p { max-width: 520px; margin: 10px 0 0; padding: 14px; background: #fff; color: #51465e; border: 1px solid #e1dbea; border-radius: 12px; font-size: 16px; line-height: 1.5; }
html[data-upload-template="active"] .workspace-package-review-info > :is(summary, button):focus-visible,
html[data-upload-template="active"] .workspace-package-inventory button:focus-visible { outline: 3px solid #8060cf; outline-offset: 3px; }
html[data-upload-template="active"] .workspace-package-review-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
html[data-upload-template="active"] .workspace-package-review-heading > h3 { margin: 0; }
html[data-upload-template="active"] .workspace-package-review-heading > details[open] { flex-basis: 100%; }
html[data-upload-template="active"] .workspace-package-quick-review .workspace-package-quick-approve { min-height: 52px; padding: 13px 18px; font-size: 18px; font-weight: 650; }
html[data-upload-template="active"] .workspace-package-quick-review .workspace-package-quick-actions { gap: 8px; }
html[data-upload-template="active"] .workspace-package-quick-review .workspace-package-quick-review-link { min-height: 44px; padding: 10px 12px; font-size: 16px; font-weight: 650; }
@media (max-width: 700px) {
  html[data-upload-template="active"] .workspace-package-inventory > header { flex-direction: column; align-items: stretch; }
  html[data-upload-template="active"] .workspace-package-inventory-header-actions { justify-content: flex-start; }
  html[data-upload-template="active"] .workspace-package-inventory-header-actions button { flex: 1 1 auto; }
  html[data-upload-template="active"] .upload-template-package-page .workspace-package-guide-head aside { min-width: 0; }
  html[data-upload-template="active"] .workspace-package-inventory-list article { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
  html[data-upload-template="active"] .workspace-package-inventory-list article > span { justify-self: start; }
  html[data-upload-template="active"] .workspace-package-inventory-list article > div { grid-column: 1 / -1; grid-row: 2; }
  html[data-upload-template="active"] .workspace-package-inventory-list article > button { grid-column: 2; grid-row: 1; }
  html[data-upload-template="active"] .workspace-package-inventory-list article > b { grid-column: 1 / -1; }
}

/* Task 682: the original certification control stays attached to the stage actions. */
html[data-upload-template="active"] .upload-template-certification-dock { grid-column: 1 / -1; grid-row: 1; padding: 0 2px 12px; border-bottom: 1px solid #e5ddeb; }
html[data-upload-template="active"] .upload-template-certification-dock[hidden] { display: none; }
html[data-upload-template="active"] .upload-template-certification-dock .workspace-creation-certification { margin: 0; padding: 0; align-items: start; cursor: pointer; }
html[data-upload-template="active"] .upload-template-certification-dock .workspace-creation-certification strong { font-size: 1rem; }
html[data-upload-template="active"] .upload-template-certification-dock .workspace-creation-certification small { font-size: .8rem; font-weight: 400; line-height: 1.4; }
html[data-upload-template="active"] .upload-template-certification-dock input { flex: 0 0 22px; width: 22px; height: 22px; }
html[data-upload-template="active"] .upload-template-certification-status { display: block; margin: 6px 0 0 32px; font-size: .8rem; font-weight: 600; color: #756880; }
html[data-upload-template="active"] .upload-template-certification-dock.is-certified .upload-template-certification-status { color: #287b62; }
html[data-upload-template="active"] .upload-template-certification-dock.has-certification-error .workspace-creation-certification strong { color: #ad344b; }
html[data-upload-template="active"] .upload-template-certification-dock .upload-template-error { margin: 8px 0 0; padding: 8px 12px; font-size: .85rem; }
html[data-upload-template="active"][data-upload-template-stage="4"] .upload-template-actions > [data-upload-template-back] { grid-row: 2; grid-column: 1; }
html[data-upload-template="active"][data-upload-template-stage="4"] .upload-template-actions > .upload-template-action-status { grid-row: 2; grid-column: 2; }
html[data-upload-template="active"][data-upload-template-stage="4"] .upload-template-actions > .upload-template-check-actions { grid-row: 2; grid-column: 3; }
@media (max-width: 900px) {
  html[data-upload-template="active"][data-upload-template-stage="4"] .upload-template-actions { grid-template-columns: repeat(2,minmax(0,1fr)); }
  html[data-upload-template="active"][data-upload-template-stage="4"] .upload-template-actions > .upload-template-action-status { display: none; }
  html[data-upload-template="active"][data-upload-template-stage="4"] .upload-template-actions > .upload-template-check-actions { grid-row: 2; grid-column: 2; }
  html[data-upload-template="active"] .upload-template-certification-dock .workspace-creation-certification small { font-size: .75rem; }
}

/* Task 681: connected destinations and future territory preferences, one surface. */
html[data-upload-template="active"] [data-upload-template-panel="4"] { background: #fff; }
html[data-upload-template="active"] .upload-template-audience-card {
  padding: 30px;
  border: 1px solid #e8e4ee;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 8px 30px rgba(33, 25, 47, .05);
}
html[data-upload-template="active"] .upload-template-audience-card > header h3 { margin: 0 0 8px; font-size: 1.45rem; }
html[data-upload-template="active"] .upload-template-audience-card > header p,
html[data-upload-template="active"] .upload-template-map-help { color: var(--upload-template-muted); font-size: 1rem; font-weight: 400; line-height: 1.5; }
html[data-upload-template="active"] .upload-template-audience-card .upload-template-destination-grid { gap: 30px; padding: 24px 0 30px; }
html[data-upload-template="active"] .upload-template-audience-card .upload-template-destination-card {
  padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none;
}
html[data-upload-template="active"] .upload-template-audience-card .upload-template-destination-card label { position: relative; padding: 8px; border-radius: 16px; }
html[data-upload-template="active"] .upload-template-audience-card .upload-template-destination-card input {
  position: absolute; width: 1px; height: 1px; opacity: 0; margin: 0;
}
html[data-upload-template="active"] .upload-template-destination-card small { font-size: 1rem; font-weight: 400; line-height: 1.5; }
html[data-upload-template="active"] .upload-template-connection-icon {
  display: grid; place-items: center; flex: 0 0 42px; width: 42px; height: 42px;
  border-radius: 50%; background: #f0eef4; color: #8a8296; transition: background-color .2s, color .2s;
}
html[data-upload-template="active"] .upload-template-connection-icon svg { width: 30px; height: 30px; }
html[data-upload-template="active"] .upload-template-connection-icon path { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
html[data-upload-template="active"] .upload-template-connection-icon .connection-check { display: none; }
html[data-upload-template="active"] .upload-template-destination-card input:checked + .upload-template-connection-icon { background: #32846d; color: #fff; }
html[data-upload-template="active"] .upload-template-destination-card input:checked + .upload-template-connection-icon .connection-check { display: block; stroke-dasharray: 30; animation: upload-connection-check .36s ease-out; }
html[data-upload-template="active"] .upload-template-destination-card input:checked + .upload-template-connection-icon .connection-off { display: none; }
html[data-upload-template="active"] .upload-template-destination-card input:focus-visible + .upload-template-connection-icon { outline: 3px solid var(--upload-template-purple); outline-offset: 4px; }
html[data-upload-template="active"] [data-destination-status] { display: block; margin-top: 10px; color: #756d7e; font-size: .9rem; font-weight: 600; }
html[data-upload-template="active"] .upload-template-destination-card input:checked ~ span [data-destination-status] { color: #26735e; }
@keyframes upload-connection-check { from { stroke-dashoffset: 30; } to { stroke-dashoffset: 0; } }
html[data-upload-template="active"] .upload-template-country-preferences { border-top: 1px solid var(--upload-template-line); padding-top: 28px; }
html[data-upload-template="active"] .upload-template-country-preferences > h3 { font-size: 1.25rem; line-height: 1.5; font-weight: 400; margin: 0 0 22px; }
html[data-upload-template="active"] .upload-template-country-preferences > h3 strong { font-weight: 700; }
html[data-upload-template="active"] .upload-template-country-preferences > .upload-template-segmented { margin-bottom: 24px; }
html[data-upload-template="active"] .upload-template-country-preferences > .upload-template-segmented button { min-width: 88px; min-height: 50px; font-size: 1.05rem; font-weight: 600; }
html[data-upload-template="active"] .upload-template-future-note { display: flex; align-items: start; gap: 14px; font-size: .95rem; line-height: 1.5; color: #6a6075; font-weight: 400; }
html[data-upload-template="active"] .upload-template-future-note strong { flex: 0 0 auto; color: #65509a; font-size: .8rem; background: #f3effc; padding: 5px 10px; border-radius: 999px; }
html[data-upload-template="active"] .upload-template-map-layout { display: grid; grid-template-columns: minmax(230px, .7fr) minmax(0, 1.7fr); gap: 24px; margin-top: 30px; align-items: center; }
html[data-upload-template="active"] .upload-template-map-controls { min-width: 0; }
html[data-upload-template="active"] .upload-template-map-controls h4 { margin: 0 0 16px; font-size: 1.15rem; }
html[data-upload-template="active"] .upload-template-map-controls > p { font-weight: 400; line-height: 1.5; overflow-wrap: anywhere; }
html[data-upload-template="active"] .upload-template-map-controls .upload-template-segmented button { font-weight: 600; padding: 10px 14px; }
html[data-upload-template="active"] [data-upload-template-territories-open] { min-height: 52px; padding: 12px 24px; border: 2px solid #397feb; border-radius: 999px; color: #2865bf; background: #fff; font: inherit; font-size: 1.05rem; font-weight: 600; cursor: pointer; }
html[data-upload-template="active"] .upload-template-map-frame { position: relative; min-width: 0; }
html[data-upload-template="active"] [data-upload-template-world-map] svg { display: block; width: 100%; height: auto; overflow: visible; }
html[data-upload-template="active"] [data-upload-template-world-map] path { fill: #347fdf; stroke: #fff; stroke-width: .6; vector-effect: non-scaling-stroke; }
html[data-upload-template="active"] [data-upload-template-world-map] path.is-excluded { fill: #c4c3d1; }
html[data-upload-template="active"] [data-upload-template-world-map] path.is-unmapped { fill: #e7e5ed; }
html[data-upload-template="active"] [data-upload-template-map-country] { cursor: pointer; transition: fill .15s; }
html[data-upload-template="active"] [data-upload-template-world-map] path[data-upload-template-map-country]:hover,
html[data-upload-template="active"] [data-upload-template-world-map] path[data-upload-template-map-country]:focus { fill: #8ab6f8; outline: none; stroke: #5543c6; stroke-width: 1.2; }
html[data-upload-template="active"] .upload-template-map-tooltip { position: absolute; z-index: 2; max-width: min(290px, 90%); padding: 9px 12px; border-radius: 8px; background: #604de1; color: #fff; pointer-events: none; font-size: .88rem; font-weight: 500; box-shadow: 0 6px 18px #21182c24; }
html[data-upload-template="active"] .upload-template-map-legend { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; font-size: .75rem; font-weight: 400; color: #706879; }
html[data-upload-template="active"] .upload-template-map-legend span::before { content: ''; display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 50%; background: #347fdf; }
html[data-upload-template="active"] .upload-template-map-legend span + span::before { background: #c4c3d1; }
html[data-upload-template="active"] .upload-template-region-buttons { display: grid; grid-template-columns: repeat(auto-fit,minmax(155px,1fr)); gap: 10px; margin-top: 24px; }
html[data-upload-template="active"] .upload-template-region-buttons button { text-align: left; padding: 15px; min-height: 76px; border: 1px solid #e1dbe9; border-radius: 16px; background: #fff; color: var(--upload-template-ink); cursor: pointer; font: inherit; }
html[data-upload-template="active"] .upload-template-region-buttons button:hover { border-color: #9380e7; background: #f8f5ff; }
html[data-upload-template="active"] .upload-template-region-buttons strong { display: block; font-size: 1rem; font-weight: 600; }
html[data-upload-template="active"] .upload-template-region-buttons small { display: block; margin-top: 6px; font-size: .75rem; color: #797080; font-weight: 400; }
html[data-upload-template="active"] .upload-template-region-note { margin-top: 18px; font-size: .8rem; color: #77707e; font-weight: 400; line-height: 1.5; }
html[data-upload-template="active"] .upload-template-region-note summary { cursor: pointer; min-height: 36px; padding-top: 8px; }
html[data-upload-template="active"] .upload-template-territory-dialog { width: min(900px,calc(100% - 24px)); max-height: 90dvh; color-scheme: light; }
html[data-upload-template="active"] .upload-template-territory-dialog > form { max-height: 90dvh; grid-template-rows: auto auto minmax(100px,1fr) auto; }
html[data-upload-template="active"] .upload-template-territory-dialog header,
html[data-upload-template="active"] .upload-template-territory-dialog footer { background: #fff; }
html[data-upload-template="active"] .upload-template-territory-dialog header h3 { margin: 8px 0 0; font-size: 1.5rem; }
html[data-upload-template="active"] .upload-template-territory-dialog header { border-bottom: 1px solid var(--upload-template-line); }
html[data-upload-template="active"] .upload-template-territory-dialog footer { border-top: 1px solid var(--upload-template-line); }
html[data-upload-template="active"] .upload-template-territory-tools { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.3fr); gap: 14px; padding: 18px 22px 8px; }
html[data-upload-template="active"] .upload-template-territory-tools label { font-size: .85rem; font-weight: 600; }
html[data-upload-template="active"] .upload-template-territory-tools input,
html[data-upload-template="active"] .upload-template-territory-tools select { display: block; width: 100%; min-width: 0; min-height: 48px; padding: 12px; margin: 6px 0 0; border: 1px solid #cdc5da; border-radius: 12px; color: #282330; background: #fff; font: inherit; font-size: 1rem; font-weight: 400; }
html[data-upload-template="active"] .upload-template-territory-tools input::placeholder { color: #81788c; opacity: 1; }
html[data-upload-template="active"] .upload-template-region-bulk { grid-column: 1/-1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
html[data-upload-template="active"] .upload-template-region-bulk button { min-height: 42px; padding: 9px 13px; border: 1px solid #dad2e7; border-radius: 999px; background: #fff; color: #6046ad; font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; }
html[data-upload-template="active"] [data-upload-template-territory-count] { margin-left: auto; color: #776d84; font-size: .8rem; font-weight: 400; }
html[data-upload-template="active"] .upload-template-territory-dialog .upload-template-territory-list { max-height: none; background: #fff; padding: 12px 22px; gap: 4px 12px; }
html[data-upload-template="active"] .upload-template-territory-list label { min-height: 54px; font-size: 1rem; font-weight: 400; }
html[data-upload-template="active"] .upload-template-territory-list small { display: block; margin-top: 3px; font-size: .75rem; color: #8a7e93; }
html[data-upload-template="active"] .upload-template-country-empty { grid-column: 1/-1; padding: 16px; font-size: 1rem; font-weight: 400; }
html[data-upload-template="active"] .upload-template-audience-card button:focus-visible,
html[data-upload-template="active"] .upload-template-territory-dialog button:focus-visible,
html[data-upload-template="active"] .upload-template-territory-dialog input:focus-visible,
html[data-upload-template="active"] .upload-template-territory-dialog select:focus-visible { outline: 2px solid var(--upload-template-purple); outline-offset: 3px; }
@media (max-width: 1000px) {
  html[data-upload-template="active"] .upload-template-map-layout { grid-template-columns: 1fr; }
  html[data-upload-template="active"] .upload-template-map-controls .upload-template-map-help { margin-bottom: 0; }
}
@media (max-width: 600px) {
  html[data-upload-template="active"] .upload-template-audience-card { padding: 20px 16px; border-radius: 22px; }
  html[data-upload-template="active"] .upload-template-audience-card .upload-template-destination-grid { gap: 20px; }
  html[data-upload-template="active"] .upload-template-region-buttons { grid-template-columns: repeat(2,minmax(0,1fr)); }
  html[data-upload-template="active"] .upload-template-future-note { flex-direction: column; gap: 6px; }
  html[data-upload-template="active"] .upload-template-territory-tools { grid-template-columns: 1fr; padding: 12px 16px 8px; gap: 8px; }
  html[data-upload-template="active"] .upload-template-territory-dialog .upload-template-territory-list { grid-template-columns: 1fr; padding: 8px 16px; }
  html[data-upload-template="active"] .upload-template-territory-dialog header,
  html[data-upload-template="active"] .upload-template-territory-dialog footer { padding: 14px 16px; }
  html[data-upload-template="active"] [data-upload-template-territory-count] { width: 100%; margin: 3px 0; }
}
@media (prefers-reduced-motion: reduce) {
  html[data-upload-template="active"] .upload-template-connection-icon,
  html[data-upload-template="active"] .upload-template-connection-icon path,
  html[data-upload-template="active"] [data-upload-template-map-country] { animation: none !important; transition: none; }
}

/* Task 680: one white Schedule surface with a natural vertical reading order. */
html[data-upload-template="active"] [data-upload-template-panel="3"] {
  background: #fff;
}
html[data-upload-template="active"] .upload-template-schedule-fields > .upload-template-field-card {
  padding: 26px 0;
  border: 0;
  border-bottom: 1px solid var(--upload-template-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
html[data-upload-template="active"] .upload-template-schedule-fields > .upload-template-field-card:first-child {
  padding-top: 0;
}
html[data-upload-template="active"] .upload-template-schedule-fields input[type="date"],
html[data-upload-template="active"] .upload-template-schedule-fields input[type="time"] {
  max-width: 620px;
  color-scheme: light;
}
/* Keep the browser's accessible calendar and its native min/max disabled dates. */
html[data-upload-template="active"] .upload-template-schedule-fields input::-webkit-calendar-picker-indicator {
  display: block;
  opacity: 1;
  filter: none;
  width: 22px;
  height: 22px;
  padding: 7px;
  cursor: pointer;
}
html[data-upload-template="active"] [data-upload-template-panel="3"] .upload-template-switch {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 12px;
}
html[data-upload-template="active"] [data-upload-template-panel="3"] .upload-template-switch input {
  width: 22px;
  height: 22px;
  margin: 1px 0 0;
}
html[data-upload-template="active"] [data-upload-template-time-field]:not([hidden]) {
  display: block;
  max-width: 300px;
  margin-top: 18px;
}
html[data-upload-template="active"] [data-upload-template-panel="3"] .upload-template-service-cards {
  margin: 28px 0 16px;
}
html[data-upload-template="active"] [data-upload-template-panel="3"] .upload-template-service-card {
  min-height: 180px;
  padding-top: 44px;
  background: #fff;
}
html[data-upload-template="active"] [data-upload-template-panel="3"] .upload-template-service-card.is-selected {
  border-color: var(--upload-template-purple);
  outline: 2px solid #e8e1fa;
  outline-offset: 0;
}
html[data-upload-template="active"] [data-upload-template-panel="3"] .upload-template-service-card input[type="radio"] {
  appearance: none;
  border: 1.5px solid #aaa2b8;
  border-radius: 50%;
  background: #fff;
}
html[data-upload-template="active"] [data-upload-template-panel="3"] .upload-template-service-card input:checked {
  border-color: var(--upload-template-purple);
  background: var(--upload-template-purple);
  box-shadow: inset 0 0 0 4px #fff;
}
html[data-upload-template="active"] [data-upload-template-panel="3"] .upload-template-service-card input:focus-visible {
  outline: 2px solid var(--upload-template-purple);
  outline-offset: 3px;
}
@media (min-width: 701px) {
  html[data-upload-template="active"] [data-upload-template-panel="3"] .upload-template-service-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
html[data-upload-template="active"] .upload-template-schedule-policy {
  margin: 0;
  color: var(--upload-template-muted);
  font-size: .9rem;
}
html[data-upload-template="active"] .upload-template-publication-signoff {
  margin-top: 28px;
  padding-top: 26px;
  border-top: 1px solid var(--upload-template-line);
}
html[data-upload-template="active"] .upload-template-publication-signoff h3 {
  margin: 0 0 16px;
  font-size: 1.35rem;
  line-height: 1.25;
}
html[data-upload-template="active"] .upload-template-publication-signoff small {
  max-width: 850px;
}

/* Task 659: one connected stage/allowance surface and a comfortable primary action. */
html[data-upload-template="active"] .upload-template-flow {
  margin-bottom: 0;
  border: 0;
  border-radius: 22px 22px 0 0;
  background: #fff;
  box-shadow: none;
}
html[data-upload-template="active"] .upload-template-allowance-host {
  margin: 0 0 20px;
  border: 0;
  border-radius: 0 0 22px 22px;
  background: #fff;
  box-shadow: none;
}
html[data-upload-template="active"] .upload-template-allowance-host .workspace-upload-entitlement {
  margin: 0;
  padding: 18px 22px 22px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
html[data-upload-template="active"] .workspace-package-quick-review [data-upload-package-quick-continue] {
  min-height: 72px;
  min-width: 280px;
  max-width: 100%;
  padding: 18px 32px;
  font-size: 22px;
  font-weight: 750;
  line-height: 1.3;
  white-space: normal;
}
@media (max-width: 600px) {
  html[data-upload-template="active"] .upload-template-allowance-host .workspace-upload-entitlement { padding: 16px 18px 20px; }
  html[data-upload-template="active"] .workspace-package-quick-review [data-upload-package-quick-continue] {
    flex-basis: 100%;
    width: 100%;
    min-width: 0;
    min-height: 68px;
    padding: 17px 20px;
    font-size: 20px;
  }
}

/* Studio Task 698: calm, progressive upload-limit guidance. */
html[data-upload-template="active"] .upload-template-banner[hidden],
html[data-upload-template="active"] .upload-template-banner[data-upload-template-guide-state="hidden"] {
  display: none !important;
}

html[data-upload-template="active"] .workspace-upload-preflight-dialog.upload-template-limits-dialog {
  width: min(1040px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid rgba(107, 77, 203, .24);
  border-top: 6px solid #805ce7;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 34px 110px rgba(32, 23, 46, .34);
}

html[data-upload-template="active"] .workspace-upload-preflight-dialog.upload-template-limits-dialog::backdrop {
  background: rgba(20, 16, 27, .64);
  backdrop-filter: blur(7px);
}

html[data-upload-template="active"] .upload-template-limits-dialog .workspace-upload-dialog-shell {
  gap: 22px;
  max-width: none;
  padding: clamp(24px, 4vw, 38px);
  border-radius: 22px;
  background:
    radial-gradient(circle at 94% 2%, rgba(93, 194, 226, .15), transparent 18rem),
    radial-gradient(circle at 6% 4%, rgba(132, 92, 231, .12), transparent 17rem),
    linear-gradient(145deg, #fff 0%, #fbf9ff 62%, #f4fffd 100%) !important;
}

html[data-upload-template="active"] .upload-template-limits-dialog header {
  align-items: center;
  gap: 20px;
}

html[data-upload-template="active"] .upload-template-limits-dialog header > div {
  gap: 7px;
}

html[data-upload-template="active"] .upload-template-limits-dialog header span {
  color: #6944cc;
  font-size: .76rem;
  letter-spacing: .11em;
}

html[data-upload-template="active"] .upload-template-limits-dialog h3 {
  color: #18131d !important;
  font-size: clamp(1.8rem, 4vw, 2.65rem);
  line-height: 1.06;
}

html[data-upload-template="active"] .upload-template-limits-dialog header small {
  color: #696170 !important;
  font-size: .88rem;
  line-height: 1.45;
}

html[data-upload-template="active"] .upload-template-limits-dialog header > button {
  width: 46px;
  height: 46px;
  flex-basis: 46px;
  border-color: #d8d0e4;
  color: #3b3044;
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 7px 20px rgba(45, 31, 61, .08);
  transition: color .16s ease, background .16s ease, transform .16s ease;
}

html[data-upload-template="active"] .upload-template-limits-dialog header > button:hover,
html[data-upload-template="active"] .upload-template-limits-dialog header > button:focus-visible {
  color: #fff;
  background: #241b2b;
  outline: 3px solid rgba(113, 79, 220, .2);
  outline-offset: 2px;
  transform: rotate(4deg);
}

html[data-upload-template="active"] .upload-template-limits-dialog .workspace-upload-preflight-limits {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 13px;
}

html[data-upload-template="active"] .upload-template-limits-dialog .workspace-upload-preflight-limits article {
  position: relative;
  align-content: start;
  gap: 9px;
  min-height: 132px;
  padding: 19px;
  overflow: hidden;
  border: 1px solid rgba(105, 73, 206, .17);
  border-radius: 20px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 10px 26px rgba(60, 40, 105, .07);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

html[data-upload-template="active"] .upload-template-limits-dialog .workspace-upload-preflight-limits article::before {
  color: #7a61bc;
  content: attr(data-upload-limit-kind);
  font-size: .63rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

html[data-upload-template="active"] .upload-template-limits-dialog .workspace-upload-preflight-limits article:nth-child(2),
html[data-upload-template="active"] .upload-template-limits-dialog .workspace-upload-preflight-limits article:nth-child(5) {
  background: linear-gradient(145deg, rgba(255, 255, 255, .92), rgba(229, 250, 255, .76));
}

html[data-upload-template="active"] .upload-template-limits-dialog .workspace-upload-preflight-limits article:nth-child(3) {
  background: linear-gradient(145deg, rgba(255, 255, 255, .92), rgba(244, 238, 255, .82));
}

html[data-upload-template="active"] .upload-template-limits-dialog .workspace-upload-preflight-limits article:hover {
  border-color: rgba(105, 73, 206, .34);
  box-shadow: 0 14px 30px rgba(60, 40, 105, .11);
  transform: translateY(-2px);
}

html[data-upload-template="active"] .upload-template-limits-dialog .workspace-upload-preflight-limits b {
  color: #6843d1;
  font-size: clamp(1.65rem, 3vw, 2.15rem);
  line-height: 1;
  text-shadow: none;
}

html[data-upload-template="active"] .upload-template-limits-dialog .workspace-upload-preflight-limits span {
  color: #5f5765;
  font-size: .78rem;
  line-height: 1.42;
}

html[data-upload-template="active"] .upload-template-limits-dialog > .workspace-upload-dialog-shell > p {
  max-width: 900px;
  padding: 0 3px;
  color: #5d5561 !important;
  font-size: .86rem;
  line-height: 1.62;
}

html[data-upload-template="active"] .upload-template-limits-dialog aside {
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 3px 13px;
  padding: 16px 18px;
  border: 1px solid rgba(102, 73, 198, .15);
  border-left: 4px solid #7452db;
  border-radius: 5px 17px 17px 5px;
  background: rgba(244, 240, 251, .86);
}

html[data-upload-template="active"] .upload-template-limits-dialog aside::before {
  display: grid;
  grid-row: 1 / 3;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #6b49cd;
  content: "i";
  font-size: .78rem;
  font-weight: 900;
}

html[data-upload-template="active"] .upload-template-limits-dialog aside strong,
html[data-upload-template="active"] .upload-template-limits-dialog aside small {
  grid-column: 2;
}

html[data-upload-template="active"] .upload-template-limits-dialog aside strong {
  color: #2e2634 !important;
  font-size: .82rem;
}

html[data-upload-template="active"] .upload-template-limits-dialog aside small {
  color: #68606c !important;
  font-size: .72rem;
  line-height: 1.48;
}

html[data-upload-template="active"] .upload-template-limits-dialog footer .is-primary {
  min-height: 50px;
  padding: 11px 26px;
  border: 1px solid #6241c5;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #7452db, #6543cb);
  box-shadow: 0 10px 24px rgba(89, 55, 179, .2);
  font-size: .82rem;
}

html[data-upload-template="active"] .upload-template-limits-dialog footer .is-primary:hover,
html[data-upload-template="active"] .upload-template-limits-dialog footer .is-primary:focus-visible {
  background: #17131c;
  outline: 3px solid rgba(112, 78, 219, .19);
  outline-offset: 2px;
}

@media (max-width: 860px) {
  html[data-upload-template="active"] .upload-template-limits-dialog .workspace-upload-preflight-limits {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  html[data-upload-template="active"] .upload-template-limits-dialog .workspace-upload-preflight-limits article:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  html[data-upload-template="active"] .workspace-upload-preflight-dialog.upload-template-limits-dialog {
    width: calc(100vw - 18px);
    border-radius: 22px;
  }

  html[data-upload-template="active"] .upload-template-limits-dialog .workspace-upload-dialog-shell {
    gap: 16px;
    padding: 20px 16px;
  }

  html[data-upload-template="active"] .upload-template-limits-dialog .workspace-upload-preflight-limits {
    grid-template-columns: 1fr;
  }

  html[data-upload-template="active"] .upload-template-limits-dialog .workspace-upload-preflight-limits article,
  html[data-upload-template="active"] .upload-template-limits-dialog .workspace-upload-preflight-limits article:last-child {
    grid-column: auto;
    min-height: 0;
  }

  html[data-upload-template="active"] .upload-template-limits-dialog header > button {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }
}
/* Task 718: explicit declaration stays adjacent to the action it enables. */
html[data-upload-template="active"] .upload-track-content { border: 1px solid #dcd5f7; border-radius: 22px; padding: clamp(18px, 2vw, 28px); margin: 0 0 28px; background: linear-gradient(120deg, #faf8ff, #f6fbf9); color: #262332; }
html[data-upload-template="active"] .upload-track-content > header,
html[data-upload-template="active"] .upload-track-content > footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
html[data-upload-template="active"] .upload-track-content h3 { margin: 3px 0 8px; font-size: 23px; }
html[data-upload-template="active"] .upload-track-content p { margin: 12px 0; line-height: 1.55; }
html[data-upload-template="active"] .upload-track-content > header > span { padding: 7px 12px; border-radius: 20px; background: #ebe6fa; font-size: 13px; }
html[data-upload-template="active"] .upload-track-content fieldset { border: 0; padding: 20px 0; margin: 12px 0; min-width: 0; border-top: 1px solid #ded8ea; }
html[data-upload-template="active"] .upload-track-content legend { font-weight: 650; padding-top: 15px; }
html[data-upload-template="active"] .upload-track-content-options { display: flex; flex-wrap: wrap; gap: 10px; }
html[data-upload-template="active"] .upload-track-content label { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
html[data-upload-template="active"] .upload-track-content-options label { padding: 11px 16px; border: 1px solid #d3cbe9; border-radius: 14px; background: #fff; }
html[data-upload-template="active"] .upload-track-content-options label:has(input:checked) { border-color: #7054d8; background: #f0ebff; }
html[data-upload-template="active"] .upload-track-content input { accent-color: #6b50d2; width: 18px; height: 18px; flex: 0 0 18px; margin-top: 2px; }
html[data-upload-template="active"] .upload-track-content-track-choices { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-top: 20px; }
html[data-upload-template="active"] .upload-track-content-processing { font-size: 13px; color: #5f596d; }
html[data-upload-template="active"] .upload-track-content-restore { padding: 12px; border-left: 3px solid #7560d8; background: #efeafa; }
html[data-upload-template="active"] .upload-track-content [role="alert"] { color: #842638; }
@media (forced-colors: active) { html[data-upload-template="active"] .upload-track-content { border-color: CanvasText; } }
html[data-upload-template="active"] .upload-track-content p,
html[data-upload-template="active"] .upload-track-content label > span { font-weight: 400; }
html[data-upload-template="active"] .upload-track-content input[type="radio"] { appearance: none; display: inline-grid; place-content: center; border: 2px solid #a59db2; border-radius: 50%; background: #fff; box-shadow: none; padding: 0; }
html[data-upload-template="active"] .upload-track-content input[type="radio"]:checked { border-color: #7054d8; }
html[data-upload-template="active"] .upload-track-content input[type="radio"]:checked::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #7054d8; }
html[data-upload-template="active"] .upload-track-content input[type="radio"]:focus-visible { outline: 3px solid #bba9f0; outline-offset: 3px; }
html[data-upload-template="active"] .upload-track-content :is(input, button, summary) { scroll-margin-block: calc(var(--upload-template-guidance-top, 190px) + 130px) 130px; }
