body.is-direct-workspace {
  min-height: 100vh;
}

body.is-direct-workspace .site-footer {
  display: none;
}

.tior-workspace,
.tior-workspace *,
.tior-workspace *::before,
.tior-workspace *::after {
  box-sizing: border-box;
}

.tior-workspace [hidden] {
  display: none !important;
}

.tior-workspace {
  --surface: var(--theme-workspace-canvas, #000);
  --surface-raised: var(--theme-workspace-surface, #000);
  --workspace-panel: var(--surface-raised);
  --workspace-panel-soft: var(--surface);
  --workspace-canvas: var(--surface);
  --workspace-control: var(--surface-raised);
  --workspace-hover: var(--surface-raised);
  --workspace-accent: var(--text);
  --workspace-detail-control-size: 12px;
  --workspace-detail-control-weight: 500;
  --workspace-detail-control-line-height: 17px;
  --workspace-detail-estimate-size: 12px;
  --workspace-detail-estimate-line-height: 17px;
  --workspace-detail-support-size: 11px;
  --workspace-detail-support-line-height: 15px;
  --workspace-detail-editorial-weight: 500;
  width: min(1500px, calc(100% - var(--page) * 2));
  margin-inline: auto;
  padding: 92px 0 54px;
  color: var(--text);
  font-family: var(--font-ui);
}

.tior-workspace__bar {
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 4px;
}

.tior-workspace__bar--actions-only {
  justify-content: flex-end;
}

.tior-workspace__breadcrumb,
.tior-workspace__breadcrumb a,
.tior-workspace__bar-actions {
  display: flex;
  align-items: center;
}

.tior-workspace__breadcrumb {
  min-width: 0;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.tior-workspace__breadcrumb a {
  min-height: 44px;
  gap: 9px;
  color: var(--text);
}

.tior-workspace__breadcrumb svg {
  width: 17px;
  height: 17px;
  transform: rotate(180deg);
}

.tior-workspace__breadcrumb > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tior-workspace__bar-actions {
  flex: 0 0 auto;
  gap: 10px;
}

.tior-workspace__notice span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #a0a0a0;
  box-shadow: 0 0 0 4px color-mix(in srgb, #a0a0a0 13%, transparent);
}

.tior-workspace__info {
  position: relative;
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--font-editorial);
  font-size: 17px;
  font-weight: var(--workspace-detail-editorial-weight);
  font-style: italic;
  line-height: 1;
  cursor: pointer;
}

.tior-workspace__info::after {
  position: absolute;
  right: 0;
  bottom: 8px;
  left: 0;
  height: 1px;
  transform: scaleX(0);
  transform-origin: right center;
  background: currentColor;
  content: '';
  transition: transform 180ms ease;
}

.tior-workspace__info:hover::after,
.tior-workspace__info:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left center;
}

.tior-workspace__info--with-icon { gap: 8px; }
.tior-workspace__info--with-icon > svg { width: 20px; height: 20px; flex: 0 0 20px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.tior-workspace__info--with-icon::after { left: 28px; }

.tior-workspace__layout {
  display: grid;
  min-height: min(790px, calc(100vh - 150px));
  overflow: hidden;
  grid-template-columns: minmax(340px, 420px) minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--workspace-panel);
  box-shadow: 0 24px 70px color-mix(in srgb, #000 15%, transparent);
  corner-shape: squircle;
}

.tior-workspace__inspector {
  min-width: 0;
  border-right: 1px solid var(--line);
  background: var(--workspace-panel-soft);
}

.tior-workspace__intro {
  padding: 32px 30px 29px;
  border-bottom: 1px solid var(--line);
}

.tior-workspace__eyebrow,
.tior-workspace__section legend,
.tior-workspace__field > span,
.tior-workspace__estimate span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.tior-workspace__eyebrow {
  margin: 0 0 11px;
}

.tior-workspace__intro h1,
.tior-workspace__result-state h2,
.tior-workspace__progress h2,
.tior-workspace__results h2 {
  margin: 0;
  color: var(--text);
  font-weight: 600;
  letter-spacing: -.035em;
}

.tior-workspace__intro h1 {
  font-size: clamp(28px, 2.25vw, 38px);
  line-height: 1.08;
}

.tior-workspace__intro > p:last-child {
  margin: 15px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 21px;
}

.tior-workspace__auth-gate {
  margin: 26px 26px 0;
  padding: 26px;
  border-radius: 22px;
  background: var(--workspace-control);
  text-align: center;
  corner-shape: squircle;
}

.tior-workspace__auth-gate p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 15px;
  line-height: 21px;
}

.tior-workspace__auth-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.tior-workspace__auth-actions[hidden] {
  display: none;
}

.tior-workspace__form {
  display: grid;
}

.tior-workspace__form[hidden] {
  display: none;
}

.tior-workspace__section {
  display: grid;
  min-width: 0;
  gap: 18px;
  margin: 0;
  padding: 25px 30px 28px;
  border: 0;
  border-bottom: 1px solid var(--line);
}

.tior-workspace__section legend {
  float: left;
  width: 100%;
  margin: 0 0 2px;
  padding: 0;
  color: var(--text);
}

.tior-workspace__field {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.tior-workspace__field input:not(.tior-workspace__file-input),
.tior-workspace__field select,
.tior-workspace__field textarea {
  width: 100%;
  border: 1px solid var(--line);
  outline: 0;
  background: var(--workspace-control);
  color: var(--text);
  font: var(--workspace-detail-control-weight) var(--workspace-detail-control-size)/var(--workspace-detail-control-line-height) var(--font-ui);
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.tior-workspace__field input:not(.tior-workspace__file-input),
.tior-workspace__field select {
  min-height: 48px;
  padding: 0 17px;
  border-radius: 999px;
  corner-shape: round;
}

.tior-workspace__field textarea {
  min-height: 112px;
  resize: vertical;
  padding: 14px 16px;
  border-radius: 18px;
  corner-shape: squircle;
}

.tior-workspace__field input:focus-visible,
.tior-workspace__field select:focus-visible,
.tior-workspace__field textarea:focus-visible,
.tior-workspace__file-input:focus-visible + .tior-workspace__file-control {
  border-color: var(--focus-ring);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus-ring) 18%, transparent);
}

.tior-workspace__field input::placeholder,
.tior-workspace__field textarea::placeholder {
  color: var(--muted);
  opacity: .82;
}

.tior-workspace__file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.tior-workspace__file-control,
.tior-workspace__upload {
  display: flex;
  min-height: 64px;
  align-items: center;
  gap: 13px;
  padding: 10px 17px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--workspace-control);
  color: var(--text);
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, transform 110ms ease;
  corner-shape: round;
}

.tior-workspace__file-control:hover {
  border-color: var(--line-strong);
  background: var(--workspace-hover);
}

.tior-workspace__file-control:active {
  transform: scale(.99);
}

.tior-workspace__file-control > svg,
.tior-workspace__upload > svg {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  color: var(--muted);
}

.tior-workspace__file-control > span,
.tior-workspace__upload {
  min-width: 0;
}

.tior-workspace__file-control strong,
.tior-workspace__file-control small,
.tior-workspace__upload strong,
.tior-workspace__upload small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tior-workspace__file-control strong,
.tior-workspace__upload strong {
  font-size: 15px;
  font-weight: 600;
  line-height: 20px;
}

.tior-workspace__file-control small,
.tior-workspace__upload small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
}

.tior-workspace__upload {
  display: grid;
  min-height: 96px;
  place-items: center;
  gap: 2px;
  border-radius: 20px;
  cursor: default;
  text-align: center;
  corner-shape: squircle;
}

.tior-workspace__upload.is-disabled,
.tior-workspace__section:disabled {
  opacity: .66;
}

.tior-workspace__space-meta,
.tior-workspace__portfolio-summary,
.tior-workspace__credit-note,
.tior-workspace__form-status,
.tior-workspace__products > p,
.tior-workspace__result-note,
.tior-workspace__empty-result {
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
}

.tior-workspace__space-meta {
  margin-top: -6px;
}

.tior-workspace__portfolio-summary {
  width: 100%;
  display: grid;
  min-height: 64px;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--workspace-control);
  color: var(--muted);
  font: inherit;
  text-align: left;
  cursor: pointer;
  corner-shape: squircle;
  transition: border-color 160ms ease, background-color 160ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .tior-workspace__portfolio-summary:hover {
    border-color: color-mix(in srgb, var(--text) 28%, var(--line));
    background: var(--workspace-control);
  }
}

.tior-workspace__portfolio-summary:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.tior-workspace__portfolio-summary > img,
.tior-workspace__portfolio-summary > i {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--surface);
  object-fit: cover;
  corner-shape: squircle;
}

.tior-workspace__portfolio-summary > span,
.tior-workspace__portfolio-summary strong,
.tior-workspace__portfolio-summary small {
  display: block;
  min-width: 0;
}

.tior-workspace__portfolio-browse {
  align-self: center;
  color: var(--muted);
  font-family: var(--font-editorial);
  font-size: 13px;
  font-style: italic;
  line-height: 18px;
  white-space: nowrap;
}

.tior-workspace__portfolio-summary strong,
.tior-workspace__portfolio-summary small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tior-workspace__portfolio-summary strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 19px;
}

.tior-workspace__portfolio-summary small {
  margin-top: 2px;
  font-size: 13px;
  line-height: 18px;
}

.tior-workspace__products {
  display: grid;
  gap: 8px;
}

.tior-workspace__product {
  position: relative;
  display: block;
}

.tior-workspace__product > input {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  width: 20px;
  height: 20px;
  accent-color: var(--text);
}

.tior-workspace__product > span {
  display: grid;
  min-height: 64px;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 8px 40px 8px 8px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--workspace-control);
  transition: border-color 160ms ease, background-color 160ms ease;
  corner-shape: squircle;
}

.tior-workspace__product > input:checked + span {
  border-color: var(--line-strong);
  background: var(--workspace-hover);
}

.tior-workspace__product img,
.tior-workspace__product i {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--surface);
  object-fit: cover;
  corner-shape: squircle;
}

.tior-workspace__product strong,
.tior-workspace__product small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tior-workspace__product strong {
  font-size: 14px;
  font-weight: 600;
  line-height: 19px;
}

.tior-workspace__product small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
}

.tior-workspace__estimate {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.tior-workspace__estimate > div {
  display: grid;
  gap: 4px;
  padding: 20px 30px;
}

.tior-workspace__estimate > div + div {
  border-left: 1px solid var(--line);
}

.tior-workspace__estimate strong {
  font-size: var(--workspace-detail-estimate-size);
  font-weight: 600;
  line-height: var(--workspace-detail-estimate-line-height);
}

.tior-workspace__primary,
.tior-workspace__secondary {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: var(--action-radius, 14px); corner-shape: squircle;
  font-size: 13px;
  font-weight: 650;
  line-height: 18px;
  letter-spacing: .045em;
  text-transform: uppercase;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  transition: background-color .16s ease-out, border-color .16s ease-out, color .16s ease-out, opacity .16s ease-out, transform .16s var(--motion-direct);
}

.tior-workspace__primary {
  width: calc(100% - 60px);
  margin: 22px 30px 0;
  border: 1px solid var(--action-primary-border);
  background: var(--action-primary-fill);
  color: var(--action-primary-foreground);
}

.tior-workspace__secondary {
  border: 1px solid var(--action-secondary-border);
  background: var(--action-secondary-fill);
  color: var(--action-secondary-foreground);
}

.tior-workspace__primary:hover:not(:disabled),
.tior-workspace__primary:focus-visible:not(:disabled) {
  border-color: var(--action-primary-hover-border);
  background: var(--action-primary-hover-fill);
  color: var(--action-primary-foreground);
}

.tior-workspace__secondary:hover,
.tior-workspace__secondary:focus-visible {
  border-color: var(--text);
  color: var(--action-secondary-foreground);
}

.tior-workspace__primary:active:not(:disabled),
.tior-workspace__secondary:active { opacity: 1; transform: scale(.985); }

.tior-workspace__primary svg {
  width: 16px;
  height: 16px;
}

.tior-workspace__primary:disabled {
  border-color: var(--action-primary-disabled-border);
  background: var(--action-primary-disabled-fill);
  color: var(--action-primary-disabled-foreground);
  box-shadow: var(--action-primary-disabled-shadow);
  opacity: var(--action-primary-disabled-opacity);
  cursor: not-allowed;
}

.tior-workspace__credit-note,
.tior-workspace__form-status {
  margin: 10px 30px 0;
  font-size: var(--workspace-detail-support-size);
  line-height: var(--workspace-detail-support-line-height);
  text-align: center;
}

.tior-workspace__form-status {
  min-height: 38px;
  margin-top: 5px;
  color: var(--text);
}

.tior-workspace__canvas {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 690px;
  align-content: center;
  padding: clamp(28px, 4vw, 58px);
  overflow: hidden;
  background-color: var(--workspace-canvas);
  background-image: radial-gradient(circle at center, color-mix(in srgb, var(--text) 8%, transparent) .75px, transparent .9px);
  background-size: 20px 20px;
}

.tior-workspace__canvas::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 46%, color-mix(in srgb, var(--surface-raised) 54%, transparent), transparent 64%);
  content: '';
}

.tior-workspace__result-state,
.tior-workspace__progress,
.tior-workspace__results {
  position: relative;
  z-index: 1;
}

.tior-workspace__result-state,
.tior-workspace__progress {
  width: min(520px, 100%);
  margin: auto;
  text-align: center;
}

.tior-workspace__result-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 25px;
  color: var(--muted);
}

.tior-workspace__result-state h2,
.tior-workspace__progress h2,
.tior-workspace__results h2 {
  font-size: clamp(24px, 2.1vw, 34px);
  line-height: 1.12;
}

.tior-workspace__result-state > p:not(.tior-workspace__eyebrow),
.tior-workspace__progress > p:not(.tior-workspace__eyebrow) {
  margin: 14px auto 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 22px;
}

.tior-workspace__notice {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  margin-top: 25px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--workspace-control);
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
  corner-shape: round;
}

.tior-workspace__source-preview {
  position: absolute;
  z-index: 2;
  top: 24px;
  right: 24px;
  width: min(180px, 28%);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: var(--surface-raised);
  box-shadow: 0 18px 44px color-mix(in srgb, #000 22%, transparent);
  corner-shape: squircle;
}

.tior-workspace__source-preview img,
.tior-workspace__source-preview video {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.tior-workspace__progress > span {
  display: block;
  width: 48px;
  height: 48px;
  margin: 0 auto 25px;
  border: 2px solid var(--line);
  border-top-color: var(--text);
  border-radius: 50%;
  animation: tior-workspace-spin 1.15s linear infinite;
}

.tior-workspace__progress > div {
  width: min(360px, 86%);
  height: 4px;
  margin: 27px auto 0;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line);
}

.tior-workspace__progress i {
  display: block;
  width: 18%;
  height: 100%;
  border-radius: inherit; corner-shape: squircle;
  background: var(--text);
  transition: width 380ms ease;
}

.tior-workspace__results {
  align-self: stretch;
}

.tior-workspace__results > header {
  display: grid;
  min-height: 22px;
  margin-bottom: 14px;
  place-items: center;
  text-align: center;
}

.tior-workspace__results > header h2 {
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
}

.tior-workspace__secondary {
  flex: 0 0 auto;
  padding-inline: 18px;
}

.tior-workspace__result-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.tior-workspace__result-card {
  display: flex;
  min-width: 0;
  margin: 0;
  justify-content: center;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.tior-workspace__result-preview {
  position: relative;
  display: grid;
  width: auto;
  max-width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: inherit;
  cursor: zoom-in;
  isolation: isolate;
  corner-shape: squircle;
}

.tior-workspace__result-preview::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  border-radius: inherit; corner-shape: squircle;
  box-shadow: inset 0 0 0 1px var(--line);
  content: "";
  pointer-events: none;
}

.tior-workspace__result-preview:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
}

.tior-workspace__result-card img,
.tior-workspace__result-card video {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(60vh, 620px);
  background: var(--workspace-canvas);
  object-fit: contain;
}

.tior-workspace__result-candidates {
  display: flex;
  max-width: 100%;
  justify-content: center;
  gap: 8px;
  padding: 3px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tior-workspace__result-candidates::-webkit-scrollbar {
  display: none;
}

.tior-workspace__result-candidate {
  position: relative;
  display: block;
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 11px;
  background: transparent;
  cursor: pointer;
  isolation: isolate;
  corner-shape: squircle;
}

.tior-workspace__result-candidate::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  border-radius: inherit; corner-shape: squircle;
  box-shadow: inset 0 0 0 1px var(--media-control-border);
  content: "";
  pointer-events: none;
}

.tior-workspace__result-candidate[aria-current="true"]::after {
  background: rgb(255 255 255 / .16);
  box-shadow: inset 0 0 0 3px var(--selection-border), 0 0 0 1px rgb(0 0 0 / .18);
}

.tior-workspace__result-candidate:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.tior-workspace__result-candidate img,
.tior-workspace__result-candidate video {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--workspace-canvas);
  object-fit: cover;
}

.tior-workspace__result-note {
  margin: 20px 2px 0;
}

.tior-workspace__empty-result {
  grid-column: 1 / -1;
  padding: 80px 20px;
  text-align: center;
}

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

@media (max-width: 1100px) {
  .tior-workspace {
    width: min(100% - 40px, 960px);
  }

  .tior-workspace__layout {
    grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
  }

  .tior-workspace__result-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 820px) {
  .tior-workspace {
    width: min(100% - 28px, 680px);
    padding-top: 80px;
  }

  .tior-workspace__layout {
    grid-template-columns: minmax(0, 1fr);
    border-radius: 26px; corner-shape: squircle;
  }

  .tior-workspace__inspector {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .tior-workspace__canvas {
    min-height: 560px;
  }
}

@media (max-width: 560px) {
  .tior-workspace {
    width: calc(100% - 20px);
    padding-top: 72px;
    padding-bottom: 24px;
  }

  .tior-workspace__bar {
    min-height: 62px;
  }

  .tior-workspace__breadcrumb > span[aria-hidden="true"],
  .tior-workspace__breadcrumb > span:last-child,
  .tior-workspace__status {
    display: none;
  }

  .tior-workspace__layout {
    border-radius: 23px; corner-shape: squircle;
  }

  .tior-workspace__intro,
  .tior-workspace__section {
    padding-inline: 20px;
  }

  .tior-workspace__intro h1 {
    font-size: 29px;
  }

  .tior-workspace__estimate > div {
    padding: 18px 20px;
  }

  .tior-workspace__primary {
    width: calc(100% - 40px);
    margin-inline: 20px;
  }

  .tior-workspace__credit-note,
  .tior-workspace__form-status {
    margin-inline: 20px;
  }

  .tior-workspace__canvas {
    min-height: 490px;
    padding: 54px 20px 30px;
  }

  .tior-workspace__source-preview {
    top: 16px;
    right: 16px;
    width: 116px;
    border-radius: 16px; corner-shape: squircle;
  }

  .tior-workspace__results > header {
    place-items: center;
  }

  .tior-workspace__result-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .tior-workspace__result-card img,
  .tior-workspace__result-card video {
    min-height: 0;
    max-height: 64vh;
  }
}

/* Mobile workspaces are a sequential tool flow, not a scaled desktop frame. */
@media (max-width: 768px) {
  .tior-workspace {
    width: min(100% - 32px, 680px);
  }

  .tior-workspace__layout {
    min-height: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    corner-shape: initial;
  }

  .tior-workspace__inspector {
    border: 0;
    background: transparent;
  }

  .tior-workspace__intro {
    padding: 24px 0 22px;
  }

  .tior-workspace__auth-gate {
    margin: 0;
    padding: 24px 0 26px;
    border-radius: 0;
    background: transparent;
    text-align: left;
    corner-shape: initial;
  }

  .tior-workspace__auth-actions {
    justify-content: flex-start;
  }

  .tior-workspace__section {
    padding: 22px 0 24px;
  }

  .tior-workspace__estimate > div {
    padding: 18px 0;
  }

  .tior-workspace__estimate > div + div {
    padding-left: 18px;
  }

  .tior-workspace__primary {
    width: 100%;
    margin-inline: 0;
  }

  .tior-workspace__credit-note,
  .tior-workspace__form-status {
    margin-inline: 0;
  }

  .tior-workspace__canvas {
    min-height: 0;
    align-content: start;
    padding: 34px 0 16px;
    overflow: visible;
    border-top: 1px solid var(--line);
    background: transparent;
  }

  .tior-workspace__canvas::before {
    content: none;
  }

  .tior-workspace__result-state {
    width: 100%;
    margin: 0;
    text-align: left;
  }

  .tior-workspace__result-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 18px;
  }

  .tior-workspace__result-state > p:not(.tior-workspace__eyebrow) {
    margin-inline: 0;
  }

  .tior-workspace__source-preview {
    position: relative;
    top: auto;
    right: auto;
    width: 100%;
    margin-bottom: 26px;
  }

  .tior-workspace__results > header {
    place-items: center;
  }

  .tior-workspace__result-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tior-workspace__progress > span {
    animation: none;
  }

  .tior-workspace__file-control,
  .tior-workspace__progress i {
    transition: none;
  }
}

@media (prefers-contrast: more), (prefers-reduced-transparency: reduce) {
  .tior-workspace {
    --workspace-panel: var(--surface-raised);
    --workspace-panel-soft: var(--surface);
    --workspace-control: var(--contrast-control-fill);
  }

  .tior-workspace__layout,
  .tior-workspace__field input:not(.tior-workspace__file-input),
  .tior-workspace__field select,
  .tior-workspace__field textarea,
  .tior-workspace__file-control,
  .tior-workspace__product > span {
    border-color: var(--contrast-border);
  }
}

@media (forced-colors: active) {
  .tior-workspace__layout,
  .tior-workspace__inspector,
  .tior-workspace__section,
  .tior-workspace__field input:not(.tior-workspace__file-input),
  .tior-workspace__field select,
  .tior-workspace__field textarea,
  .tior-workspace__file-control,
  .tior-workspace__product > span {
    border-color: CanvasText;
  }

  .tior-workspace__canvas {
    background: Canvas;
  }
}

/* Every app detail inherits the approved Main Styling hierarchy. */
.tior-workspace:has(.tior-workspace__main-layout--canonical) {
  --main-ink-strong: color-mix(in srgb, var(--text) 84%, var(--workspace-panel));
  --main-ink: color-mix(in srgb, var(--text) 70%, var(--workspace-panel));
  --main-ink-muted: color-mix(in srgb, var(--text) 60%, var(--workspace-panel));
  --main-placeholder: color-mix(in srgb, var(--text) 50%, var(--workspace-panel));
}

.tior-workspace:has(.tior-workspace__main-layout--canonical) .tior-workspace__info {
  color: var(--main-ink);
}

.tior-workspace__main-layout {
  grid-template-columns: minmax(286px, 330px) minmax(0, 1fr);
  background: var(--workspace-panel);
}

.tior-workspace__main-inspector {
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
  height: 100%;
  background: var(--workspace-panel);
}

.tior-workspace__main-controls {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.tior-workspace__main-inspector .tior-workspace__intro {
  padding: 18px 20px 16px;
}

.tior-workspace__main-inspector .tior-workspace__intro h1 {
  font-size: clamp(22px, 1.65vw, 28px);
}

.tior-workspace__main-inspector .tior-workspace__intro > p:last-child {
  margin-top: 9px;
  font-size: 13px;
  line-height: 18px;
}

.tior-workspace__main-controls {
  display: grid;
  min-height: 0;
  align-content: start;
}

.tior-workspace__main-layout--portfolio .tior-workspace__main-controls {
  overflow-y: auto;
  overscroll-behavior: contain;
}

.tior-workspace__main-inspector .tior-workspace__section {
  gap: 9px;
  padding: 13px 20px 14px;
}

.tior-workspace__main-inspector .tior-workspace__section legend {
  margin-bottom: 0;
}

.tior-workspace__main-inspector .tior-workspace__field {
  gap: 5px;
}

.tior-workspace__main-inspector .tior-workspace__field > span,
.tior-workspace__main-inspector .tior-workspace__section legend {
  font-size: 11px;
  line-height: 15px;
}

.tior-workspace__main-inspector .tior-workspace__field input:not(.tior-workspace__file-input),
.tior-workspace__main-inspector .tior-workspace__field select {
  min-height: 40px;
  padding-inline: 14px;
  font-size: 13px;
}

.tior-workspace__main-inspector .tior-workspace__field textarea {
  min-height: 64px;
  padding: 10px 12px;
  border-radius: 14px; corner-shape: squircle;
  font-size: 13px;
  line-height: 18px;
  resize: none;
}

.tior-workspace__main-action {
  padding: 0 20px 12px;
}

.tior-workspace__main-action .tior-workspace__estimate {
  border: 0;
  border-top: 1px solid var(--line);
}

.tior-workspace__main-action .tior-workspace__estimate > div {
  gap: 1px;
  padding: 9px 5px 7px;
}

.tior-workspace__main-action .tior-workspace__estimate > div:first-child {
  padding-left: 0;
}

.tior-workspace__main-action .tior-workspace__estimate > div + div {
  border: 0;
}

.tior-workspace__main-action .tior-workspace__estimate span {
  font-size: 11px;
  line-height: 15px;
}

.tior-workspace__main-action .tior-workspace__estimate strong {
  font-size: 12px;
  line-height: 17px;
}

.tior-workspace__main-inspector .tior-workspace__primary {
  width: 100%;
  min-height: 44px;
  margin: 2px 0 0;
}

.tior-workspace__main-inspector .tior-workspace__credit-note,
.tior-workspace__main-inspector .tior-workspace__form-status {
  margin-inline: 0;
  font-size: 11px;
  line-height: 15px;
}

.tior-workspace__main-inspector .tior-workspace__credit-note {
  margin-top: 7px;
}

.tior-workspace__main-inspector .tior-workspace__form-status {
  min-height: 14px;
  margin-top: 2px;
}

.tior-workspace__main-output {
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
  height: 100%;
  background: var(--workspace-canvas);
}

.tior-workspace__main-canvas {
  min-height: 0;
  padding: 28px 18px 16px;
  background-color: var(--workspace-canvas);
  background-image: none;
}

.tior-workspace__canvas-label {
  position: absolute;
  z-index: 4;
  top: 14px;
  left: 18px;
  display: flex;
  align-items: baseline;
  gap: 9px;
  pointer-events: none;
}

.tior-workspace__canvas-label span {
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
  line-height: 17px;
}

.tior-workspace__canvas-label strong {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  line-height: 16px;
}

.tior-workspace__main-source-desktop {
  width: min(680px, 82%);
  gap: 0;
}

.tior-workspace__source-field--canvas .tior-workspace__file-control,
.tior-workspace__main-layout .tior-workspace__source-field .tior-workspace__file-control {
  min-height: min(42vh, 360px);
  border-radius: 18px; corner-shape: squircle;
  background: var(--workspace-control);
}

.tior-workspace__main-canvas > .tior-workspace__preview-stage > .tior-workspace__source-preview img,
.tior-workspace__main-canvas > .tior-workspace__preview-stage > .tior-workspace__source-preview video {
  max-height: min(55vh, 520px);
}

.tior-workspace__main-canvas > .tior-workspace__results {
  overflow: auto;
}

.tior-workspace__main-canvas .tior-workspace__results > header {
  margin-bottom: 12px;
  text-align: center;
}

.tior-workspace__main-canvas .tior-workspace__results h2 {
  font-size: 16px;
  line-height: 22px;
}

.tior-workspace__selected-strip {
  min-height: 112px;
  padding: 8px 18px 12px;
  border: 0;
  background: var(--workspace-panel);
}

.tior-workspace__selected-strip > header {
  margin-bottom: 6px;
}

.tior-workspace__selected-strip > header .tior-workspace__eyebrow {
  margin: 0;
  font-size: 11px;
  line-height: 14px;
}

.tior-workspace__selected-strip h2 {
  font-size: 13px;
  line-height: 17px;
}

.tior-workspace__selected-strip > header > span {
  min-width: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  font-size: 11px;
}

.tior-workspace__selected-strip > div {
  gap: 8px;
  overflow-x: auto;
  padding: 1px 1px 3px;
}

.tior-workspace__product-thumb,
.tior-workspace__product-add-tile {
  position: relative;
  display: grid;
  width: 68px;
  height: 68px;
  flex: 0 0 68px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px; corner-shape: squircle;
  background: var(--workspace-control);
  color: var(--text);
  cursor: pointer;
}

.tior-workspace__product-thumb img,
.tior-workspace__product-thumb > i {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: var(--workspace-control);
  object-fit: cover;
}

.tior-workspace__product-thumb > span {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 12px 5px 4px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .66));
  color: #fff;
  text-align: left;
}

.tior-workspace__product-thumb strong {
  display: block;
  overflow: hidden;
  font-size: 11px;
  font-weight: 600;
  line-height: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tior-workspace__product-thumb small {
  display: none;
}

.tior-workspace__product-thumb--readonly {
  cursor: default;
}

.tior-workspace__product-add-tile {
  border-style: dashed;
}

.tior-workspace__product-add-tile:hover,
.tior-workspace__product-add-tile.is-dragging {
  border-color: var(--text);
  background: var(--workspace-hover);
}

.tior-workspace__product-add-tile > svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
}

.tior-workspace__product-editor {
  width: min(640px, calc(100vw - 32px));
  max-height: min(760px, calc(100svh - 32px));
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px; corner-shape: squircle;
  background: var(--workspace-panel);
  color: var(--text);
  box-shadow: 0 28px 80px color-mix(in srgb, #000 28%, transparent);
}

.tior-workspace__product-editor::backdrop {
  background: color-mix(in srgb, #000 46%, transparent);
}

.tior-workspace__setup-dialog {
  width: min(460px, calc(100vw - 32px));
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--workspace-panel);
  color: var(--text);
  box-shadow: 0 24px 70px color-mix(in srgb, #000 22%, transparent);
  corner-shape: squircle;
}

.tior-workspace__setup-dialog::backdrop {
  background: color-mix(in srgb, #000 36%, transparent);
}

.tior-workspace__setup-dialog-shell {
  padding: 24px;
}

.tior-workspace__setup-dialog-shell > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.tior-workspace__setup-dialog-shell .tior-workspace__eyebrow {
  margin-bottom: 5px;
}

.tior-workspace__setup-dialog-shell h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  line-height: 29px;
  letter-spacing: -.03em;
}

.tior-workspace__setup-dialog-shell > header > button {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--workspace-control);
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
}

.tior-workspace__setup-dialog-shell > p {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
}

.tior-workspace__setup-dialog-shell dl {
  display: grid;
  gap: 0;
  margin: 22px 0 0;
}

.tior-workspace__setup-dialog-shell dl > div {
  display: grid;
  gap: 5px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.tior-workspace__setup-dialog-shell dt {
  font-size: 14px;
  font-weight: 650;
  line-height: 20px;
}

.tior-workspace__setup-dialog-shell dd {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
}

.tior-workspace__dialog-shell {
  display: grid;
  max-height: min(760px, calc(100svh - 32px));
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.tior-workspace__product-editor .tior-workspace__dialog-shell {
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.tior-workspace__dialog-shell > header,
.tior-workspace__dialog-shell > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
}

.tior-workspace__dialog-shell > header {
  border-bottom: 1px solid var(--line);
}

.tior-workspace__dialog-shell > footer {
  border-top: 1px solid var(--line);
}

.tior-workspace__dialog-shell > header h2 {
  margin: 0;
  font-size: 24px;
  line-height: 29px;
  letter-spacing: -.03em;
}

.tior-workspace__dialog-shell > header p:last-child {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
}

.tior-workspace__dialog-shell > header > button,
.tior-workspace__recent-tray header > button {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--workspace-control);
  color: var(--text);
  font-size: 20px;
}

.tior-workspace__dialog-done {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--action-primary-fill);
  color: var(--action-primary-foreground);
  font: 650 12px/17px var(--font-ui);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.tior-workspace__product-editor [data-product-editor-status] {
  color: var(--muted);
  font-size: 11px;
  line-height: 16px;
}

/* The shared SHOP picker owns its visual contract. Only the legacy shell button
   primitive is reproduced here, scoped to the open picker, so the public Studio
   shell cannot inherit render-tool control styles. */
body.tior-product-picker-open .tior-product-picker__checkout,
body.tior-product-picker-open .tior-product-picker__checkout[aria-disabled="true"] {
  background: var(--action-primary-fill);
  color: var(--action-primary-foreground);
}

body.tior-product-picker-open .tior-product-picker .action-btn {
  display: inline-flex;
  height: 48px;
  min-width: 140px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 0 24px;
  border: 0;
  border-radius: var(--action-radius, 14px); corner-shape: squircle;
  background: var(--action-primary-fill);
  color: var(--action-primary-foreground);
  font-family: inherit;
  cursor: pointer;
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
  transition: color 140ms ease, background-color 140ms ease, transform 90ms ease, opacity 140ms ease;
}

body.tior-product-picker-open .tior-product-picker .action-btn:not(.secondary) {
  min-height: 46px !important;
  padding: 0 22px !important;
  border: 1px solid var(--tior-picker-line-strong) !important;
  border-radius: var(--action-radius, 14px) !important; corner-shape: squircle;
  background: var(--action-primary-fill) !important;
  box-shadow: none !important;
  color: var(--action-primary-foreground) !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 1 !important;
}

body.tior-product-picker-open .tior-product-picker .action-btn.secondary {
  min-height: 40px !important;
  border: 1px solid var(--tior-picker-line) !important;
  border-radius: var(--action-radius, 14px) !important; corner-shape: squircle;
  background: var(--action-secondary-fill) !important;
  box-shadow: none !important;
  color: var(--action-secondary-foreground) !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 1 !important;
}

body.tior-product-picker-open .tior-product-picker .action-btn:active:not(:disabled) {
  transform: scale(.985) !important;
}

body.tior-product-picker-open .tior-product-picker .action-btn:disabled {
  border-color: var(--tior-picker-line) !important;
  background: var(--action-primary-disabled-fill) !important;
  color: var(--action-primary-disabled-foreground) !important;
  box-shadow: none !important;
  opacity: 1 !important;
  cursor: not-allowed !important;
}

@media (hover: hover) and (pointer: fine) {
  body.tior-product-picker-open .tior-product-picker__state .action-btn.secondary:hover:not(:disabled) {
    border-color: var(--tior-picker-line-strong) !important;
    background: var(--action-secondary-fill) !important;
    color: var(--action-secondary-foreground) !important;
  }
}

.tior-product-picker .hidden {
  display: none !important;
}

.tior-workspace__text-action,
.tior-workspace__dialog-shell > footer > a {
  min-height: 44px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font: 500 12px/17px var(--font-ui);
}

.tior-workspace__product-editor .tior-workspace__manual-products {
  overflow: auto;
}

.tior-workspace__product-editor .tior-workspace__manual-product {
  border: 0;
  border-radius: 0;
  background: var(--workspace-panel);
}

.tior-workspace__product-editor .tior-workspace__manual-product > header {
  display: none;
}

.tior-workspace__product-editor .tior-workspace__manual-product-grid {
  grid-template-columns: 150px minmax(0, 1fr);
  padding: 18px 20px;
}

.tior-workspace__recent-tray {
  --history-rail-width: 112px;
  position: fixed;
  z-index: 70;
  top: 50%;
  right: max(12px, calc(25vw - 431px));
  width: var(--history-rail-width);
  transform: translateY(-50%);
}

.tior-workspace:has(.tior-workspace__main-layout) .tior-workspace__recent-tray {
  right: max(12px, calc(25vw - 441px));
}

.tior-workspace__recent-toggle {
  position: relative;
  display: inline-flex;
  width: 100%;
  height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--workspace-panel);
  color: var(--muted);
  box-shadow: 0 12px 34px color-mix(in srgb, #000 14%, transparent);
  cursor: pointer;
  font-family: var(--font-editorial);
  font-size: 18px;
  font-style: italic;
  font-weight: 400;
  line-height: 1;
  corner-shape: squircle;
}

.tior-workspace__recent-tray.is-open {
  max-height: min(620px, calc(100svh - 92px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--workspace-panel);
  box-shadow: 0 20px 58px color-mix(in srgb, #000 18%, transparent);
  corner-shape: squircle;
}

.tior-workspace__recent-tray.is-open .tior-workspace__recent-toggle {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  corner-shape: initial;
}

.tior-workspace__recent-tray > section {
  position: static;
  width: 100%;
  max-height: calc(min(620px, calc(100svh - 92px)) - 44px);
  transform: none;
  overflow: hidden;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.tior-workspace__recent-tray [data-recent-results] {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  max-height: calc(min(620px, calc(100svh - 92px)) - 88px);
  padding: 10px 10px 8px;
  overflow: auto;
  scrollbar-width: thin;
}

.tior-workspace__recent-tray [data-recent-results] > button {
  display: block;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.tior-workspace__recent-tray [data-recent-results] button > span {
  position: relative;
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px; corner-shape: squircle;
  background: var(--workspace-control);
}

.tior-workspace__recent-tray [data-recent-results] img,
.tior-workspace__recent-tray [data-recent-results] video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tior-workspace__recent-media-icon {
  position: absolute;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .72));
  pointer-events: none;
}

.tior-workspace__recent-media-icon svg {
  width: 18px;
  height: 18px;
}

.tior-workspace__recent-result[draggable="true"] { cursor: grab; }
.tior-workspace__recent-result.is-dragging { opacity: .58; }

.tior-workspace__source-field.is-history-dragover .tior-workspace__file-control {
  border-color: var(--main-ink-strong, var(--text));
  background: var(--workspace-control);
}

.tior-workspace__recent-tray [data-recent-results] > p {
  margin: 10px 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 17px;
  text-align: center;
}

.tior-workspace__recent-tray section > a {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-family: var(--font-editorial);
  font-size: 14px;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

@media (min-width: 821px) and (min-height: 620px) {
  body.is-direct-workspace:has(.tior-workspace__main-layout) {
    height: 100svh;
    overflow: hidden;
  }

  .tior-workspace:has(.tior-workspace__main-layout) {
    display: grid;
    width: min(1540px, calc(100% - 32px));
    height: 100svh;
    grid-template-rows: 40px minmax(0, 1fr);
    padding: 66px 0 12px;
  }

  .tior-workspace:has(.tior-workspace__main-layout) .tior-workspace__bar {
    min-height: 40px;
  }

  .tior-workspace__live-shell--main,
  .tior-workspace__main-layout {
    min-height: 0;
    height: 100%;
  }
}

@media (max-width: 820px) {
  .tior-workspace__main-controls {
    overflow: visible;
  }

  .tior-workspace__selected-strip {
    padding: 14px 0 18px;
  }

  .tior-workspace__recent-tray {
    position: static;
    top: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    margin-top: 20px;
    transform: none;
  }

  .tior-workspace__recent-tray:not(.is-open) {
    width: 112px;
    margin-inline: auto;
  }

  .tior-workspace__recent-tray > section {
    max-height: none;
  }

  .tior-workspace__recent-tray [data-recent-results] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 480px;
  }

}

@media (max-width: 560px) {
  .tior-workspace__product-editor .tior-workspace__manual-product-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .tior-workspace__dialog-shell > footer {
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tior-workspace__info::after,
  .tior-workspace__setup-help::after {
    transition: none;
  }
}

/* Direct app workbenches: content-first flat semantic surfaces and quiet controls. */
.tior-workspace:has(.tior-workspace__layout--narva) {
  width: min(1320px, calc(100% - var(--page) * 2));
}

.tior-workspace:has(.tior-workspace__main-layout) {
  width: min(1540px, calc(100% - var(--page) * 2));
}

.tior-workspace__live-shell {
  min-width: 0;
}

.tior-workspace__live-shell > .tior-workspace__auth-gate {
  width: min(560px, 100%);
  margin: 72px auto;
  border: 1px solid var(--line);
  background: var(--workspace-panel-soft);
}

.tior-workspace__layout--narva {
  min-height: min(760px, calc(100vh - 158px));
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-radius: 28px; corner-shape: squircle;
  background: var(--workspace-panel);
  box-shadow: 0 18px 46px color-mix(in srgb, #000 8%, transparent);
}

.tior-workspace__inspector,
.tior-workspace__main-inspector,
.tior-workspace__main-output,
.tior-workspace__library-rail,
.tior-workspace__canvas,
.tior-workspace__main-canvas {
  min-width: 0;
}

.tior-workspace__layout--narva > .tior-workspace__inspector {
  background: var(--workspace-panel-soft);
}

.tior-workspace__section legend em {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  margin-left: 7px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--workspace-hover);
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.tior-workspace__layout--narva .tior-workspace__source-field .tior-workspace__file-control,
.tior-workspace__layout--narva .tior-workspace__upload,
.tior-workspace__main-layout .tior-workspace__source-field .tior-workspace__file-control {
  min-height: 214px;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  border-style: dashed;
  border-radius: 24px; corner-shape: squircle;
  background: var(--workspace-control);
  text-align: center;
}

.tior-workspace__layout--narva .tior-workspace__source-field .tior-workspace__file-control > svg,
.tior-workspace__layout--narva .tior-workspace__upload > svg,
.tior-workspace__main-layout .tior-workspace__source-field .tior-workspace__file-control > svg {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
}

.tior-workspace__layout--narva .tior-workspace__source-field .tior-workspace__file-control strong,
.tior-workspace__layout--narva .tior-workspace__source-field .tior-workspace__file-control small,
.tior-workspace__main-layout .tior-workspace__source-field .tior-workspace__file-control strong,
.tior-workspace__main-layout .tior-workspace__source-field .tior-workspace__file-control small {
  white-space: normal;
}

.tior-workspace__layout--narva .tior-workspace__canvas {
  min-height: 680px;
  border-radius: 0 27px 27px 0; corner-shape: squircle;
  background-color: var(--workspace-canvas);
  background-image: radial-gradient(circle at center, color-mix(in srgb, var(--text) 6%, transparent) .65px, transparent .82px);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--line) 45%, transparent);
}

.tior-workspace__layout--narva .tior-workspace__canvas::before {
  background: radial-gradient(circle at 50% 46%, color-mix(in srgb, var(--surface-raised) 42%, transparent), transparent 66%);
}

.tior-workspace__layout--narva .tior-workspace__source-preview {
  position: relative;
  top: auto;
  right: auto;
  width: 100%;
  border: 0;
  border-radius: 24px; corner-shape: squircle;
  box-shadow: none;
}

.tior-workspace__layout--narva .tior-workspace__source-preview img,
.tior-workspace__layout--narva .tior-workspace__source-preview video {
  min-height: 320px;
  max-height: 620px;
  aspect-ratio: 4 / 3;
  object-fit: contain;
}

.tior-workspace__result-card {
  border: 0;
  box-shadow: none;
}

.tior-workspace__manual-products {
  display: grid;
  gap: 12px;
}

.tior-workspace__manual-product {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--workspace-control);
  corner-shape: squircle;
}

.tior-workspace__manual-product > header {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 10px 9px 15px;
  border-bottom: 1px solid var(--line);
}

.tior-workspace__manual-product > header span,
.tior-workspace__manual-product > header strong {
  display: block;
}

.tior-workspace__manual-product > header span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 16px;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.tior-workspace__manual-product > header strong {
  font-size: 14px;
  line-height: 19px;
}

.tior-workspace__manual-product > header button {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  font-size: 22px;
}

.tior-workspace__manual-product-grid {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
}

.tior-workspace__product-image > span {
  position: relative;
  display: grid;
  min-height: 152px;
  place-items: center;
  align-content: center;
  gap: 4px;
  overflow: hidden;
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  color: var(--muted);
  text-align: center;
  cursor: pointer;
  corner-shape: squircle;
}

.tior-workspace__product-image .tior-workspace__file-input:focus-visible + span {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
}

.tior-workspace__product-image svg {
  width: 22px;
  height: 22px;
  margin-bottom: 3px;
}

.tior-workspace__product-image strong,
.tior-workspace__product-image small {
  font-size: 12px;
  line-height: 16px;
}

.tior-workspace__product-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tior-workspace__manual-product-fields {
  display: grid;
  min-width: 0;
  gap: 10px;
}

.tior-workspace__manual-product-measures {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.tior-workspace__manual-product-measures .tior-workspace__field input {
  min-width: 0;
  padding-inline: 10px;
  text-align: center;
}

.tior-workspace__add-product {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: 600 13px/18px var(--font-ui);
}

.tior-workspace__add-product span {
  font-size: 18px;
}

/* Legacy Main Render topology, recreated natively against the protected Studio API. */
.tior-workspace__main-layout {
  display: grid;
  min-height: min(800px, calc(100vh - 150px));
  overflow: hidden;
  grid-template-columns: minmax(330px, 370px) minmax(0, 1fr) 106px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--workspace-panel);
  box-shadow: 0 18px 46px color-mix(in srgb, #000 8%, transparent);
  corner-shape: squircle;
}

.tior-workspace__main-inspector {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto auto;
  border-right: 1px solid var(--line);
  background: var(--workspace-panel-soft);
}

.tior-workspace__main-inspector .tior-workspace__intro {
  padding: 24px 22px 22px;
}

.tior-workspace__main-inspector .tior-workspace__intro h1 {
  font-size: clamp(24px, 1.9vw, 32px);
}

.tior-workspace__main-scroll {
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.tior-workspace__main-inspector .tior-workspace__section {
  gap: 14px;
  padding: 20px 22px 22px;
}

.tior-workspace__main-inspector .tior-workspace__primary {
  width: calc(100% - 44px);
  margin: 18px 22px 0;
}

.tior-workspace__main-inspector .tior-workspace__credit-note,
.tior-workspace__main-inspector .tior-workspace__form-status {
  margin-inline: 22px;
}

.tior-workspace__main-output {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: var(--workspace-canvas);
}

.tior-workspace__main-panel-header,
.tior-workspace__selected-strip > header,
.tior-workspace__library-rail > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.tior-workspace__main-panel-header {
  min-height: 74px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}

.tior-workspace__main-panel-header .tior-workspace__eyebrow {
  margin-bottom: 2px;
}

.tior-workspace__main-panel-header h2,
.tior-workspace__selected-strip h2 {
  margin: 0;
  color: var(--text);
  font-size: 17px;
  font-weight: 650;
  line-height: 22px;
  letter-spacing: -.018em;
}

.tior-workspace__main-panel-header > span {
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
}

.tior-workspace__main-canvas {
  position: relative;
  display: grid;
  min-height: 540px;
  align-content: center;
  padding: 18px;
  overflow: hidden;
  background-color: var(--workspace-canvas);
  background-image: radial-gradient(circle at center, color-mix(in srgb, var(--text) 6%, transparent) .65px, transparent .82px);
  background-size: 20px 20px;
}

.tior-workspace__main-source-desktop {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(720px, 88%);
  margin: auto;
  gap: 14px;
}

.tior-workspace__source-field--canvas .tior-workspace__file-control {
  min-height: 410px;
  border-width: 1px;
  background: var(--surface-raised);
}

.tior-workspace__main-source-mobile {
  display: none;
}

.tior-workspace__main-canvas > .tior-workspace__result-state {
  display: none;
}

.tior-workspace__main-canvas > .tior-workspace__preview-stage {
  position: relative;
  z-index: 2;
  width: min(880px, 100%);
  margin: auto;
  overflow: hidden;
  border-radius: 24px;
  corner-shape: squircle;
}

.tior-workspace__main-canvas > .tior-workspace__preview-stage:not(:has(> .tior-workspace__source-preview:not([hidden]))):not(:has(> .tior-workspace__progress:not([hidden]))) {
  display: none;
}

.tior-workspace__main-canvas > .tior-workspace__preview-stage > .tior-workspace__source-preview {
  position: relative;
  z-index: 1;
  top: auto;
  right: auto;
  width: 100%;
  margin: 0;
  border: 0;
  border-radius: inherit; corner-shape: squircle;
  background: transparent;
  box-shadow: none;
}

.tior-workspace__main-canvas > .tior-workspace__preview-stage > .tior-workspace__source-preview img,
.tior-workspace__main-canvas > .tior-workspace__preview-stage > .tior-workspace__source-preview video {
  width: 100%;
  max-height: 640px;
  aspect-ratio: 16 / 10;
  border-radius: inherit; corner-shape: squircle;
  object-fit: contain;
}

.tior-workspace__main-canvas:has(> .tior-workspace__preview-stage > .tior-workspace__source-preview:not([hidden])) > .tior-workspace__main-source-desktop,
.tior-workspace__main-canvas:has(> .tior-workspace__preview-stage > .tior-workspace__progress:not([hidden])) > .tior-workspace__main-source-desktop,
.tior-workspace__main-canvas:has(> .tior-workspace__results:not([hidden])) > .tior-workspace__main-source-desktop {
  display: none;
}

.tior-workspace__main-canvas > .tior-workspace__results {
  align-self: stretch;
  min-height: 0;
  overflow: visible;
}

.tior-workspace__main-canvas:has(> .tior-workspace__results:not([hidden])) {
  align-content: center;
}

.tior-workspace__main-canvas .tior-workspace__result-preview {
  height: auto;
  min-height: 0;
  max-height: none;
  flex-shrink: 0;
}

.tior-workspace__selected-strip {
  min-width: 0;
  padding: 16px 18px 18px;
  border-top: 1px solid var(--line);
  background: var(--workspace-panel-soft);
}

.tior-workspace__selected-strip > header {
  margin-bottom: 12px;
}

.tior-workspace__selected-strip > header > span {
  min-width: 30px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--workspace-control);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.tior-workspace__selected-strip > div {
  display: flex;
  min-width: 0;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.tior-workspace__selected-strip article {
  display: grid;
  min-width: 196px;
  max-width: 240px;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 17px; corner-shape: squircle;
  background: var(--workspace-control);
}

.tior-workspace__selected-strip article > img,
.tior-workspace__selected-strip article > i {
  width: 52px;
  height: 52px;
  border-radius: 12px; corner-shape: squircle;
  background: var(--surface-raised);
  object-fit: cover;
}

.tior-workspace__selected-strip article strong,
.tior-workspace__selected-strip article small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tior-workspace__selected-strip article strong {
  font-size: 13px;
  line-height: 18px;
}

.tior-workspace__selected-strip article small,
.tior-workspace__selected-strip p {
  color: var(--muted);
  font-size: 12px;
  line-height: 17px;
}

.tior-workspace__selected-strip p {
  margin: 10px 2px;
}

.tior-workspace__library-rail {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border-left: 1px solid var(--line);
  background: var(--workspace-panel-soft);
}

.tior-workspace__library-rail > header {
  min-height: 74px;
  justify-content: center;
  flex-direction: column;
  gap: 3px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.tior-workspace__library-rail > header svg {
  width: 18px;
  height: 18px;
}

.tior-workspace__library-rail > div {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 12px;
  overflow: auto;
}

.tior-workspace__library-rail button {
  position: relative;
  display: grid;
  width: 80px;
  min-height: 64px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px; corner-shape: squircle;
  background: var(--workspace-control);
  color: var(--text);
}

.tior-workspace__library-rail button span,
.tior-workspace__library-rail button img {
  display: block;
  width: 100%;
  height: 100%;
}

.tior-workspace__library-rail button img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.tior-workspace__library-rail button small {
  position: absolute;
  right: 5px;
  bottom: 5px;
  display: grid;
  width: 19px;
  height: 19px;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-raised);
  color: var(--text);
  font-size: 11px;
}

.tior-workspace__library-rail p {
  color: var(--muted);
  font-size: 12px;
  line-height: 17px;
  text-align: center;
}

.tior-workspace__library-rail > a {
  display: grid;
  width: 44px;
  height: 44px;
  place-self: center;
  place-items: center;
  margin: 12px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
}

.tior-workspace__library-rail > a svg {
  width: 16px;
  height: 16px;
}

@media (max-width: 1180px) {
  .tior-workspace:has(.tior-workspace__main-layout) {
    width: min(100% - 32px, 1100px);
  }

  .tior-workspace__main-layout {
    grid-template-columns: minmax(310px, 350px) minmax(0, 1fr);
  }

  .tior-workspace__library-rail {
    display: none;
  }
}

@media (max-width: 820px) {
  .tior-workspace:has(.tior-workspace__layout--narva),
  .tior-workspace:has(.tior-workspace__main-layout) {
    width: min(100% - 28px, 720px);
  }

  .tior-workspace__layout--narva,
  .tior-workspace__main-layout {
    min-height: 0;
    overflow: visible;
    grid-template-columns: minmax(0, 1fr);
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    corner-shape: initial;
  }

  .tior-workspace__layout--narva > .tior-workspace__inspector,
  .tior-workspace__main-inspector {
    display: block;
    border: 0;
    background: transparent;
  }

  .tior-workspace__main-scroll {
    overflow: visible;
  }

  .tior-workspace__layout--narva .tior-workspace__intro,
  .tior-workspace__main-inspector .tior-workspace__intro {
    padding: 24px 0 22px;
  }

  .tior-workspace__layout--narva .tior-workspace__section,
  .tior-workspace__main-inspector .tior-workspace__section {
    padding: 22px 0 24px;
  }

  .tior-workspace__main-source-mobile {
    display: grid;
  }

  .tior-workspace__main-output {
    margin-top: 34px;
    border-top: 1px solid var(--line);
    background: transparent;
  }

  .tior-workspace__main-panel-header {
    padding-inline: 0;
  }

  .tior-workspace__main-canvas,
  .tior-workspace__layout--narva .tior-workspace__canvas {
    min-height: 0;
    padding: 28px 0 14px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .tior-workspace__main-source-desktop {
    display: none;
  }

  .tior-workspace__main-canvas > .tior-workspace__preview-stage {
    width: 100%;
  }

  .tior-workspace__selected-strip {
    padding-inline: 0;
    background: transparent;
  }

  .tior-workspace__main-inspector .tior-workspace__primary,
  .tior-workspace__layout--narva .tior-workspace__primary {
    width: 100%;
    margin-inline: 0;
  }

  .tior-workspace__main-inspector .tior-workspace__credit-note,
  .tior-workspace__main-inspector .tior-workspace__form-status {
    margin-inline: 0;
  }

  .tior-workspace__library-rail {
    display: none;
  }
}

@media (max-width: 560px) {
  .tior-workspace__manual-product-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .tior-workspace__product-image > span {
    min-height: 176px;
  }

  .tior-workspace__manual-product-measures {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tior-workspace__layout--narva .tior-workspace__source-field .tior-workspace__file-control,
  .tior-workspace__layout--narva .tior-workspace__upload,
  .tior-workspace__main-layout .tior-workspace__source-field .tior-workspace__file-control {
    min-height: 180px;
  }
}

@media (prefers-contrast: more), (prefers-reduced-transparency: reduce) {
  .tior-workspace__layout--narva,
  .tior-workspace__main-layout,
  .tior-workspace__manual-product,
  .tior-workspace__selected-strip article,
  .tior-workspace__library-rail button {
    border-color: var(--contrast-border);
    background-color: var(--surface-raised);
  }
}

@media (forced-colors: active) {
  .tior-workspace__main-layout,
  .tior-workspace__manual-product,
  .tior-workspace__selected-strip article,
  .tior-workspace__library-rail button {
    border-color: CanvasText;
  }
}

/* Keep the final Main workbench contract after legacy compatibility rules. */
.tior-workspace__main-layout {
  grid-template-columns: minmax(286px, 330px) minmax(0, 1fr);
  background: var(--workspace-panel);
}

.tior-workspace__main-layout--products,
.tior-workspace__main-layout--portfolio {
  grid-template-columns: minmax(310px, 350px) minmax(0, 1fr);
}

.tior-workspace__main-layout--styling {
  color: var(--main-ink);
}

.tior-workspace__main-inspector {
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: var(--workspace-panel);
}

.tior-workspace__main-layout--products .tior-workspace__main-inspector,
.tior-workspace__main-layout--portfolio .tior-workspace__main-inspector {
  grid-template-rows: auto auto auto;
  align-content: space-between;
}

.tior-workspace__main-layout--products .tior-workspace__main-controls,
.tior-workspace__main-layout--portfolio .tior-workspace__main-controls {
  overflow: visible;
}

.tior-workspace__main-inspector .tior-workspace__intro {
  padding: 18px 20px 16px;
}

.tior-workspace__main-layout--styling .tior-workspace__intro {
  padding: 28px 22px 22px;
  border-bottom: 0;
}

.tior-workspace__main-inspector .tior-workspace__intro h1 {
  font-size: clamp(22px, 1.65vw, 28px);
}

.tior-workspace__main-layout--styling .tior-workspace__intro h1 {
  color: var(--main-ink-strong);
  font-size: clamp(24px, 1.75vw, 27px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -.04em;
}

.tior-workspace__main-layout--styling .tior-workspace__intro > p:last-child {
  margin-top: 16px;
  color: var(--main-ink-muted);
  font-size: 14px;
  line-height: 20px;
}

.tior-workspace__main-inspector .tior-workspace__section {
  gap: 9px;
  padding: 13px 20px 14px;
}

.tior-workspace__main-layout--styling .tior-workspace__section {
  gap: 17px;
  padding: 22px;
  border-bottom: 0;
}

.tior-workspace__main-layout--styling .tior-workspace__main-controls > .tior-workspace__section:last-child {
  border-bottom: 0;
}

.tior-workspace__main-layout--styling .tior-workspace__field {
  gap: 8px;
}

.tior-workspace__main-layout--styling .tior-workspace__section legend {
  color: var(--main-ink-strong);
  font-size: 15px;
  font-weight: 600;
  line-height: 20px;
  letter-spacing: 0;
  text-transform: none;
}

.tior-workspace__main-layout--styling .tior-workspace__room-setup > legend,
.tior-workspace__main-layout--canonical .tior-workspace__optional-section > legend {
  display: flex;
  float: none;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-sizing: border-box;
}

.tior-workspace__main-layout--styling .tior-workspace__field > span:not(.tior-workspace__file-control) {
  color: var(--main-ink-muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 18px;
  letter-spacing: 0;
  text-transform: none;
}

.tior-workspace__setup-help {
  position: relative;
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  margin: -12px 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--main-ink-muted, var(--muted));
  font-family: var(--font-editorial);
  font-size: 16px;
  font-style: italic;
  font-weight: var(--workspace-detail-editorial-weight);
  line-height: 1;
  cursor: pointer;
}

.tior-workspace__setup-help::after {
  position: absolute;
  right: 0;
  bottom: 10px;
  left: 0;
  height: 1px;
  transform: scaleX(0);
  transform-origin: right center;
  background: currentColor;
  content: '';
  transition: transform 180ms ease;
}

.tior-workspace__setup-help:hover::after,
.tior-workspace__setup-help:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left center;
}

.tior-workspace__main-layout--styling .tior-workspace__field input:not(.tior-workspace__file-input) {
  min-height: 44px;
  border-radius: 14px;
  color: var(--main-ink);
  font-size: var(--workspace-detail-control-size);
  font-weight: var(--workspace-detail-control-weight);
  line-height: var(--workspace-detail-control-line-height);
  corner-shape: squircle;
}

.tior-workspace__main-layout--styling .tior-workspace__field input::placeholder,
.tior-workspace__main-layout--styling .tior-workspace__field textarea::placeholder {
  color: var(--main-placeholder);
  font-weight: 350;
  opacity: 1;
}

.tior-workspace__main-layout--styling .tior-workspace__field textarea {
  min-height: 72px;
  padding: 10px 12px;
  border-radius: 14px;
  color: var(--main-ink);
  font-size: var(--workspace-detail-control-size);
  font-weight: var(--workspace-detail-control-weight);
  line-height: var(--workspace-detail-control-line-height);
  corner-shape: squircle;
}

.tior-workspace__main-inspector .tior-workspace__primary {
  width: 100%;
  margin: 2px 0 0;
}

.tior-workspace__main-layout--styling .tior-workspace__main-action {
  display: grid;
  padding: 16px 22px 20px;
  border-top: 0;
}

.tior-workspace__main-layout--styling .tior-workspace__main-action .tior-workspace__estimate {
  margin-bottom: 15px;
  border-top: 0;
}

.tior-workspace__main-layout--styling .tior-workspace__main-action .tior-workspace__estimate > div {
  padding: 8px 5px 7px;
}

.tior-workspace__main-layout--styling .tior-workspace__main-action .tior-workspace__estimate span {
  color: var(--main-ink-strong);
  font-size: 12px;
  line-height: 16px;
}

.tior-workspace__main-layout--styling .tior-workspace__main-action .tior-workspace__estimate strong {
  color: var(--main-ink-muted);
  font-size: var(--workspace-detail-estimate-size);
  font-weight: 400;
  line-height: var(--workspace-detail-estimate-line-height);
}

.tior-workspace__main-layout--styling .tior-workspace__main-inspector .tior-workspace__primary {
  min-height: 48px;
  border-radius: var(--action-radius);
  corner-shape: squircle;
}

.tior-workspace__main-layout--styling .tior-workspace__main-inspector .tior-workspace__credit-note,
.tior-workspace__main-layout--styling .tior-workspace__main-inspector .tior-workspace__form-status {
  color: var(--main-ink-muted);
  font-size: var(--workspace-detail-support-size);
  line-height: var(--workspace-detail-support-line-height);
}

.tior-workspace__main-layout--styling .tior-workspace__main-inspector .tior-workspace__credit-note {
  margin-top: 12px;
}

.tior-workspace__main-inspector .tior-workspace__credit-note,
.tior-workspace__main-inspector .tior-workspace__form-status {
  margin-inline: 0;
}

.tior-workspace__main-output {
  grid-template-rows: minmax(0, 1fr) auto;
  background: var(--workspace-canvas);
}

.tior-workspace__main-canvas {
  min-height: 0;
  padding: 28px 18px 16px;
  background-color: var(--workspace-canvas);
  background-image: none;
}

.tior-workspace__main-layout--styling .tior-workspace__main-canvas {
  padding-top: 16px;
}

.tior-workspace__main-source-desktop {
  width: min(680px, 82%);
  gap: 0;
}

.tior-workspace__source-field--canvas .tior-workspace__file-control,
.tior-workspace__main-layout .tior-workspace__source-field .tior-workspace__file-control {
  min-height: min(42vh, 360px);
  border-radius: 18px; corner-shape: squircle;
  background: var(--workspace-control);
}

.tior-workspace__main-layout--styling .tior-workspace__source-field--styling .tior-workspace__file-control strong {
  color: var(--main-ink-muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 19px;
}

.tior-workspace__main-layout--styling .tior-workspace__source-field--styling > .tior-workspace__file-control {
  gap: 18px;
  color: var(--main-ink-muted);
  letter-spacing: 0;
  text-transform: none;
}

.tior-workspace__main-layout--styling .tior-workspace__source-field--styling > .tior-workspace__file-control > svg {
  color: var(--main-placeholder);
}

.tior-workspace__main-layout--styling .tior-workspace__source-field--styling > .tior-workspace__file-control > span {
  display: grid;
  gap: 8px;
}

.tior-workspace__main-layout--styling .tior-workspace__source-field--styling .tior-workspace__file-control small {
  display: grid;
  gap: 4px;
  margin-top: 0;
  color: var(--main-placeholder);
  max-width: 360px;
  font-size: 12px;
  line-height: 17px;
  white-space: normal;
}

.tior-workspace__main-layout--styling .tior-workspace__source-field--styling .tior-workspace__file-control small > span:first-child {
  color: var(--main-placeholder);
  font-weight: 400;
}

.tior-workspace__main-canvas > .tior-workspace__preview-stage > .tior-workspace__source-preview img,
.tior-workspace__main-canvas > .tior-workspace__preview-stage > .tior-workspace__source-preview video {
  max-height: min(55vh, 520px);
}

.tior-workspace__selected-strip {
  min-height: 112px;
  padding: 8px 18px 12px;
  border: 0;
  background: var(--workspace-panel);
}

.tior-workspace__selected-strip > header {
  margin-bottom: 6px;
}

.tior-workspace__selected-strip h2 {
  font-size: 13px;
  line-height: 17px;
}

.tior-workspace__selected-strip > header > span {
  min-width: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  font-size: 11px;
}

.tior-workspace__selected-strip > div {
  gap: 8px;
}

.tior-workspace__main-layout--styling .tior-workspace__main-canvas > .tior-workspace__preview-stage > .tior-workspace__source-preview img,
.tior-workspace__main-layout--styling .tior-workspace__main-canvas > .tior-workspace__preview-stage > .tior-workspace__source-preview video {
  width: auto;
  max-width: 100%;
  height: auto;
  aspect-ratio: auto;
  margin-inline: auto;
  object-fit: contain;
}

.tior-workspace__main-layout--styling .tior-workspace__selected-strip {
  display: grid;
  min-height: 96px;
  align-content: center;
  justify-items: center;
  gap: 8px;
  padding: 10px 18px 12px;
  background: var(--workspace-canvas);
  text-align: center;
}

.tior-workspace__main-layout--styling .tior-workspace__selected-label {
  margin: 0;
  color: var(--main-ink-muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
  letter-spacing: 0;
}

.tior-workspace__main-layout--styling .tior-workspace__product-thumb,
.tior-workspace__main-layout--styling .tior-workspace__product-add-tile {
  color: var(--main-ink);
}

.tior-workspace__main-layout--styling .tior-workspace__selected-strip > header {
  width: 100%;
  justify-content: center;
  gap: 8px;
}

.tior-workspace__main-layout--styling .tior-workspace__selected-strip > header > div {
  display: grid;
  justify-items: center;
}

.tior-workspace__main-layout--styling .tior-workspace__selected-strip > div {
  width: 100%;
  justify-content: safe center;
}

.tior-workspace__main-layout--portfolio .tior-workspace__portfolio-picker {
  width: min(360px, 100%);
  margin-inline: auto;
}

.tior-workspace__main-layout--products .tior-workspace__selected-strip,
.tior-workspace__main-layout--portfolio .tior-workspace__selected-strip {
  height: 214px;
  min-height: 214px;
  align-content: start;
}

.tior-workspace__portfolio-products-source[hidden] {
  display: none !important;
}

@media (min-width: 821px) and (min-height: 620px) {
  body.is-direct-workspace:has(.tior-workspace__main-layout) {
    height: 100svh;
    overflow: hidden;
  }

  .tior-workspace:has(.tior-workspace__main-layout) {
    display: grid;
    width: min(1540px, calc(100% - 32px));
    height: 100svh;
    grid-template-rows: 40px minmax(0, 1fr);
    padding: 66px 0 12px;
  }

  .tior-workspace:has(.tior-workspace__main-layout) .tior-workspace__bar {
    min-height: 40px;
  }

  .tior-workspace__live-shell--main,
  .tior-workspace__main-layout {
    min-height: 0;
    height: 100%;
  }
}

@media (min-width: 821px) and (max-width: 1180px) {
  .tior-workspace__main-layout {
    grid-template-columns: minmax(286px, 320px) minmax(0, 1fr);
  }
}

@media (min-width: 821px) and (max-height: 820px) {
  .tior-workspace__main-inspector .tior-workspace__intro {
    padding: 14px 18px 11px;
  }

  .tior-workspace__main-inspector .tior-workspace__intro h1 {
    font-size: clamp(21px, 1.55vw, 26px);
  }

  .tior-workspace__main-inspector .tior-workspace__section {
    gap: 7px;
    padding: 9px 18px 10px;
  }

  .tior-workspace__main-inspector .tior-workspace__field textarea {
    height: 64px;
    min-height: 58px;
    padding: 8px 10px;
  }

  .tior-workspace__main-action {
    padding: 0 18px 8px;
  }

  .tior-workspace__main-action .tior-workspace__estimate > div {
    padding-block: 6px;
  }

  .tior-workspace__main-inspector .tior-workspace__credit-note {
    margin-top: 4px;
  }

  .tior-workspace__main-layout--styling .tior-workspace__intro {
    padding: 20px 22px 16px;
  }

  .tior-workspace__main-layout--styling .tior-workspace__section {
    gap: 13px;
    padding: 16px 22px;
  }

  .tior-workspace__main-layout--styling .tior-workspace__field textarea {
    height: auto;
    min-height: 68px;
    padding: 10px 12px;
  }

  .tior-workspace__main-layout--styling .tior-workspace__main-action {
    padding: 10px 22px 14px;
  }

  .tior-workspace__main-layout--styling .tior-workspace__main-action .tior-workspace__estimate {
    margin-bottom: 12px;
  }

  .tior-workspace__main-layout--styling .tior-workspace__main-inspector .tior-workspace__credit-note {
    margin-top: 10px;
  }
}

@media (min-width: 821px) and (min-height: 620px) and (max-height: 680px) {
  .tior-workspace__main-layout--products .tior-workspace__main-inspector,
  .tior-workspace__main-layout--portfolio .tior-workspace__main-inspector {
    min-height: 0;
    align-content: start;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }

  .tior-workspace__main-layout--styling .tior-workspace__intro {
    padding: 14px 18px 11px;
  }

  .tior-workspace__main-layout--styling .tior-workspace__section {
    gap: 7px;
    padding: 9px 18px 10px;
  }

  .tior-workspace__main-layout--styling .tior-workspace__field textarea {
    height: 64px;
    min-height: 58px;
    padding: 8px 10px;
  }

  .tior-workspace__main-layout--styling .tior-workspace__main-action {
    padding: 0 18px 8px;
  }

  .tior-workspace__main-layout--styling .tior-workspace__main-action .tior-workspace__estimate > div {
    padding-block: 6px;
  }

  .tior-workspace__main-layout--styling .tior-workspace__main-inspector .tior-workspace__credit-note {
    margin-top: 4px;
  }
}

@media (max-width: 820px) {
  .tior-workspace__main-layout {
    grid-template-columns: minmax(0, 1fr);
    height: auto;
    overflow: visible;
  }

  .tior-workspace__main-inspector,
  .tior-workspace__main-output {
    min-width: 0;
    height: auto;
  }

  .tior-workspace__main-layout--products .tior-workspace__selected-strip,
  .tior-workspace__main-layout--portfolio .tior-workspace__selected-strip {
    height: auto;
    min-height: 0;
  }

  .tior-workspace__main-inspector {
    grid-template-rows: auto auto auto;
  }

  .tior-workspace__main-layout--products .tior-workspace__main-inspector,
  .tior-workspace__main-layout--portfolio .tior-workspace__main-inspector {
    align-content: start;
  }

  .tior-workspace__main-controls {
    overflow: visible;
  }

  .tior-workspace__main-output {
    grid-template-rows: auto auto;
  }

  .tior-workspace__main-inspector > .tior-workspace__selected-strip {
    padding: 20px 0;
    border-top: 1px solid var(--line);
    background: transparent;
  }

  .tior-workspace__main-layout .tior-workspace__source-field .tior-workspace__file-control {
    min-height: min(32vh, 220px);
  }
}

@media (max-width: 560px) {
  .tior-workspace__main-layout .tior-workspace__source-field .tior-workspace__file-control {
    min-height: 180px;
  }
}

@media (min-width: 821px) and (max-width: 1787px) {
  .tior-workspace:has(.tior-workspace__main-layout) {
    width: calc(100% - 160px);
    margin-right: 144px;
    margin-left: 16px;
  }

  .tior-workspace:has(.tior-workspace__main-layout) .tior-workspace__recent-tray {
    right: 16px;
  }
}

/* Canonical app-detail hierarchy. Main Products and Main Portfolio establish
   the visual contract; every other feature route keeps its own controls and
   engine state inside the same title / controls / action / result structure. */
.tior-workspace__main-layout--canonical {
  grid-template-columns: minmax(310px, 350px) minmax(0, 1fr);
  background: var(--workspace-panel);
}

.tior-workspace__main-layout--canonical .tior-workspace__main-inspector {
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: var(--workspace-panel);
}

.tior-workspace__main-layout--canonical .tior-workspace__intro {
  padding: 28px 22px 22px;
  border-bottom: 0;
}

.tior-workspace__main-layout--canonical .tior-workspace__intro h1 {
  color: var(--main-ink-strong, var(--text));
  font-size: clamp(24px, 1.75vw, 27px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -.04em;
}

.tior-workspace__main-layout--canonical .tior-workspace__intro > p:last-child {
  margin-top: 16px;
  color: var(--main-ink-muted, var(--muted));
  font-size: 13px;
  line-height: 18px;
}

.tior-workspace__main-layout--canonical .tior-workspace__main-controls {
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.tior-workspace__main-layout--canonical .tior-workspace__section {
  gap: 17px;
  padding: 22px;
  border-bottom: 0;
}

.tior-workspace__main-layout--canonical .tior-workspace__section legend {
  color: var(--main-ink-strong, var(--text));
  font-size: 15px;
  font-weight: 600;
  line-height: 20px;
  letter-spacing: 0;
  text-transform: none;
}

.tior-workspace__main-layout--canonical .tior-workspace__section legend em {
  display: inline;
  min-height: 0;
  margin-left: 7px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--main-ink-muted, var(--muted));
  font-family: var(--font-editorial);
  font-size: 16px;
  font-style: italic;
  font-weight: var(--workspace-detail-editorial-weight);
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
}

.tior-workspace__main-layout--canonical .tior-workspace__field {
  gap: 8px;
}

.tior-workspace__main-layout--canonical .tior-workspace__field > span:not(.tior-workspace__file-control) {
  color: var(--main-ink-muted, var(--muted));
  font-size: 13px;
  font-weight: 400;
  line-height: 18px;
  letter-spacing: 0;
  text-transform: none;
}

.tior-workspace__main-layout--canonical .tior-workspace__field > small {
  color: var(--main-placeholder, var(--muted));
  font-size: 12px;
  font-weight: 400;
  line-height: 17px;
}

.tior-workspace__main-layout--canonical .tior-workspace__field input:not(.tior-workspace__file-input),
.tior-workspace__main-layout--canonical .tior-workspace__field select,
.tior-workspace__main-layout--canonical .tior-workspace__field textarea {
  border-radius: 14px;
  color: var(--main-ink, var(--text));
  font-size: var(--workspace-detail-control-size);
  font-weight: var(--workspace-detail-control-weight);
  line-height: var(--workspace-detail-control-line-height);
  corner-shape: squircle;
}

.tior-workspace__main-layout--canonical .tior-workspace__field select {
  appearance: none;
  padding-right: 44px;
  background-color: var(--workspace-control);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%2383837d' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 17px center;
  background-size: 12px 8px;
}

.tior-workspace__main-layout--canonical .tior-workspace__field input:not(.tior-workspace__file-input),
.tior-workspace__main-layout--canonical .tior-workspace__field select {
  min-height: 44px;
}

.tior-workspace__main-layout--canonical .tior-workspace__field textarea {
  min-height: 72px;
  padding: 10px 12px;
}

.tior-workspace__main-layout--canonical .tior-workspace__field input::placeholder,
.tior-workspace__main-layout--canonical .tior-workspace__field textarea::placeholder {
  color: var(--main-placeholder, var(--muted));
  font-weight: 350;
  opacity: 1;
}

.tior-workspace__main-layout--canonical .tior-workspace__main-action {
  display: grid;
  padding: 16px 22px 20px;
  border-top: 0;
}

.tior-workspace__main-layout--canonical .tior-workspace__main-action .tior-workspace__estimate {
  margin-bottom: 15px;
  border: 0;
}

.tior-workspace__main-layout--canonical .tior-workspace__main-action .tior-workspace__estimate > div {
  gap: 1px;
  padding: 8px 5px 7px;
}

.tior-workspace__main-layout--canonical .tior-workspace__main-action .tior-workspace__estimate > div + div {
  border: 0;
}

.tior-workspace__main-layout--canonical .tior-workspace__main-action .tior-workspace__estimate span {
  color: var(--main-ink-strong, var(--text));
  font-size: 12px;
  line-height: 16px;
}

.tior-workspace__main-layout--canonical .tior-workspace__main-action .tior-workspace__estimate strong {
  color: var(--main-ink-muted, var(--muted));
  font-size: var(--workspace-detail-estimate-size);
  font-weight: 400;
  line-height: var(--workspace-detail-estimate-line-height);
}

.tior-workspace__main-layout--canonical .tior-workspace__main-inspector .tior-workspace__primary {
  width: 100%;
  min-height: 48px;
  margin: 2px 0 0;
  border-radius: var(--action-radius);
  corner-shape: squircle;
}

.tior-workspace__main-layout--canonical .tior-workspace__main-inspector .tior-workspace__credit-note,
.tior-workspace__main-layout--canonical .tior-workspace__main-inspector .tior-workspace__form-status {
  margin-inline: 0;
  color: var(--main-ink-muted, var(--muted));
  font-size: var(--workspace-detail-support-size);
  line-height: var(--workspace-detail-support-line-height);
}

.tior-workspace__main-layout--canonical .tior-workspace__main-inspector .tior-workspace__credit-note {
  margin-top: 12px;
}

.tior-workspace__main-layout--canonical .tior-workspace__form-status:empty {
  display: none;
}

.tior-workspace__main-layout--canonical .tior-workspace__main-output {
  grid-template-rows: minmax(0, 1fr);
  background: var(--workspace-canvas);
}

.tior-workspace__main-layout--canonical .tior-workspace__main-canvas {
  min-height: 0;
  padding: 16px 18px;
  background-color: var(--workspace-canvas);
  background-image: none;
}

.tior-workspace__main-layout--canonical .tior-workspace__preview-stage > .tior-workspace__progress {
  position: absolute;
  z-index: 4;
  top: 50%;
  left: 50%;
  width: min(440px, calc(100% - 48px));
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* An expired/missing owned source must not hide an otherwise live job. */
.tior-workspace__main-layout--canonical .tior-workspace__preview-stage:has(> .tior-workspace__progress:not([hidden])):not(:has(> .tior-workspace__source-preview:not([hidden]))) {
  min-height: 200px;
}

.tior-workspace__main-layout--canonical .tior-workspace__preview-stage > .tior-workspace__progress > span {
  display: block;
  width: 36px;
  height: 36px;
  margin-bottom: 16px;
}

.tior-workspace__main-layout--canonical .tior-workspace__preview-stage > .tior-workspace__progress h2 {
  font-size: clamp(22px, 1.65vw, 28px);
  line-height: 1.2;
}

.tior-workspace__progress [data-progress-elapsed] {
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.tior-workspace__progress [data-progress-estimate] {
  display: block;
  margin-top: 6px;
  color: color-mix(in srgb, var(--text) 85%, var(--workspace-canvas));
  font-size: 12px;
  line-height: 1.4;
}

.tior-workspace__main-layout--canonical .tior-workspace__preview-stage > .tior-workspace__source-preview img,
.tior-workspace__main-layout--canonical .tior-workspace__preview-stage > .tior-workspace__source-preview video {
  transform: scale(1);
}

.tior-workspace__main-layout--canonical .tior-workspace__preview-stage:has(> .tior-workspace__progress:not([hidden])) > .tior-workspace__source-preview {
  pointer-events: none;
}

.tior-workspace__main-layout--canonical .tior-workspace__preview-stage:has(> .tior-workspace__progress:not([hidden])) > .tior-workspace__source-preview img,
.tior-workspace__main-layout--canonical .tior-workspace__preview-stage:has(> .tior-workspace__progress:not([hidden])) > .tior-workspace__source-preview video {
  filter: blur(10px);
  transform: scale(1.035);
}

.tior-workspace__main-layout--canonical .tior-workspace__preview-stage:has(> .tior-workspace__progress:not([hidden]))::after {
  position: absolute;
  z-index: 3;
  inset: 0;
  background: color-mix(in srgb, var(--workspace-canvas) 65%, transparent);
  content: '';
  pointer-events: none;
}

.tior-workspace__main-layout--canonical .tior-workspace__main-source-desktop {
  width: min(680px, 82%);
  gap: 10px;
}

.tior-workspace__main-layout--canonical .tior-workspace__source-field--canvas > span:not(.tior-workspace__file-control) {
  text-align: center;
}

.tior-workspace__main-layout--canonical .tior-workspace__source-field--canvas .tior-workspace__file-control {
  min-height: min(42vh, 360px);
  border-radius: 18px; corner-shape: squircle;
  background: var(--workspace-control);
}

.tior-workspace__main-layout--canonical .tior-workspace__file-control {
  min-height: 44px;
  border-radius: 14px;
  color: var(--main-ink-muted, var(--muted));
  letter-spacing: 0;
  text-transform: none;
  corner-shape: squircle;
}

.tior-workspace__main-layout--canonical .tior-workspace__file-control strong {
  color: var(--main-ink-muted, var(--muted));
  font-size: 14px;
  font-weight: 500;
  line-height: 19px;
}

.tior-workspace__main-layout--canonical .tior-workspace__file-control small {
  color: var(--main-placeholder, var(--muted));
  font-size: 12px;
  font-weight: 400;
  line-height: 17px;
}

.tior-workspace__main-layout--canonical .tior-workspace__file-control > svg {
  color: var(--main-placeholder, var(--muted));
}

.tior-workspace__main-layout--canonical .tior-workspace__upload {
  border-radius: 18px;
  color: var(--main-ink-muted, var(--muted));
  corner-shape: squircle;
}

.tior-workspace__main-layout--canonical .tior-workspace__upload strong {
  color: var(--main-ink-muted, var(--muted));
  font-size: 14px;
  font-weight: 500;
  line-height: 19px;
}

.tior-workspace__main-layout--canonical .tior-workspace__upload small,
.tior-workspace__main-layout--canonical .tior-workspace__upload > svg {
  color: var(--main-placeholder, var(--muted));
}

.tior-workspace__main-layout--canonical .tior-workspace__upload > svg {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
}

.tior-workspace__main-layout--canonical .tior-workspace__upload small {
  font-size: 12px;
  line-height: 17px;
}

.tior-workspace__recent-result:focus-visible > span {
  border-color: var(--focus-ring);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus-ring) 18%, transparent);
}

.tior-workspace__main-layout--canonical .tior-workspace__main-canvas--status > .tior-workspace__result-state {
  display: block;
}

.tior-workspace__main-layout--canonical .tior-workspace__main-canvas--status .tior-workspace__notice {
  justify-content: center;
}

@media (min-width: 821px) and (max-height: 820px) {
  .tior-workspace__main-layout--canonical .tior-workspace__intro {
    padding: 20px 22px 16px;
  }

  .tior-workspace__main-layout--canonical .tior-workspace__section {
    gap: 13px;
    padding: 16px 22px;
  }

  .tior-workspace__main-layout--canonical .tior-workspace__main-action {
    padding: 10px 22px 14px;
  }
}

@media (max-width: 820px) {
  .tior-workspace__main-layout--canonical {
    grid-template-columns: minmax(0, 1fr);
  }

  .tior-workspace__main-layout--canonical .tior-workspace__intro,
  .tior-workspace__main-layout--canonical .tior-workspace__section,
  .tior-workspace__main-layout--canonical .tior-workspace__main-action {
    padding-right: 0;
    padding-left: 0;
  }

  .tior-workspace__main-layout--canonical .tior-workspace__main-controls {
    overflow: visible;
  }

  .tior-workspace__main-layout--canonical .tior-workspace__main-output {
    margin-top: 34px;
    border-top: 1px solid var(--line);
    background: transparent;
  }

  .tior-workspace__main-layout--canonical .tior-workspace__main-canvas {
    padding: 28px 0 14px;
    background: transparent;
  }

  /* Share the actual progress state: hide only the duplicate mobile upload,
     never the spatial preview which can live inside this same fieldset. */
  .tior-workspace__main-layout--canonical:has([data-generation-progress]:not([hidden])) .tior-workspace__main-source-mobile:not(:has([data-source-preview-stage])),
  .tior-workspace__main-layout--canonical:has([data-generation-progress]:not([hidden])) .tior-workspace__main-source-mobile > .tior-workspace__source-field {
    display: none;
  }

  .tior-workspace__main-layout--canonical .tior-workspace__preview-stage > .tior-workspace__progress {
    width: min(400px, calc(100% - 32px));
    padding: 0;
  }

  .tior-workspace__main-layout--canonical .tior-workspace__preview-stage > .tior-workspace__progress > span {
    width: 32px;
    height: 32px;
    margin-bottom: 12px;
  }

  .tior-workspace__main-layout--canonical .tior-workspace__preview-stage > .tior-workspace__progress h2 {
    font-size: 22px;
    line-height: 25px;
  }

  .tior-workspace__main-layout--canonical .tior-workspace__preview-stage > .tior-workspace__progress > p:not(.tior-workspace__eyebrow) {
    margin-top: 8px;
    font-size: 13px;
    line-height: 18px;
  }

  .tior-workspace__main-layout--canonical .tior-workspace__preview-stage > .tior-workspace__progress > div {
    height: 3px;
    margin-top: 14px;
  }

  .tior-workspace__main-layout--canonical .tior-workspace__main-canvas--status {
    min-height: 320px;
  }

  .tior-workspace__main-layout--detail .tior-workspace__main-canvas > .tior-workspace__result-state {
    display: block;
    padding-block: 36px;
  }

  .tior-workspace__main-layout--detail .tior-workspace__main-canvas:has(> .tior-workspace__preview-stage > .tior-workspace__source-preview:not([hidden])) > .tior-workspace__result-state,
  .tior-workspace__main-layout--detail .tior-workspace__main-canvas:has(> .tior-workspace__preview-stage > .tior-workspace__progress:not([hidden])) > .tior-workspace__result-state,
  .tior-workspace__main-layout--detail .tior-workspace__main-canvas:has(> .tior-workspace__results:not([hidden])) > .tior-workspace__result-state {
    display: none;
  }
}

/* Member-authorized spatial QA editors reuse the canonical workbench. */
.tior-workspace__spatial-help {
  margin: 0;
  color: var(--muted);
  font: 400 13px/19px var(--font-ui);
}

.tior-workspace__spatial-controls { min-width: 0; }
.tior-workspace__spatial-controls .tior-workspace__text-action {
  min-height: 44px;
  justify-self: start;
  color: var(--text);
  font-size: 13px;
}
.tior-workspace__spatial-number-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.tior-workspace__spatial-number-grid input,
.tior-workspace__spatial-range input[type="number"] { min-width: 0; min-height: 44px; }
.tior-workspace__spatial-precision summary {
  min-height: 44px;
  align-content: center;
  color: var(--text);
  cursor: pointer;
  font: 500 13px/19px var(--font-ui);
}
.tior-workspace__spatial-precision + .tior-workspace__spatial-precision { margin-top: 4px; }
.tior-workspace__spatial-range {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 84px;
  column-gap: 12px;
  row-gap: 2px;
}
.tior-workspace__spatial-range .tior-workspace__field {
  display: contents;
}
.tior-workspace__spatial-range .tior-workspace__field > span { grid-column: 1 / -1; }
.tior-workspace__spatial-range input[type="number"] { grid-column: 2; grid-row: 2; }
.tior-workspace__spatial-range input[type="range"] {
  background: var(--workspace-control);
  grid-column: 1;
  grid-row: 2;
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0;
  accent-color: var(--text);
  cursor: pointer;
}
.tior-workspace__main-layout--canonical .tior-workspace__spatial-controls--angle {
  gap: 8px;
  padding-block: 6px;
}
.tior-workspace__spatial-controls--angle > legend {
  text-align: center;
}
.tior-workspace__spatial-controls--angle > .tior-workspace__spatial-help {
  text-align: center;
  font-size: 12px;
  line-height: 17px;
}
.tior-workspace__angle-pad {
  position: relative;
  width: min(176px, 100%);
  aspect-ratio: 1;
  margin-inline: auto;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--workspace-control);
  color: var(--text);
  touch-action: none;
  user-select: none;
  cursor: grab;
}
.tior-workspace__angle-pad:active { cursor: grabbing; }
.tior-workspace__angle-crosshair {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.tior-workspace__angle-crosshair::before,
.tior-workspace__angle-crosshair::after {
  content: '';
  position: absolute;
  background: var(--line);
}
.tior-workspace__angle-crosshair::before { left: 0; right: 0; top: 50%; height: 1px; }
.tior-workspace__angle-crosshair::after { top: 0; bottom: 0; left: 50%; width: 1px; }
.tior-workspace__angle-center,
.tior-workspace__angle-thumb {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
}
.tior-workspace__angle-center {
  width: 5px;
  height: 5px;
  background: var(--muted);
}
.tior-workspace__angle-thumb {
  width: 24px;
  height: 24px;
  pointer-events: auto;
  border: 1px solid var(--line-strong);
  background: var(--workspace-control);
  box-shadow: 0 2px 6px color-mix(in srgb, var(--text) 12%, transparent);
}
.tior-workspace__angle-thumb::after {
  content: '';
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: var(--text);
}
.tior-workspace__angle-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: min(224px, 100%);
  margin-inline: auto;
}
.tior-workspace__main-layout--canonical .tior-workspace__angle-values .tior-workspace__field { gap: 4px; }
.tior-workspace__angle-values .tior-workspace__field > span { text-align: center; }
.tior-workspace__angle-values input { min-width: 0; min-height: 44px; text-align: center; font-variant-numeric: tabular-nums; }
.tior-workspace__angle-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 16px;
}
.tior-workspace__spatial-controls--angle .tior-workspace__text-action { margin: 0; font-size: 12px; }
.tior-workspace__spatial-controls--angle [data-spatial-status]:not([data-error="true"]) {
  /* The numeric fields already show both values; announcements must not shift controls. */
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  margin: -1px;
  padding: 0;
  border: 0;
  clip-path: inset(50%);
  white-space: nowrap;
}
@media (max-width: 820px) {
  .tior-workspace__angle-pad { width: min(192px, 100%); }
}
[data-spatial-workspace] .tior-workspace__preview-stage {
  position: relative;
  width: 100%;
  max-width: 880px;
  overflow: visible;
}
[data-spatial-workspace] .tior-workspace__preview-stage:not(:has([data-source-preview]:not([hidden]))):not(:has([data-generation-progress]:not([hidden]))) { display: none; }
[data-spatial-workspace] .tior-workspace__source-preview {
  position: relative;
  width: 100%;
  margin: 0;
  overflow: visible;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.tior-workspace__main-layout--canonical[data-spatial-workspace] .tior-workspace__preview-stage,
.tior-workspace__main-layout--canonical[data-spatial-workspace] .tior-workspace__source-preview {
  background: transparent;
  box-shadow: none;
  border: 0;
  padding: 0;
}
[data-spatial-workspace] .tior-workspace__preview-stage > .tior-workspace__source-preview > img {
  display: block;
  width: 100%;
  height: min(58vh, 520px);
  max-height: none;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center;
  image-orientation: from-image;
}
.tior-workspace__floor-overlay {
  position: absolute;
  touch-action: none;
  user-select: none;
  cursor: crosshair;
}
.tior-workspace__room-bounds {
  position: absolute;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 0;
  background: transparent;
  box-shadow: 0 0 0 1px #000;
  cursor: move;
}
.tior-workspace__room-bounds[data-confirmed="false"] { border-style: dashed; cursor: crosshair; }
.tior-workspace__camera-ray {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}
.tior-workspace__camera-ray line {
  stroke: #000;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 1px 0 #fff);
}
.tior-workspace__floor-handle {
  position: absolute;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: grab;
  touch-action: none;
}
.tior-workspace__floor-handle::before {
  content: '';
  position: absolute;
  inset: 7px;
  border: 1px solid #fff;
  border-radius: 50%;
  background: #000;
}
.tior-workspace__floor-handle svg,
.tior-workspace__floor-handle > span { position: relative; width: 18px; height: 18px; font: 400 21px/18px var(--font-ui); }
.tior-workspace__floor-handle--nw::before,
.tior-workspace__floor-handle--se::before { inset: 15px; background: #fff; border-color: #000; }
.tior-workspace__floor-handle--nw,
.tior-workspace__floor-handle--se { cursor: nwse-resize; }
.tior-workspace__floor-handle:active { cursor: grabbing; }
.tior-workspace__floor-handle:focus-visible,
.tior-workspace__room-bounds:focus-visible { outline: 2px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 4px #000; }
.tior-workspace__angle-pad:focus-visible,
.tior-workspace__spatial-precision summary:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
[data-spatial-workspace]:has([data-generation-progress]:not([hidden])) .tior-workspace__floor-overlay { visibility: hidden; }
[data-spatial-workspace]:has([data-generation-results]:not([hidden])) .tior-workspace__preview-stage { display: none; }

@media (max-width: 820px) {
  [data-spatial-workspace] .tior-workspace__main-source-mobile { display: grid; gap: 16px; }
  [data-spatial-workspace] .tior-workspace__preview-stage > .tior-workspace__source-preview > img { width: auto; max-width: 100%; height: auto; max-height: 56vh; margin-inline: auto; }
  [data-spatial-workspace] .tior-workspace__main-source-mobile:has([data-source-preview]:not([hidden])) > .tior-workspace__source-field { display: none; }
  [data-spatial-workspace] .tior-workspace__main-output:not(:has([data-generation-results]:not([hidden]))) { display: none; }
  .tior-workspace__spatial-help { font-size: 14px; line-height: 20px; }
  .tior-workspace__spatial-range { grid-template-columns: minmax(0, 1fr) 92px; }
}
@media (prefers-reduced-motion: reduce) {
  .tior-workspace__floor-handle,
  .tior-workspace__angle-thumb { transition: none; }
}
@media (forced-colors: active) {
  .tior-workspace__room-bounds { border-color: Highlight; box-shadow: none; }
  .tior-workspace__floor-handle::before { background: ButtonFace; border-color: ButtonText; }
  .tior-workspace__floor-handle { color: ButtonText; }
  .tior-workspace__camera-ray line { stroke: CanvasText; filter: none; }
  .tior-workspace__angle-pad,
  .tior-workspace__angle-thumb { background: Canvas; border-color: CanvasText; box-shadow: none; }
  .tior-workspace__angle-crosshair::before,
  .tior-workspace__angle-crosshair::after,
  .tior-workspace__angle-center,
  .tior-workspace__angle-thumb::after { background: CanvasText; }
}

/* One input frame for empty, selected, and running states in every live app. */
.tior-workspace__main-layout--canonical[data-workspace-form] { --source-frame-height: clamp(260px, 48vh, 480px); }
.tior-workspace__main-layout--canonical[data-workspace-form] .tior-workspace__main-source-desktop,
.tior-workspace__main-layout--canonical[data-workspace-form] .tior-workspace__result-grid,
.tior-workspace__main-layout--canonical[data-workspace-form] .tior-workspace__preview-stage { width: min(880px, 100%); margin: auto; }
.tior-workspace__main-layout--canonical[data-workspace-form] .tior-workspace__source-field .tior-workspace__file-control,
.tior-workspace__main-layout--canonical[data-workspace-form] .tior-workspace__result-preview,
.tior-workspace__main-layout--canonical[data-workspace-form] .tior-workspace__preview-stage {
  height: var(--source-frame-height); min-height: 0; max-height: none; box-sizing: border-box; border-radius: 18px; corner-shape: squircle;
}
.tior-workspace__main-layout--canonical[data-workspace-form] .tior-workspace__result-preview {
  width: 100%;
}
.tior-workspace__main-layout--canonical[data-workspace-form] .tior-workspace__result-preview > img,
.tior-workspace__main-layout--canonical[data-workspace-form] .tior-workspace__result-preview > video {
  width: 100%; height: 100%; min-height: 0; max-height: none;
  object-fit: contain;
}
.tior-workspace__main-layout--canonical[data-workspace-form] .tior-workspace__preview-stage {
  position: relative; display: block; padding: 0; overflow: hidden; background: var(--workspace-control);
}
/* The frame owns its continuous outline, independently of letterboxed media.
   Paint inside the frame so neither clipping nor overlays hide its four edges. */
.tior-workspace__main-layout--canonical[data-workspace-form] .tior-workspace__preview-stage::after {
  content: ''; position: absolute; inset: 0; z-index: 6; pointer-events: none;
  border: 1px solid var(--line); border-radius: inherit; corner-shape: squircle;
}
.tior-workspace__main-layout--canonical[data-workspace-form] .tior-workspace__preview-stage:not(:has([data-source-preview]:not([hidden]))):not(:has([data-generation-progress]:not([hidden]))) { display: none; }
.tior-workspace__main-layout--canonical[data-workspace-form] .tior-workspace__preview-stage > .tior-workspace__source-preview {
  position: relative; inset: auto; width: 100%; height: 100%; min-height: 0; max-height: none; margin: 0; padding: 0; border: 0; border-radius: inherit; corner-shape: squircle; overflow: hidden;
}
.tior-workspace__main-layout--canonical[data-workspace-form] .tior-workspace__preview-stage > .tior-workspace__source-preview > img,
.tior-workspace__main-layout--canonical[data-workspace-form] .tior-workspace__preview-stage > .tior-workspace__source-preview > video {
  display: block; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; aspect-ratio: auto; object-fit: contain; object-position: center; border-radius: inherit; corner-shape: squircle;
}
/* A plan is an editable coordinate surface: keep every room selectable. */
.tior-workspace__main-layout--canonical[data-workspace-form] .tior-workspace__preview-stage[data-media-fitted] {
  width: min(880px, 100%, calc(var(--source-frame-height) * var(--source-ratio)));
  height: auto;
  aspect-ratio: var(--source-ratio);
}
/* Preserve the original maximum media footprint; remove only contain padding.
   The frame and media now share all four rounded edges, including portraits. */
.tior-workspace__main-layout--canonical[data-workspace-form] .tior-workspace__preview-stage[data-media-fitted] > .tior-workspace__source-preview {
  position: absolute; inset: 0;
}
.tior-workspace__main-layout--canonical[data-spatial-workspace="floor-plan"] .tior-workspace__preview-stage > .tior-workspace__source-preview > img { object-fit: contain; }
.tior-workspace__main-layout--canonical[data-spatial-workspace="floor-plan"] .tior-workspace__preview-stage,
.tior-workspace__main-layout--canonical[data-spatial-workspace="floor-plan"] .tior-workspace__preview-stage > .tior-workspace__source-preview { overflow: visible; }
.tior-workspace__remove-image {
  position: absolute; z-index: 5; inset: 4px 4px auto auto; display: grid; place-items: center; width: 44px; height: 44px; min-width: 44px; min-height: 44px; margin: 0; padding: 8px; border: 0; border-radius: 10px; corner-shape: squircle; background: transparent; color: var(--theme-canvas);
}
.tior-workspace__remove-image > span {
  display: grid; place-items: center; width: 28px; height: 28px; box-sizing: border-box; border: 1px solid #333; border-radius: 6px; corner-shape: squircle; background: #000; color: #fff; font: 400 22px/1 var(--font-ui);
}
.tior-workspace__remove-image > span > svg { display: block; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.tior-workspace__spatial-controls--auto-floor [data-spatial-status]:empty { display: none; }
.tior-workspace__floor-selection-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.tior-workspace__floor-selection-actions button {
  flex: 1 1 auto; min-width: 0; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 14px; corner-shape: squircle;
  background: var(--action-primary-fill); color: var(--action-primary-foreground); font: 400 13px/18px var(--font-ui); cursor: pointer;
}
.tior-workspace__floor-selection-actions button[aria-pressed="true"] { border-color: var(--selection-border); box-shadow: inset 0 0 0 1px var(--selection-border); font-weight: 600; }
.tior-workspace__floor-selection-actions button:disabled { color: var(--action-primary-disabled-foreground); cursor: default; }
.tior-workspace__floor-selection-actions button:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.tior-workspace__floor-selection-overlay {
  position: absolute; z-index: 2; padding: 0; border: 0; border-radius: 0; background: transparent; cursor: crosshair; user-select: none; touch-action: manipulation;
}
.tior-workspace__floor-selection-overlay:focus-visible { outline: 2px solid #fff; outline-offset: -3px; box-shadow: inset 0 0 0 5px #000; }
.tior-workspace__floor-selection-overlay > svg,
.tior-workspace__floor-selection-overlay > [data-floor-markers] { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.tior-workspace__floor-selection-overlay polyline { fill: none; stroke: #fff; stroke-width: 2; vector-effect: non-scaling-stroke; }
.tior-workspace__floor-selection-overlay .tior-workspace__floor-selection-line-outline { stroke: #000; stroke-width: 4; }
.tior-workspace__floor-selection-overlay polyline[data-closed="false"] { stroke-dasharray: 6 4; }
.tior-workspace__floor-selection-marker,
.tior-workspace__floor-selection-cursor {
  position: absolute; display: grid; place-items: center; width: 18px; height: 18px; box-sizing: border-box; transform: translate(-50%, -50%); border: 2px solid #fff; border-radius: 50%;
  background: #000; color: #fff; box-shadow: 0 0 0 1px #000; pointer-events: none; font: 600 11px/1 var(--font-ui);
}
.tior-workspace__floor-selection-cursor { width: 24px; height: 24px; border-style: dashed; background: transparent; }
.tior-workspace__floor-selection-cursor::after { content: ''; width: 4px; height: 4px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px #000; }
[data-spatial-workspace]:has([data-generation-progress]:not([hidden])) .tior-workspace__floor-selection-overlay { visibility: hidden; }
@media (forced-colors: active) {
  .tior-workspace__floor-selection-overlay polyline { stroke: Highlight; filter: none; }
  .tior-workspace__floor-selection-overlay .tior-workspace__floor-selection-line-outline { stroke: Canvas; }
  .tior-workspace__floor-selection-marker { background: Canvas; color: CanvasText; border-color: Highlight; box-shadow: none; }
  .tior-workspace__floor-selection-cursor { border-color: Highlight; box-shadow: none; }
  .tior-workspace__floor-selection-cursor::after { background: Highlight; box-shadow: none; }
  .tior-workspace__floor-selection-overlay:focus-visible { outline-color: Highlight; box-shadow: none; }
}
:root[data-theme="dark"] .tior-workspace__remove-image > span { background: #fff; color: #000; border-color: #ddd; }
.tior-workspace__remove-image:focus-visible { outline: 2px solid var(--theme-ink); outline-offset: -2px; }
.tior-workspace__remove-image:disabled { display: none; }
.tior-workspace__preview-stage:has([data-generation-progress]:not([hidden])) .tior-workspace__remove-image { display: none; }
.tior-workspace__attachment,
.tior-workspace__product-image-wrap { position: relative; min-width: 0; align-self: start; }
.tior-workspace__main-layout--canonical .tior-workspace__attachment .tior-workspace__file-control {
  position: relative; height: 132px; min-height: 132px; padding: 0; overflow: hidden; border-radius: 14px; corner-shape: squircle;
}
.tior-workspace__attachment [data-attachment-preview] { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; object-position: center; border-radius: inherit; corner-shape: squircle; }
.tior-workspace__attachment[data-has-image] .tior-workspace__file-control > :not([data-attachment-preview]) { visibility: hidden; }
.tior-workspace__attachment .tior-workspace__remove-image { top: 30px; }
/* Optional Plan finish references reuse the shared attachment and remove control. */
.tior-workspace__floor-references > p,
.tior-workspace__floor-references > [role="status"] {
  margin: 0; color: var(--main-ink-muted, var(--muted)); font-size: var(--workspace-detail-support-size); line-height: var(--workspace-detail-support-line-height);
}
.tior-workspace__floor-references > [role="status"]:empty { display: none; }
.tior-workspace__floor-reference-grid { display: flex; flex-wrap: wrap; justify-content: center; min-width: 0; gap: 8px; }
.tior-mask__switch { position: relative; display: flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; }
.tior-mask__switch input { position: absolute; opacity: 0; width: 52px; height: 44px; right: 36px; z-index: 1; cursor: pointer; }
.tior-mask__track { margin-left: auto; flex: 0 0 52px; height: 32px; border-radius: 999px; background: var(--main-line, var(--line-strong)); border: 1px solid var(--main-ink-muted, var(--muted)); }
.tior-mask__track::after { content: ''; display: block; width: 26px; height: 26px; margin: 2px; border-radius: 50%; background: var(--main-ink, var(--text)); }
.tior-mask__switch input:checked + .tior-mask__track { background: var(--main-ink, var(--text)); }
.tior-mask__switch input:checked + .tior-mask__track::after { transform: translateX(20px); background: var(--workspace-panel); }
.tior-mask__switch input:focus-visible + .tior-mask__track { outline: 2px solid var(--main-ink, var(--text)); outline-offset: 4px; }
.tior-mask__switch:has(input:disabled) { opacity: .55; cursor: default; }
.tior-mask [data-mask-state] { width: 24px; font-size: 13px; }
.tior-mask p, .tior-mask [role="status"] { font-size: 13px; line-height: 1.45; color: var(--main-ink-muted, var(--muted)); }
.tior-mask [data-mask-tools]:not([hidden]) { display: grid; gap: 12px; }
.tior-mask input[type="range"] { width: 100%; min-height: 44px; accent-color: var(--main-ink, var(--text)); }
.tior-mask button { min-height: 44px; }
.tior-workspace__main-layout--canonical .tior-mask { gap: 12px; }
.tior-mask p { margin: 0; }
.tior-mask button { border: 1px solid var(--action-primary-border); border-radius: var(--action-radius); corner-shape: squircle; background: var(--action-primary-fill); color: var(--action-primary-foreground); font-size: 13px; }
.tior-mask button:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.tior-mask button:disabled { opacity: .45; cursor: default; }
.tior-mask__canvas { position: absolute; touch-action: none; cursor: crosshair; border-radius: 0; }
.tior-mask__canvas:focus-visible { outline: 2px solid var(--main-ink, var(--text)); outline-offset: -2px; }
.tior-workspace__main-layout--canonical[data-workspace-form]:has([data-mask-toggle]) .tior-workspace__preview-stage > .tior-workspace__source-preview > img { object-fit: contain; }
@media (forced-colors: active) {
  .tior-mask__track { background: Canvas; border-color: ButtonText; }
  .tior-mask__track::after { background: ButtonText; }
  .tior-mask__switch input:checked + .tior-mask__track { background: Highlight; }
  .tior-mask__switch input:checked + .tior-mask__track::after { background: HighlightText; }
}
.tior-workspace__floor-reference-grid > .tior-workspace__attachment { flex: 0 0 calc((100% - 16px) / 3); min-width: 0; }
.tior-workspace__main-layout--canonical .tior-workspace__floor-references .tior-workspace__file-control {
  height: 88px; min-height: 88px; display: flex; flex-direction: column; justify-content: center; gap: 6px;
}
.tior-workspace__floor-references .tior-workspace__attachment .tior-workspace__remove-image { top: 0; right: 0; }
.tior-workspace__floor-references .tior-workspace__file-control strong { text-align: center; font-size: 12px; line-height: 1.35; font-weight: 400; }
.tior-workspace__floor-reference-grid > [hidden] { display: none; }
.tior-workspace__main-layout--canonical .tior-workspace__section.tior-detail-controls { min-width: 0; gap: 8px; }
.tior-detail-mode { display: flex; padding: 3px; gap: 3px; background: var(--surface-raised, var(--surface)); border: 1px solid var(--line); border-radius: 14px; }
.tior-detail-mode > label { position: relative; flex: 1; min-width: 0; cursor: pointer; }
.tior-detail-mode input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tior-detail-mode span { display: grid; place-items: center; min-height: 38px; border-radius: 10px; color: var(--muted); font: 500 13px/1.3 var(--font-ui); }
.tior-detail-mode input:checked + span { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgb(0 0 0 / .12); }
.tior-detail-mode input:focus-visible + span { outline: 2px solid var(--text); outline-offset: 2px; }
.tior-detail-mode input:disabled + span { opacity: .5; cursor: default; }
.tior-detail-count { display: grid; margin-top: 4px; gap: 4px; color: var(--main-ink-muted, var(--muted)); font: 400 13px/18px var(--font-ui); }
.tior-detail-count output { font-weight: 400; font-variant-numeric: tabular-nums; }
.tior-workspace .tior-detail-count input[type="range"] { width: 100%; height: 32px; min-height: 32px; padding: 0; border: 0; accent-color: var(--text); cursor: pointer; }
.tior-detail-range-labels { display: grid; grid-template-columns: 1fr auto 1fr; align-items: baseline; }
.tior-detail-range-labels > :last-child { text-align: right; }
.tior-detail-controls .tior-detail-help { margin: 0; color: var(--muted); font: 400 12px/1.5 var(--font-ui); }
.tior-detail-instructions { display: grid; gap: 14px; margin-top: 12px; }
.tior-detail-controls [hidden] { display: none !important; }
.tior-detail-instructions textarea { resize: vertical; min-height: 82px; }
@media (hover: hover) and (pointer: fine) {
  .tior-detail-mode label:hover span { color: var(--text); }
}
@media (max-width: 820px) {
  .tior-detail-mode span { min-height: 44px; }
  .tior-workspace .tior-detail-count input[type="range"] { height: 44px; }
}
@media (forced-colors: active) {
  .tior-detail-mode input:checked + span { outline: 1px solid Highlight; color: Highlight; }
}
.tior-workspace__floor-references .tior-workspace__file-input:disabled + .tior-workspace__file-control { cursor: default; }
/* Shared compact output controls: preserve native selects and payload selectors. */
.tior-workspace__main-layout--canonical .tior-workspace__output-options {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  padding: 22px;
}
.tior-workspace__main-layout--canonical .tior-workspace__output-options > .tior-workspace__section {
  min-width: 0;
  padding: 0;
}
.tior-workspace__main-layout--canonical .tior-workspace__output-options select {
  min-width: 0;
  padding-left: 12px;
  padding-right: 32px;
}
.tior-workspace__main-layout--canonical .tior-workspace__output-help {
  margin: -8px 22px 14px;
  color: var(--main-ink-muted, var(--muted));
  font-size: 12px;
  line-height: 17px;
}
.tior-detail-ratio { display: grid; gap: 8px; }
.flow-node-options .tior-workspace__main-layout--canonical .tior-workspace__output-options { padding: 16px 0; }
.flow-node-options .tior-workspace__main-layout--canonical .tior-workspace__output-options > .tior-workspace__section { padding: 0 !important; }
.flow-node-options .tior-workspace__main-layout--canonical .tior-workspace__output-help { margin-inline: 0; }
.tior-detail-ratio > span,
.tior-detail-ratio > small { color: var(--main-ink-muted, var(--muted)); font-size: 13px; line-height: 18px; }
@media (max-width: 820px) {
  .tior-workspace__main-layout--canonical .tior-workspace__output-options select { min-height: 44px; }
}
@media (max-width: 820px) {
  .tior-workspace__floor-references .tior-workspace__file-control strong { font-size: 13px; }
  .tior-workspace__floor-references > p,
  .tior-workspace__floor-references > [role="status"] { font-size: max(12px, var(--workspace-detail-support-size)); }
  .tior-workspace__main-layout--canonical[data-workspace-form] { --source-frame-height: clamp(220px, 38vh, 360px); }
  .tior-workspace__main-layout--canonical[data-workspace-form] .tior-workspace__main-source-mobile { display: grid; gap: 0; }
  .tior-workspace__main-layout--canonical[data-workspace-form] .tior-workspace__main-source-mobile:has([data-source-preview]:not([hidden])) > .tior-workspace__source-field { display: none; }
  .tior-workspace__main-layout--canonical[data-workspace-form] .tior-workspace__main-canvas:not(:has([data-generation-results]:not([hidden]))) { display: none; }
  .tior-workspace__main-layout--canonical[data-workspace-form] .tior-workspace__source-field .tior-workspace__file-control,
  .tior-workspace__main-layout--canonical[data-workspace-form] .tior-workspace__preview-stage { border-radius: 16px; corner-shape: squircle; }
}
@media (forced-colors: active) {
  .tior-workspace__remove-image > span,
  :root[data-theme="dark"] .tior-workspace__remove-image > span { background: ButtonFace; color: ButtonText; border: 1px solid ButtonText; }
  .tior-workspace__remove-image:focus-visible { outline-color: Highlight; }
}

/* Product input uses the shared opaque dialog, field and action geometry. */
.tior-workspace__product-editor {
  width: min(680px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  border-radius: 18px;
  corner-shape: squircle;
}
.tior-workspace__product-editor .tior-workspace__dialog-shell { max-height: calc(100dvh - 34px); }
.tior-workspace__product-editor .tior-workspace__dialog-shell > header { align-items: start; padding: 24px; }
.tior-workspace__product-editor .tior-workspace__dialog-shell > header h2 {
  margin: 0 0 8px; color: var(--text); font: 600 22px/28px var(--font-ui); letter-spacing: 0;
}
.tior-workspace__product-editor .tior-workspace__dialog-shell > header p {
  margin: 0; max-width: 420px; color: var(--muted); font: 400 13px/19px var(--font-ui); letter-spacing: 0;
}
.tior-workspace__product-editor [data-close-product-editor] { flex: 0 0 44px; padding: 0; }
.tior-workspace__product-editor [data-close-product-editor] svg { display: block; width: 18px; height: 18px; fill: none; stroke: currentColor; }
.tior-workspace__product-editor .tior-workspace__manual-product-grid { grid-template-columns: 180px minmax(0, 1fr); gap: 24px; padding: 24px; }
.tior-workspace__product-editor .tior-workspace__manual-product-fields { gap: 16px; }
.tior-workspace__product-editor .tior-workspace__field > span {
  color: var(--text); font: 400 13px/18px var(--font-ui); letter-spacing: 0; text-transform: none;
}
.tior-workspace__product-editor .tior-workspace__field input {
  min-width: 0; min-height: 44px; padding: 10px 12px; border-radius: 14px; corner-shape: squircle;
  background: var(--workspace-panel); color: var(--text); font: 400 14px/20px var(--font-ui);
}
.tior-workspace__product-editor .tior-workspace__manual-product-measures { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tior-workspace__product-editor .tior-workspace__manual-product-measures input { text-align: left; }
.tior-workspace__product-image [data-product-image-placeholder] { display: grid; justify-items: center; gap: 4px; }
.tior-workspace__product-image [data-product-image-placeholder][hidden] { display: none; }
.tior-workspace__product-editor .tior-workspace__product-image > span {
  aspect-ratio: 1; min-height: 0; border-radius: 14px; corner-shape: squircle; background: var(--workspace-panel);
}
.tior-workspace__product-editor .tior-workspace__product-image img { padding: 8px; }
.tior-workspace__product-editor .tior-workspace__dialog-shell > footer { padding: 16px 24px; flex-wrap: wrap; gap: 12px; }
.tior-workspace__product-editor [data-product-editor-status] { flex: 1 1 140px; font: 400 12px/18px var(--font-ui); }
.tior-workspace__product-editor [data-product-editor-status]:empty { flex: 1; }
.tior-workspace__product-editor .tior-workspace__dialog-done {
  min-height: 44px; padding: 12px 20px; border: 1px solid var(--action-primary-border); border-radius: 14px; corner-shape: squircle;
  background: var(--action-primary-fill); color: var(--action-primary-foreground); font: 500 13px/18px var(--font-ui); letter-spacing: 0; text-transform: none;
}
.tior-workspace__product-editor [data-delete-product] { min-height: 44px; font: 400 13px/18px var(--font-ui); }
.tior-workspace__product-editor [data-delete-product][hidden] { display: none; }
.tior-workspace__selected-strip[data-tior-product-picker-host] { height: auto; min-height: 214px; gap: 0; }
.tior-workspace__selected-strip[data-tior-product-picker-host] > [data-selected-product-strip] { display: grid; gap: 8px; overflow: visible; }
.tior-workspace__product-source-group { min-width: 0; max-width: 100%; }
.tior-workspace__product-source-group h3 { margin: 0 0 6px; color: var(--muted); font: 400 12px/16px var(--font-ui); letter-spacing: 0; }
.tior-workspace__product-source-group > div { display: flex; justify-content: safe center; gap: 8px; overflow-x: auto; padding: 3px; }
.tior-workspace__product-source-or { color: var(--muted); font: 400 12px/16px var(--font-ui); text-align: center; }
@media (max-width: 600px) {
  .tior-workspace__product-editor { border-radius: 16px; }
  .tior-workspace__product-editor .tior-workspace__dialog-shell > header,
  .tior-workspace__product-editor .tior-workspace__dialog-shell > footer { padding: 16px; }
  .tior-workspace__product-editor .tior-workspace__manual-product-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 16px; }
  .tior-workspace__product-editor .tior-workspace__product-image-wrap { width: 140px; justify-self: center; }
}
