/* Reference adaptation: a light, media-first glass workspace, not a classroom
 * replica. Existing Catalog, Auth and generation components keep their IDs. */
body.studio-page {
  --designer-paper: #f2f0f8;
  --designer-card: rgb(255 255 255 / .68);
  --designer-card-soft: #f9f8fc;
  --designer-ink: #17171b;
  --designer-muted: #64646f;
  --designer-line: rgb(255 255 255 / .8);
  --designer-accent: #b74545;
  --designer-accent-soft: #f4dcd8;
  --studio-ink: #17171b;
  --studio-muted: #64646f;
  --studio-accent: #b74545;
  background: #f2f0f8;
  color: var(--designer-ink);
}
.studio-auth-dialog { width: min(480px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); padding: 40px 28px 16px; border: 0; border-radius: 24px; background: #fff; color: #17171b; box-shadow: 0 24px 80px rgb(23 23 27 / .2); overflow-y: auto; }
.studio-auth-dialog::backdrop { background: rgb(23 23 27 / .48); }
.studio-auth-dialog h2 { margin: 0 20px 16px; font-size: 24px; font-weight: 500; text-align: center; letter-spacing: -.03em; }
.studio-auth-dialog > p { margin: 0 0 22px; color: #64646f; font-size: 13px; line-height: 1.6; text-align: center; }
.studio-auth-close { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; font-size: 26px; color: #17171b; }
.studio-auth-close:hover { background: #f2f2f4; }
.studio-auth-dialog iframe { display: block; width: 100%; height: 560px; border: 0; }
.workspace-icon { width: 22px; height: 22px; flex: 0 0 auto; stroke-width: 1.7; }
.studio-experience {
  padding: 0 22px 22px 104px;
  background: linear-gradient(125deg, #ece9f8 0%, #f1eef4 45%, #f3eee5 100%);
  min-height: 100dvh;
}
.studio-experience::after { display: none; }
.studio-skip { position: fixed; left: 110px; top: -100px; z-index: 100; padding: 12px; color: #fff; background: #17171b; }
.studio-skip:focus { top: 12px; }
.workspace-sidebar {
  position: fixed; inset: 0 auto 0 0; width: 90px; z-index: 45;
  display: flex; flex-direction: column; align-items: center; padding: 116px 12px 22px; gap: 36px;
}
.workspace-sidebar__tools {
  margin-top: clamp(30px, 7dvh, 90px); display: grid; gap: 5px; padding: 5px;
  border-radius: 23px; background: rgb(255 255 255 / .65); box-shadow: inset 0 0 5px #fff;
}
.workspace-sidebar__tools button, .workspace-sidebar__home {
  display: grid; place-items: center; width: 54px; height: 54px; border: 0; border-radius: 17px;
  background: transparent; color: #17171b; transition: background 180ms, color 180ms, transform 180ms;
}
.workspace-sidebar__tools button:hover, .workspace-sidebar__tools button.is-active {
  background: #17171b; color: #fff; box-shadow: inset 0 0 10px rgb(255 255 255 / .28);
}
.workspace-sidebar__home { margin-top: auto; background: rgb(255 255 255 / .7); }
.workspace-sidebar__home:hover { background: #17171b; color: white; }
[data-workspace-tooltip] { position: relative; }
[data-workspace-tooltip]::after {
  content: attr(aria-label); position: absolute; z-index: 1; left: calc(100% + 12px); top: 50%;
  transform: translateY(-50%); padding: 10px 14px; border-radius: 10px;
  background: #17171b; color: #fff; font: 500 12px/1.4 'Be Vietnam Pro', sans-serif;
  white-space: nowrap; box-shadow: 0 4px 16px rgb(23 23 27 / .12);
  opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 120ms;
}
[data-workspace-tooltip]:focus-visible::after { opacity: 1; visibility: visible; }
@media (hover: hover) {
  [data-workspace-tooltip]:hover::after { opacity: 1; visibility: visible; }
}
@media (prefers-reduced-motion: reduce) {
  [data-workspace-tooltip]::after { transition: none; }
}
.studio-masthead {
  position: relative; top: auto; z-index: 40; display: flex; justify-content: space-between;
  height: 84px; min-height: 84px; padding: 12px 0; gap: 16px;
  border: 0; background: none; box-shadow: none; backdrop-filter: none;
}
/* Keep the former wordmark's layout slot without rendering another logo. */
.studio-masthead::before { content: ''; flex: 0 0 124px; }
.workspace-logo { position: fixed; top: 18px; left: 12px; z-index: 46; display: block; width: 66px; height: 66px; border-radius: 12px; }
.workspace-logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.workspace-logo:focus-visible { outline: 2px solid var(--designer-accent); outline-offset: 4px; }
.workspace-topnav, .workspace-utilities {
  display: flex; align-items: center; gap: 4px; padding: 5px;
  border-radius: 22px; background: rgb(255 255 255 / .64); box-shadow: inset 0 0 6px #fff;
}
.workspace-topnav > * {
  height: 46px; min-width: 100px; display: grid; place-items: center; padding: 0 16px;
  color: #17171b; font-size: 13px; font-weight: 500; border: 0; border-radius: 17px;
  background: transparent; text-decoration: none; white-space: nowrap;
}
.workspace-topnav > [aria-current], .workspace-topnav > :hover { background: #17171b; color: white; box-shadow: inset 0 0 10px rgb(255 255 255 / .28); }
.workspace-utilities > button { display: grid; place-items: center; width: 44px; height: 46px; border: 0; border-radius: 16px; background: none; }
.workspace-utilities > button:hover { background: #e9e5ee; }
.workspace-profile { display: flex; align-items: center; gap: 8px; padding-right: 10px; text-decoration: none; color: #17171b; }
.workspace-profile > span { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 15px; background: #17171b; color: white; font-size: 16px; }
.workspace-profile small { font-size: 11px; max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-profile--guest { min-height: 46px; padding: 0 16px; border-radius: 15px; background: #17171b; color: #fff; transition: background 180ms; }
.workspace-profile--guest strong { font-size: 12px; font-weight: 500; white-space: nowrap; }
.workspace-profile--guest:hover { background: #34343b; }
.workspace-profile:focus-visible { outline: 2px solid var(--designer-accent); outline-offset: 3px; }
.workspace-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 8px 0 22px; }
.studio-intro { padding: 0; min-height: 0; overflow: visible; background: none; border: 0; border-radius: 0; box-shadow: none; }
.studio-intro::before, .studio-intro::after { display: none; }
.studio-intro > div:first-child { max-width: none; }
.studio-intro .studio-kicker { display: none; }
.studio-intro h1 { margin: 0; max-width: none; color: #17171b; font-family: 'Be Vietnam Pro', sans-serif; font-size: clamp(24px, 2.7vw, 40px); font-weight: 500; line-height: 1.22; letter-spacing: -.055em; }
.studio-intro h1 em { font-family: inherit; font-style: normal; }
.studio-intro__note { margin: 8px 0 0; max-width: 60ch; font-size: 12px; line-height: 1.5; color: #64646f; }
.studio-intro.is-muted { opacity: 1; filter: none; }
.studio-quick-start { position: relative; display: flex; flex: 0 0 auto; padding: 0; gap: 8px; border: 0; background: none; box-shadow: none; overflow: visible; }
.studio-start-card { display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 7px; border: 1px solid rgb(255 255 255 / .8); border-radius: 18px; background: rgb(255 255 255 / .58); box-shadow: inset 0 0 5px #fff; cursor: pointer; }
.studio-start-card__icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; border: 0; background: #fff; color: #17171b; }
.studio-start-card strong { font-size: 12px; font-weight: 600; }
.studio-start-card small { font-size: 10px; color: #64646f; }
.studio-quick-start__options { position: absolute; top: calc(100% + 8px); right: 0; z-index: 50; width: 260px; padding: 12px; background: #fff; border: 1px solid #e6e3ec; border-radius: 18px; box-shadow: 0 12px 32px rgb(68 58 84 / .12); }
.studio-stage { min-height: 0; padding: 0; overflow: visible; }
.studio-workbench {
  display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(330px, 1fr);
  grid-template-rows: auto minmax(0, 1fr); grid-template-areas: 'preview panelhead' 'preview panel';
  height: max(510px, calc(100dvh - 208px)); max-width: 1720px; margin: auto; gap: 0 16px;
}
.studio-preview {
  grid-area: preview; position: relative; display: grid; min-width: 0; min-height: 0;
  grid-template-columns: 112px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto auto;
  grid-template-areas: 'variants canvas' 'status status' 'advanced advanced'; gap: 10px;
  padding: 7px; background: rgb(255 255 255 / .65); border: 1px solid rgb(255 255 255 / .85);
  border-radius: 22px; box-shadow: inset 0 0 5px rgb(221 221 229 / .5);
}
.studio-plane { grid-area: canvas; position: relative; inset: auto; width: auto; min-width: 0; min-height: 0; padding: 0; }
.studio-frame { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; aspect-ratio: auto; border: 0; border-radius: 18px; background: #e3e0e7; box-shadow: none; }
.studio-frame::before, .studio-frame::after, .studio-frame__veil { display: none; }
.studio-frame .studio-media, .studio-frame:not(.has-look) .studio-media { width: 100%; height: 100%; object-fit: cover; border-radius: 0; opacity: 1; filter: none; }
.studio-frame.has-ai-preview .studio-media { opacity: 0; }
.studio-idle-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.studio-frame.has-idle-poster .studio-media { opacity: 0; }
.studio-frame.has-idle-poster.is-video-ready:not(.has-ai-preview) .studio-media { opacity: 1; }
.studio-frame.has-idle-poster .studio-media-placeholder { display: none; }
.studio-preview-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #efedf3; border-radius: 0; }
.studio-media-placeholder { background: #e8e5ef; }
.studio-media-placeholder__orb, .studio-media-placeholder__line { display: none; }
.studio-preview__empty {
  position: absolute; inset: auto 0 0; display: flex; align-items: start; flex-direction: column;
  padding: 36px 22px 20px; gap: 8px; background: linear-gradient(transparent, rgb(10 10 14 / .76));
  color: white; text-align: left; pointer-events: none;
}
.studio-preview__empty::before { display: none; }
.studio-preview__empty > span { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; color: white; }
.studio-preview__empty > span .workspace-icon { width: 14px; height: 14px; }
.studio-preview__empty strong { color: white; font-size: clamp(16px, 1.65vw, 24px); line-height: 1.3; font-weight: 500; }
.studio-preview__empty small { max-width: 36ch; color: rgb(255 255 255 / .9); font-size: 11px; line-height: 1.55; }
.studio-preview__empty.is-ready { opacity: 0; visibility: hidden; }
.workspace-start { display: inline-flex; align-items: center; gap: 5px; padding: 9px 12px; margin-top: 2px; border: 1px solid #fff; border-radius: 11px; color: #17171b; background: #fff; font-size: 11px; font-weight: 500; pointer-events: auto; }
.workspace-start .workspace-icon { width: 15px; height: 15px; }
.workspace-start:hover { background: #eeeaf3; }
.workspace-preview-label { position: absolute; top: 12px; left: 12px; z-index: 6; padding: 7px 9px; border-radius: 9px; background: rgb(15 15 19 / .6); color: #fff; font-size: 9px; backdrop-filter: blur(10px); }
.workspace-preview-label .workspace-label-ai { display: none; }
.workspace-preview-label .workspace-label-catalog { display: none; }
.has-ai-preview .workspace-preview-label .workspace-label-reference { display: none; }
.has-ai-preview .workspace-preview-label .workspace-label-ai { display: inline; }
.has-ai-preview.has-catalog-preview .workspace-preview-label .workspace-label-ai { display: none; }
.has-ai-preview.has-catalog-preview .workspace-preview-label .workspace-label-catalog { display: inline; }
.studio-preview-progress { z-index: 8; inset: auto 14px 14px; padding: 10px 12px; border-radius: 12px; background: rgb(255 255 255 / .95); color: #17171b; font-size: 12px; }
.studio-generation-loading {
  position: absolute; inset: 0; z-index: 8; overflow: hidden;
  background: #efedf3; border-radius: inherit;
}
.studio-generation-loading video { display: block; width: 100%; height: 100%; object-fit: contain; }
.studio-generation-loading button {
  position: absolute; right: 14px; bottom: 14px; min-height: 36px;
  padding: 8px 12px; border: 1px solid rgb(255 255 255 / .4); border-radius: 10px;
  background: rgb(23 23 27 / .65); color: #fff; font: inherit; font-size: 12px; cursor: pointer;
}
.studio-generation-loading button:hover { background: rgb(23 23 27 / .85); }
.studio-generation-loading button:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
.studio-loading-fallback {
  position: absolute; inset: auto 0 20px; text-align: center; color: #17171b; font-size: 14px;
}
.studio-experience:is([data-generation-state='queued'], [data-generation-state='processing']) #previewEmpty,
.studio-experience:is([data-generation-state='queued'], [data-generation-state='processing']) #studioCompare,
.studio-experience:is([data-generation-state='queued'], [data-generation-state='processing']) #studioHotspots { display: none; }
.studio-variants { grid-area: variants; display: flex; flex-direction: column; min-height: 0; padding: 0; gap: 7px; border: 0; background: none; box-shadow: none; }
.studio-variants__title { padding: 4px 2px 2px; }
.studio-variants__title > span { color: #64646f; font-size: 10px; font-weight: 500; text-transform: none; letter-spacing: 0; }
.studio-variants__title > strong { display: none; }
.studio-variants__strip { display: grid; grid-template-columns: 1fr; grid-auto-rows: minmax(70px, 1fr); flex: 1; min-height: 0; gap: 8px; padding: 0; overflow-y: auto; }
.studio-variants__strip button { position: relative; display: flex; flex-direction: column; justify-content: end; align-items: start; min-width: 0; min-height: 70px; margin: 0; padding: 9px; border: 1px solid transparent; border-radius: 15px; background: #e4e1eb; overflow: hidden; color: #17171b; text-align: left; }
.studio-variants__strip button > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.studio-variants__strip button > span { display: none; }
.studio-variants__strip button > strong { position: relative; z-index: 1; padding: 5px 6px; max-width: 100%; border-radius: 8px; background: rgb(10 10 14 / .62); color: white; font-size: 9px; line-height: 1.35; font-weight: 500; backdrop-filter: blur(10px); }
.studio-variants__strip button > small { display: none; }
.studio-variants__strip button.is-active { border-color: #17171b; box-shadow: inset 0 0 0 1px #fff; }
.studio-variants__actions { display: flex; flex-wrap: wrap; padding: 0; margin: 0; gap: 4px; }
.studio-variants__actions button { display: grid; place-items: center; min-width: 0; min-height: 36px; padding: 8px 12px; border-radius: 12px; border: 1px solid #d8d4de; font-size: 10px; line-height: 1.2; white-space: nowrap; background: #fff; color: #17171b; }
.studio-variants__actions button:disabled { opacity: .48; cursor: not-allowed; }
.studio-variants__actions #addVariant { background: #17171b; border-color: #17171b; color: #fff; display: flex; justify-content: center; gap: 5px; }
#addVariant .workspace-icon { width: 13px; height: 13px; }
.studio-auto-create { grid-area: status; display: block; padding: 10px 14px; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.studio-auto-create .studio-variants__actions { margin-top: 10px; border: 0; justify-content: flex-start; }
.studio-rail__status { font-size: 11px; color: #17171b; }
.studio-rail__status > i { background: #4f7164; width: 5px; height: 5px; }
.studio-rail__copy p { font-size: 12px; line-height: 1.7; color: #17171b; margin: 6px 0 0; }
.studio-auto-create__hint { display: none; }
.studio-advanced { grid-area: advanced; margin: 0; border-top: 1px solid #ddd9e5; border-radius: 0; background: none; padding: 0 14px; }
.studio-advanced > summary { padding: 10px 0; font-size: 10px; }
.studio-advanced > summary small { font-size: 10px; }
.studio-advanced[open] { position: absolute; z-index: 20; inset: auto 8px 8px; padding: 8px 18px; max-height: 80%; overflow-y: auto; border: 1px solid #ddd9e5; border-radius: 18px; background: #fff; }
.workspace-panel-header { grid-area: panelhead; display: grid; gap: 14px; padding: 22px 20px 14px; border: 1px solid rgb(255 255 255 / .8); border-bottom: 0; border-radius: 22px 22px 0 0; background: rgb(255 255 255 / .65); }
.workspace-panel-header h2 { font-size: 21px; font-weight: 500; letter-spacing: -.055em; margin: 0; line-height: 1.3; }
.workspace-panel-header p { font-size: 11px; color: #64646f; margin: 7px 0 0; line-height: 1.5; }
.workspace-panel-tabs { display: flex; gap: 5px; }
.workspace-panel-tabs button { flex: 1; min-height: 36px; padding: 7px; border-radius: 12px; border: 1px solid #ded9e1; background: rgb(255 255 255 / .6); color: #17171b; font-size: 11px; }
.workspace-panel-tabs button.is-active { background: #17171b; border-color: #17171b; color: white; box-shadow: inset 0 0 8px rgb(255 255 255 / .3); }
.studio-toolbox, .studio-insights {
  grid-area: panel; position: relative; top: auto; display: block; width: auto; min-width: 0; min-height: 0;
  height: 100%; max-height: none; padding: 8px 13px 18px; overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: #c8c0ca transparent;
  border: 1px solid rgb(255 255 255 / .8); border-top: 0; border-radius: 0 0 22px 22px;
  background: linear-gradient(180deg, rgb(255 235 230 / .52), rgb(255 225 220 / .58));
}
.studio-collection-heading { display: none; }
.studio-progress { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 12px; border: 0; border-radius: 13px; padding: 12px; background: rgb(255 255 255 / .72); box-shadow: none; }
.studio-progress__step span { color: #64646f; }
.studio-progress__step strong { font-size: 10px; }
.studio-progress__step.is-current strong { color: #a53737; }
.studio-progress p { color: #64646f; font-size: 10px; }
.studio-catalog-card { padding: 15px 12px; margin-bottom: 10px; border: 0; border-radius: 16px; background: rgb(255 255 255 / .82); box-shadow: none; }
.studio-catalog-card__head { gap: 10px; margin-bottom: 13px; }
.studio-catalog-card__head h2 { gap: 0; font-family: inherit; font-size: 13px; letter-spacing: -.025em; font-weight: 600; line-height: 1.4; }
.studio-catalog-card__head h2 > span { display: none; }
.studio-catalog-card__head > button { font-size: 10px; line-height: 1.4; white-space: nowrap; color: #64646f; }
.studio-catalog-grid--event { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 7px; }
.studio-catalog-grid--event .studio-catalog-item { display: flex; align-items: center; min-height: 43px; border: 1px solid #e1dce2; border-radius: 12px; padding: 10px; background: #f9f6f7; }
.studio-catalog-grid--event .studio-catalog-item__visual { display: none; }
.studio-catalog-grid--event .studio-catalog-item__name { padding: 0; font-size: 11px; font-weight: 500; }
.studio-catalog-grid--event .studio-catalog-item.is-selected { background: #17171b; border-color: #17171b; color: #fff; }
.studio-catalog-grid--event .is-selected .studio-catalog-item__name { color: #fff; }
.studio-catalog-grid--garment { grid-auto-columns: 102px; }
.studio-catalog-item { border-radius: 13px; }
.studio-catalog-item__visual { border-radius: 12px; }
.studio-catalog-item__name { font-size: 10px; color: #17171b; line-height: 1.4; }
.studio-catalog-item.is-selected { border-color: #17171b; }
.studio-catalog-grid--style .studio-catalog-item__visual { display: none; }
.studio-catalog-grid--style { grid-template-columns: repeat(2,minmax(0,1fr)); grid-auto-flow: row; gap: 6px; }
.studio-catalog-grid--style .studio-catalog-item { padding: 8px; border: 1px solid #e1dce2; background: #f9f6f7; }
.studio-catalog-grid--style .studio-catalog-item.is-selected { border-color: #17171b; }
.studio-customize { border: 0; background: rgb(255 255 255 / .74); border-radius: 14px; }
.studio-customize > summary { padding: 14px 12px; }
.studio-customize > summary strong { font-size: 12px; }
.studio-customize > summary small { font-size: 10px; color: #64646f; }
.studio-insight { padding: 18px; border: 0; border-radius: 16px; margin: 0 0 12px; background: rgb(255 255 255 / .86); box-shadow: none; }
.studio-insight h2 { font: 500 23px/1.3 'Be Vietnam Pro', sans-serif; letter-spacing: -.04em; }
.studio-insight__head { color: #64646f; font-size: 11px; }
.studio-insight dd, .studio-insight p, .studio-check li { font-size: 12px; line-height: 1.8; }
.studio-insight dt { color: #64646f; font-size: 10px; }
.studio-passport__visual.has-image { background-size: cover; background-position: center 25%; }
.studio-passport__visual.has-image::before, .studio-passport__visual.has-image > span { display: none; }
.studio-dock { top: 200px; left: auto; right: 22px; width: min(480px, calc((100vw - 120px) / 2.8)); max-height: calc(100dvh - 220px); border-radius: 18px; background: #fff; box-shadow: 0 12px 32px rgb(68 58 84 / .18); }
.studio-dock h2 { font-family: inherit; font-size: 24px; }
.studio-dock__content { overflow-y: auto; }
.studio-dock__header { padding: 16px; }
.studio-dock__description { font-size: 12px; padding-inline: 16px; }
.studio-option__name { font-size: 12px; }
.studio-option__meta { font-size: 11px; }
.studio-dock .icon-button { color: #17171b; border-color: #d8d4de; }
.studio-result { margin: 18px 0 0; background: rgb(255 255 255 / .74); }
.studio-result__header h2 { font-size: 22px; }
.workspace-compare { position: relative; z-index: 7; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; padding: 10px; border-radius: 18px; background: #fff; }
.studio-experience .studio-plane:has(.workspace-compare:not([hidden])) { width: 100%; aspect-ratio: auto; align-self: start; }
.workspace-compare figure { display: grid; grid-template-rows: auto auto; align-content: start; margin: 0; min-width: 0; background: #efedf3; border-radius: 12px; overflow: hidden; }
.workspace-compare-toolbar { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.workspace-compare-toolbar button { min-height: 36px; padding: 6px 12px; background: #f3f1f6; border: 1px solid #d8d4de; border-radius: 10px; color: #17171b; cursor: pointer; font: inherit; font-size: 13px; }
.workspace-compare-picker { display: grid; gap: 4px; padding: 8px 10px; background: #fff; min-width: 0; font-size: 12px; color: #57535f; }
.workspace-compare-picker select { min-width: 0; width: 100%; min-height: 40px; border: 1px solid #d8d4de; border-radius: 8px; padding: 6px; font: inherit; font-size: 14px; background: #f9f8fc; color: #17171b; }
.workspace-compare-picker select:focus-visible, .workspace-compare-toolbar button:focus-visible { outline: 2px solid #a53737; outline-offset: 2px; }
.workspace-compare img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain; }
.workspace-compare figcaption { display: none; }
.studio-preview:has(.workspace-compare:not([hidden])) #historyCompare { display: none; }
.workspace-compare.is-expanded { position: fixed; inset: 16px; z-index: 100; overflow: auto; align-content: start; box-shadow: 0 0 0 100vmax rgb(25 22 34 / .65); }
.workspace-compare.is-expanded img { max-height: calc(100dvh - 180px); }
@media (max-width: 767px) {
  .workspace-compare { grid-template-columns: minmax(0,1fr); }
  .workspace-compare.is-expanded { inset: 8px; }
}
.studio-preview.is-highlighted { outline: 2px solid #b74545; outline-offset: 3px; }
button:active, .workspace-profile:active { transform: scale(.98); }
body.studio-page :focus-visible { outline: 2px solid #a53737; outline-offset: 3px; }
@media (min-width: 1700px) { .studio-preview { grid-template-columns: 160px minmax(0,1fr); } }
@media (max-width: 1200px) {
  .workspace-profile small { display: none; }
  .workspace-heading { align-items: start; }
  .studio-start-card { padding-right: 8px; }
  .studio-start-card small { display: none; }
  .studio-start-card__icon { width: 34px; height: 34px; }
  .studio-workbench { grid-template-columns: minmax(0,1.7fr) minmax(304px,1fr); }
  .studio-preview { grid-template-columns: 94px minmax(0,1fr); }
  .workspace-panel-header { padding: 18px 16px 12px; }
  .workspace-panel-header h2 { font-size: 19px; }
}
@media (max-width: 1023px) {
  .studio-experience { padding-left: 80px; padding-right: 16px; }
  .workspace-sidebar { width: 70px; padding-inline: 8px; }
  .workspace-logo { left: 6px; width: 58px; height: 58px; }
  .workspace-sidebar__tools button { width: 46px; height: 46px; }
  .workspace-topnav > * { min-width: 76px; padding-inline: 10px; font-size: 12px; }
  .workspace-heading { flex-wrap: wrap; gap: 14px; }
  .studio-intro h1 { font-size: 27px; }
  .studio-workbench { height: auto; grid-template-columns: minmax(0,1fr); grid-template-rows: auto auto auto; grid-template-areas: 'preview' 'panelhead' 'panel'; gap: 16px; }
  .studio-preview { height: 580px; }
  .workspace-panel-header { border-radius: 20px 20px 0 0; }
  .studio-toolbox, .studio-insights { max-height: none; height: auto; margin-top: -16px; overflow: visible; }
  .studio-catalog-grid--garment { grid-auto-columns: 130px; }
  .studio-dock { top: auto; bottom: 16px; right: 16px; left: auto; width: min(480px,calc(100vw - 100px)); max-height: 70dvh; }
}
@media (max-width: 767px) {
  .studio-masthead::before { display: none; }
  .studio-experience { padding: 0 12px 20px; }
  .workspace-sidebar { position: static; display: none; }
  .studio-masthead { height: 72px; min-height: 72px; gap: 8px; }
  .workspace-logo { position: static; flex: 0 0 52px; width: 52px; height: 52px; }
  .workspace-topnav { padding: 3px; gap: 0; border-radius: 16px; }
  .workspace-topnav > * { min-width: 0; height: 38px; font-size: 10px; padding: 0 8px; border-radius: 13px; }
  .workspace-utilities { padding: 3px; border-radius: 15px; }
  .workspace-utilities > button { display: none; }
  .workspace-profile { padding-right: 0; }
  .workspace-profile--guest { min-height: 38px; padding: 0 10px; border-radius: 12px; }
  .workspace-profile > span { width: 38px; height: 38px; border-radius: 12px; }
  .workspace-heading { padding: 8px 2px 18px; gap: 16px; }
  .studio-intro h1 { font-size: 26px; }
  .studio-intro__note { font-size: 11px; }
  .studio-quick-start { width: 100%; }
  .studio-start-card { flex: 1; justify-content: start; }
  .studio-start-card small { display: block; font-size: 9px; }
  .studio-preview { height: auto; display: flex; flex-direction: column; gap: 8px; }
  .studio-plane { width: 100%; aspect-ratio: 4 / 3; order: 0; }
  .studio-variants { order: 1; }
  .studio-variants__title { padding-inline: 6px; }
  .studio-variants__strip { grid-template-columns: repeat(4,minmax(0,1fr)); grid-auto-rows: 92px; flex: none; }
  .studio-variants__strip button { padding: 5px; }
  .studio-variants__strip button > strong { font-size: 8px; padding: 4px; }
  .studio-variants__actions { padding: 2px 6px; }
  .studio-variants__actions #addVariant { width: auto; padding-inline: 12px; }
  .studio-auto-create { order: 2; padding: 8px 10px; }
  .studio-advanced { order: 3; }
  .studio-advanced > summary small { display: none; }
  .studio-preview__empty { padding: 30px 16px 16px; }
  .studio-preview__empty strong { font-size: 18px; }
  .studio-dock { right: 12px; bottom: 12px; width: calc(100vw - 24px); }
  .studio-result__copy { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .studio-experience *, .studio-experience *::before, .studio-experience *::after { animation: none !important; transition-duration: 1ms !important; scroll-behavior: auto !important; } }
@media (prefers-reduced-transparency: reduce) { .workspace-topnav, .workspace-utilities, .studio-preview, .workspace-panel-header, .studio-toolbox, .studio-insights, .studio-start-card { background: #f9f8fc; backdrop-filter: none; } }

/* Beginner flow: one question at a time, with edits always within reach. */
.studio-experience [hidden] { display: none !important; }
.studio-rail__status:has(#studioStatus[hidden]) { display: none; }
.studio-experience:not(.has-preview-variants) .studio-preview {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: 'canvas' 'status' 'advanced';
}
/* Output follows the image, not the height of the adjacent editing panel. */
.studio-experience.has-generated-output .studio-preview {
  height: auto;
  align-self: start;
  grid-template-rows: auto auto auto;
}
.studio-experience.has-generated-output .studio-workbench { height: auto; min-height: max(510px, calc(100dvh - 208px)); }
.studio-experience.has-generated-output .studio-plane {
  width: min(100%, calc(70dvh * var(--studio-preview-ratio, 1.7777778)));
  aspect-ratio: var(--studio-preview-ratio, 1.7777778);
  justify-self: center;
  align-self: start;
  margin-inline: auto;
  border: 0;
}
.studio-experience.has-generated-output .studio-frame {
  min-height: 0;
}
.studio-experience.has-history .studio-preview {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto auto auto;
  grid-template-areas: 'canvas' 'variants' 'status' 'advanced';
  align-items: start;
}
.studio-experience.has-history.has-generated-output .studio-preview { grid-template-rows: auto auto auto auto; }
/* The idle frame has absolutely positioned media, so it cannot supply its
   own grid-row height. Keep it stretched when the history rail is present. */
.studio-experience.has-history:not(.has-generated-output) .studio-plane {
  align-self: stretch;
}
.studio-history { grid-area: variants; min-width: 0; width: 100%; align-self: start; display: flex; flex-direction: column; gap: 8px; padding: 6px; }
.studio-history header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.studio-history header strong { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.studio-history button { cursor: pointer; color: inherit; }
.studio-history header button, #historyRetry, #historyMore, #historyCompare, #historyConfirm button { border: 1px solid #d8d4de; border-radius: 10px; background: rgb(255 255 255 / .8); padding: 9px 5px; font-size: 12px; min-height: 40px; }
.studio-history p { font-size: 11px; line-height: 1.5; margin: 0 0 8px; overflow-wrap: anywhere; }
.studio-history p:empty { display: none; }
.studio-history-strip { display: flex; gap: 10px; overflow-x: auto; overflow-y: hidden; padding: 4px 4px 8px; scrollbar-width: none; overscroll-behavior-inline: contain; }
.studio-history-strip::-webkit-scrollbar { display: none; width: 0; height: 0; }
.studio-history-item { position: relative; flex: 0 0 150px; text-align: left; padding: 0; border: 0; background: transparent; border-radius: 9px; min-width: 0; transition: opacity 180ms; }
.studio-history-item img { display: block; width: 100%; height: 84px; object-fit: contain; border-radius: 9px; background: #ebe8ef; transition: opacity 180ms, outline-color 180ms; }
.studio-history-item::after { display: none; }
.studio-history-item strong { display: block; padding: 5px 2px 1px; color: #77717f; background: transparent; font-size: 11px; font-weight: 500; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#historyRecent { display: none; }
#historyCompare { align-self: flex-end; padding-inline: 14px; border-color: transparent; background: #eeebf2; font-size: 12px; font-weight: 500; }
#historyCompare:hover { background: #e4dfeb; }
.studio-history-item .history-save-state { position: absolute; z-index: 1; top: 7px; right: 7px; width: 18px; height: 18px; font-size: 0; background: rgb(255 255 255 / .9); border-radius: 50%; color: #64646f; }
.studio-history-item .history-save-state:not(.is-saved) { display: none; }
.history-save-state::before { content: '·'; display: grid; place-items: center; font-size: 16px; line-height: 18px; }
.history-save-state.is-saved::before { content: '✓'; font-size: 11px; color: #376657; }
.studio-history-item:hover img { opacity: .85; }
.studio-history-item.is-active { box-shadow: none; }
.studio-history-item.is-active img { outline: 1.5px solid #39333f; outline-offset: 2px; }
.studio-history-item.is-active strong { color: #17171b; font-weight: 600; }
.studio-history button:focus-visible { outline: 2px solid #a53737; outline-offset: 3px; }
#historyConfirm { padding: 10px; border-radius: 12px; background: #fff; }
.studio-experience.has-generated-output #selectionSummary { display: none; }
.studio-experience.has-generated-output .studio-variants__actions { gap: 7px; }
.studio-experience.has-generated-output .studio-variants__actions button,
.studio-experience.has-generated-output .studio-variants__actions a { min-height: 42px; font-size: 12px; padding-inline: 14px; }
@media (min-width: 1024px) {
  .studio-experience.has-history .studio-workbench { grid-template-columns: minmax(0, 1fr) clamp(304px, 28vw, 360px); }
  /* Reserve a rail beside the image without letting its item count size the grid. */
  .studio-experience.has-history .studio-preview {
    --history-rail-width: clamp(108px, 10vw, 140px);
    grid-template-columns: var(--history-rail-width) minmax(0, 1fr);
    grid-template-areas: '. canvas' '. status' '. advanced';
    grid-template-rows: minmax(0, 1fr) auto auto;
    column-gap: 12px;
  }
  .studio-experience.has-history.has-generated-output .studio-preview { grid-template-rows: auto auto auto; }
  .studio-history {
    grid-area: auto; position: absolute; inset: 7px auto 7px 7px;
    width: var(--history-rail-width); height: calc(100% - 14px); min-height: 0; padding: 3px;
  }
  .studio-history-strip {
    flex: 1 1 auto; min-height: 0; flex-direction: column;
    overflow-x: hidden; overflow-y: auto; padding: 5px 4px; gap: 12px; overscroll-behavior: contain;
    scroll-snap-type: y proximity;
  }
  .studio-history-item { flex: 0 0 auto; width: 100%; scroll-snap-align: start; }
  .studio-history-item img { height: auto; aspect-ratio: 16 / 9; }
  .studio-history header { order: 2; flex: 0 0 auto; }
  #historyCompare { width: 100%; }
}
@media (max-width: 1023px) {
  .studio-history { padding: 0 4px 4px; gap: 6px; }
  .studio-history header strong { position: static; width: auto; height: auto; clip-path: none; font-size: 13px; }
  .studio-history-strip { padding-block: 4px 8px; }
  #historyCompare { margin: 0; }
}
@media (max-width: 767px) {
  .studio-experience.has-history .studio-preview { display: flex; flex-direction: column; }
  .studio-history { width: 100%; order: 1; }
  .studio-history header { order: -1; display: flex; align-items: center; justify-content: space-between; }
  .studio-history header strong { position: static; width: auto; height: auto; clip-path: none; font-size: 13px; }
  .studio-history-strip { display: flex; max-height: none; overflow-x: auto; padding-block: 4px 8px; }
  .studio-history-item { flex: 0 0 140px; }
  #historyCompare { align-self: start; padding-inline: 14px; }
}
.studio-library { width: min(960px, calc(100vw - 32px)); max-height: 85dvh; padding: 24px; border: 1px solid #e6e3ec; border-radius: 22px; background: #f9f8fc; color: #17171b; }
.studio-library::backdrop { background: rgb(25 22 34 / .45); }
.studio-library header { display: flex; justify-content: space-between; gap: 16px; align-items: start; }
.studio-library h2 { margin: 0; font-size: 24px; }
.studio-library p { font-size: 13px; line-height: 1.6; }
.studio-library button { min-height: 44px; padding: 8px 14px; border: 1px solid #d8d4de; border-radius: 12px; background: white; cursor: pointer; }
.studio-library button:focus-visible { outline: 2px solid #a53737; outline-offset: 3px; }
.studio-library button:disabled { opacity: .5; cursor: wait; }
.studio-library-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 18px; }
.studio-library-grid article { padding: 12px; border-radius: 16px; background: white; }
.studio-library-grid img { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #efedf3; border-radius: 10px; }
.studio-library-grid h3 { overflow-wrap: anywhere; font-size: 16px; }
.studio-library-grid article > div { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.studio-library-grid input { width: 100%; min-height: 44px; border: 1px solid #d8d4de; border-radius: 10px; padding: 8px; }
.studio-library [hidden] { display: none !important; }
.library-privacy { margin-top: 24px; color: #64646f; }
.library-draft { margin: 16px 0 24px; padding: 16px; border: 1px solid #e6e3ec; border-radius: 14px; }
.library-draft h3 { margin: 0; font-size: 16px; }
.library-draft button { margin: 4px 4px 0 0; }
#studioDraftStatus { display: block; margin-top: 8px; font-size: 12px; color: #64646f; }
.workspace-panel-header p, .guide-card-note { font-size: 13px; line-height: 1.65; }
.guide-card-note { color: #64646f; margin: -3px 0 18px; }
.studio-catalog-card__head h2 { font-size: 16px; letter-spacing: -.025em; }
.studio-progress__step { min-height: 44px; }
.studio-progress__step strong { font-size: 12px; }
.studio-progress__step:disabled { opacity: .55; cursor: default; }
.studio-progress p { font-size: 12px; line-height: 1.6; }
.studio-catalog-grid--event .studio-catalog-item { min-height: 58px; padding: 14px; }
.studio-catalog-grid--event .studio-catalog-item__name { font-size: 14px; }
.studio-catalog-grid--garment { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; overflow: visible; }
.studio-catalog-grid--garment .studio-catalog-item { width: 100%; min-width: 0; padding: 5px; }
.studio-catalog-item__name { font-size: 12px; line-height: 1.5; }
.studio-catalog-grid--style .studio-catalog-item { min-height: 52px; padding: 12px; }
.studio-variant-card__copy strong { font-size: 13px; }
.workspace-panel-tabs button, .studio-start-card, .workspace-start { min-height: 44px; font-size: 12px; }
.studio-start-card strong { font-size: 13px; }
.studio-start-card small { font-size: 11px; }
.studio-intro__note { font-size: 13px; line-height: 1.6; }
.studio-quick-start { align-items: center; }
.workspace-remove-upload { padding: 10px; min-height: 44px; background: transparent; border: 0; color: #a53737; font-size: 12px; }
.workspace-topnav button:disabled, .workspace-sidebar__tools button:disabled { opacity: .45; cursor: default; box-shadow: none; }
.workspace-sidebar__tools button:disabled:hover { background: transparent; color: inherit; }
.guide-review { padding: 18px 14px; border-radius: 16px; background: rgb(255 255 255 / .82); }
.guide-eyebrow { font-size: 12px; color: #64646f; }
.guide-review h3 { margin: 8px 0; font-size: 20px; font-weight: 500; letter-spacing: -.04em; }
.guide-review p { font-size: 13px; line-height: 1.65; color: #64646f; }
.guide-review > button {
  display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 16px;
  min-height: 64px; padding: 12px 0; background: transparent; border: 0;
  border-bottom: 1px solid #e7e0e3; text-align: left; color: #17171b;
}
.guide-review > button > span:first-child { display: grid; gap: 5px; min-width: 0; }
.guide-review small { font-size: 11px; color: #64646f; }
.guide-review strong { font-size: 14px; font-weight: 500; line-height: 1.5; }
.guide-review > button > span:last-child { flex-shrink: 0; font-size: 12px; color: #a53737; }
.guide-review > button:hover strong { color: #a53737; }
.guide-review .guide-review__hint { margin-bottom: 0; font-size: 12px; }
.guide-review > .guide-view-preview { margin-top: 18px; padding: 12px 14px; min-height: 46px; border: 0; border-radius: 12px; background: #17171b; color: #fff; font-size: 13px; }
@media (min-width: 1024px) {
  .guide-review > .guide-view-preview { position: sticky; bottom: 0; z-index: 3; box-shadow: 0 -10px 0 #fcf9f9; }
}
/* Confirmation must expose the complete summary before asking for a generation. */
.studio-experience[data-guide-step='review'] .studio-workbench { height: auto; }
.studio-experience[data-guide-step='review'] .studio-toolbox { height: auto; overflow: visible; }
.studio-experience[data-guide-step='review'] .studio-preview {
  height: auto; align-self: start; grid-template-rows: auto auto auto;
}
.studio-experience[data-guide-step='review']:not(.has-generated-output) .studio-plane { aspect-ratio: 16 / 9; }
.studio-experience[data-guide-step='review'] #plannerGenerate { position: static; box-shadow: none; }
.guide-navigation { display: flex; justify-content: space-between; gap: 8px; margin: 14px 0; }
.guide-navigation button { min-height: 46px; border: 0; border-radius: 12px; padding: 12px 14px; font-size: 13px; color: #17171b; background: rgb(255 255 255 / .8); }
.guide-navigation #guideContinue { display: inline-flex; align-items: center; gap: 5px; background: #17171b; color: white; }
.guide-navigation #guideContinue:disabled { opacity: .4; cursor: default; }
.guide-navigation .workspace-icon { width: 16px; height: 16px; }
.planner-field { display: grid; gap: 7px; margin: 14px 0; color: #40404a; font-size: 13px; }
.planner-field input, .planner-field textarea { min-width: 0; width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #dedbe3; border-radius: 10px; background: #fff; color: #17171b; font: inherit; }
.planner-field textarea { min-height: 90px; resize: vertical; }
.planner-field input:focus-visible, .planner-field textarea:focus-visible { outline: 2px solid #a53737; outline-offset: 2px; }
.planner-details { margin: 15px 0 0; padding-top: 12px; border-top: 1px solid #e3dee5; font-size: 13px; }
.planner-details summary { cursor: pointer; line-height: 1.6; }
.planner-details small { display: block; color: #64646f; font-size: 12px; line-height: 1.6; }
.planner-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 14px; }
.planner-choices button, .planner-person-tabs button, .planner-secondary, .planner-suggestions button { min-height: 48px; padding: 12px; border: 1px solid #dedbe3; border-radius: 12px; background: #f8f6fa; color: #17171b; text-align: left; font: inherit; font-size: 13px; }
.planner-choices small { display: block; margin-top: 6px; color: #64646f; font-size: 11px; line-height: 1.5; }
.planner-choices button[aria-pressed="true"], .planner-person-tabs button[aria-pressed="true"] { border-color: #17171b; background: #eeebf3; box-shadow: inset 0 0 0 1px #17171b; }
.planner-choices button:hover, .planner-person-tabs button:hover, .planner-secondary:hover { background: #eeebf3; }
.planner-person-tabs { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 15px; }
.planner-person-tabs button { flex: 1 1 100px; font-size: 12px; }
.planner-measurements { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.planner-consent { display: flex; align-items: flex-start; gap: 9px; line-height: 1.6; margin: 14px 0; }
.planner-consent input { margin-top: 4px; flex-shrink: 0; }
.planner-face-preview { display: block; width: 100px; max-height: 130px; object-fit: contain; margin: 10px 0; border-radius: 10px; }
.planner-error { color: #9c3030; background: #fff0ed; padding: 12px; border-radius: 10px; font-size: 13px; line-height: 1.6; }
.planner-recommended { display: block; color: #a53737; font-size: 11px; }
.planner-suggestions { display: grid; gap: 10px; margin-top: 14px; }
.planner-suggestions button { display: grid; gap: 6px; padding: 16px; transition: background 180ms, border-color 180ms; }
.planner-suggestions button strong { font-size: 15px; font-weight: 600; line-height: 1.4; }
.planner-suggestions button small { font-size: 14px; line-height: 1.6; color: #57535f; }
.planner-suggestions button:hover { background: #eeebf3; border-color: #b7b1c2; }
.planner-suggestions button:focus-visible { outline: 2px solid #a53737; outline-offset: 3px; }
.planner-details summary { min-height: 44px; padding-block: 10px; font-size: 15px; font-weight: 500; }
.planner-field { font-size: 14px; }
.planner-details .planner-field input, .planner-details .planner-field textarea { font-size: 15px; line-height: 1.5; }
#customOccasionStatus {
  display: flex; align-items: center; gap: 12px; margin: 14px 0 18px;
  padding: 14px 16px; border-radius: 12px; border: 1px solid #cbd8d1;
  background: #edf4ef; color: #274c3b; font-size: 16px; font-weight: 500;
  line-height: 1.5; overflow-wrap: anywhere;
}
#customOccasionStatus::before { content: '✓'; flex: 0 0 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: #d8e8dc; font-size: 14px; }
#plannerReviewPeople { padding: 8px 0; }
.studio-toolbox[inert] { opacity: .7; }
.collection-open:focus-visible, .collection-actions button:focus-visible { outline: 2px solid #17171b; outline-offset: 3px; }
#deleteCurrentVersion { background: transparent; color: #756d78; border-color: transparent; }
#deleteCurrentVersion:hover { color: #a33030; }
#plannerGenerate:disabled { opacity: .5; cursor: wait; }
.studio-customize { margin-top: 14px; }
.studio-customize > summary { min-height: 54px; }
.studio-customize > summary strong { font-size: 13px; }
.studio-customize > summary small { font-size: 12px; }
.studio-rail__status { font-size: 13px; line-height: 1.6; }
.studio-preview__empty small { font-size: 13px; max-width: 38ch; }
.studio-variants__actions button, .studio-variants__actions .result-download {
  min-height: 44px; padding: 10px 12px; font-size: 12px; line-height: 1.4;
}
.studio-variants__actions button:disabled { display: none; }
.studio-variants__actions .result-download { display: inline-flex; align-items: center; margin: 0; border: 1px solid #17171b; border-radius: 12px; color: white; background: #17171b; letter-spacing: 0; text-transform: none; text-decoration: none; }
.studio-auto-create .studio-result-actions { align-items: center; gap: 8px; }
.studio-result-actions > button, .studio-result-actions > a, .studio-result-more > summary {
  transition: background-color .18s ease, border-color .18s ease;
}
.studio-result-actions > button:hover { background: #f0edf4; border-color: #aaa3b4; color: #17171b; }
.studio-result-actions > .result-download:hover { background: #353239; border-color: #353239; }
.studio-result-actions :is(button, a, summary):focus-visible { outline: 2px solid #4b4356; outline-offset: 3px; }
.studio-result-more { position: relative; flex: 0 0 auto; }
.studio-result-more > summary {
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  list-style: none; border: 1px solid #d8d4de; border-radius: 12px;
  background: transparent; color: #64606d; font-size: 24px; line-height: 1; cursor: pointer;
}
.studio-result-more > summary::-webkit-details-marker { display: none; }
.studio-result-more > summary:hover, .studio-result-more[open] > summary { background: #ece8f1; color: #17171b; border-color: #aaa3b4; }
.studio-result-more__panel {
  position: absolute; z-index: 9; right: 0; bottom: calc(100% + 10px);
  width: 224px; max-width: calc(100vw - 40px); padding: 6px;
  background: #fff; border: 1px solid #e4dfea; border-radius: 14px;
  box-shadow: 0 8px 24px rgb(57 44 73 / .12);
}
.studio-result-more:not([open]) > .studio-result-more__panel { display: none; }
.studio-experience .studio-result-actions .studio-result-more__panel button {
  display: flex; align-items: flex-start; flex-direction: column; gap: 3px;
  width: 100%; min-height: 44px; padding: 11px 12px; border: 0; border-radius: 9px;
  background: transparent; text-align: left; font-size: 13px; white-space: normal;
}
.studio-result-actions .studio-result-more__panel button:hover { background: #f3f0f6; color: #17171b; }
.studio-result-more__panel small { color: #77717f; font-size: 11px; }
.studio-result-actions .studio-result-more__panel #deleteCurrentVersion { color: #a53737; }
.studio-experience[data-generation-state='queued'] #addVariant,
.studio-experience[data-generation-state='processing'] #addVariant { display: none; }
.studio-experience[data-generation-state='failed'] .studio-rail__status { color: #a53737; }
.workspace-output-details { margin: 18px 0 0; border-top: 1px solid #d8d4de; }
.workspace-output-details > summary { padding: 18px 4px; font-size: 13px; min-height: 44px; cursor: pointer; }
.workspace-output-details .studio-result { position: relative; inset: auto; margin-top: 0; padding: 16px; }
.workspace-output-details .studio-result__header,
.workspace-output-details .studio-result__visual,
.workspace-output-details #resultProgress { display: none; }
.workspace-output-details .studio-result__grid { display: block; }
.workspace-output-details .studio-result__copy { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.result-selection { display: grid; gap: 12px; margin: 0 0 20px; }
.result-selection > div { display: grid; grid-template-columns: 110px minmax(0,1fr); gap: 12px; }
.result-selection dt { color: #64646f; font-size: 13px; }
.result-selection dd { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
@media (max-width: 1023px) {
  .studio-workbench { grid-template-areas: 'panelhead' 'panel' 'preview'; }
  .studio-preview { height: 500px; }
}
@media (max-width: 767px) {
  .studio-preview { height: auto; }
  .workspace-topnav > * { min-height: 44px; }
  .workspace-topnav > button:disabled { display: none; }
  .studio-start-card small { font-size: 11px; }
  .studio-catalog-grid--garment { grid-auto-columns: auto; }
  .workspace-panel-header h2 { font-size: 22px; }
  .workspace-heading { padding-bottom: 14px; }
  .studio-quick-start { width: auto; }
  .studio-start-card { flex: none; }
.studio-rail__copy p { font-size: 12px; }
}
.workspace-new-collection { flex-shrink: 0; min-height: 42px; padding: 10px 14px; border: 1px solid #ded9e4; border-radius: 12px; background: rgb(255 255 255 / .6); color: #17171b; font: inherit; font-size: 13px; cursor: pointer; }
.workspace-new-collection:hover { background: #fff; }
.workspace-new-collection:disabled { opacity: .5; cursor: wait; }
.workspace-new-collection:focus-visible, .collection-card:focus-visible { outline: 2px solid #39333f; outline-offset: 3px; }
.studio-collections .collection-card { display: grid; gap: 8px; text-align: left; padding: 0 0 14px; border: 0; background: transparent; }
.collection-cover { display: grid; place-items: center; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #eeebf2; color: #77717f; font-size: 13px; }
.studio-collections .collection-cover img { height: 100%; border-radius: 0; }
.collection-card > strong { padding-inline: 2px; font-size: 16px; font-weight: 500; }
.collection-card > span { padding-inline: 2px; font-size: 12px; color: #77717f; }
.collection-card:hover .collection-cover { outline: 1px solid #aaa2b4; }
.studio-collections .collection-open { display: grid; gap: 8px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.collection-open strong { font-size: 16px; font-weight: 500; overflow-wrap: anywhere; }
.collection-open > span { font-size: 12px; color: #77717f; }
.collection-actions { display: flex; gap: 14px; }
.collection-actions button { padding: 4px 0; border: 0; background: transparent; color: #77717f; font: inherit; font-size: 12px; cursor: pointer; }
.collection-card form { display: flex; gap: 8px; }
.collection-card form[hidden] { display: none; }
.collection-card input { min-width: 0; width: 100%; padding: 8px; border: 1px solid #ded9e4; border-radius: 8px; font: inherit; }
.studio-collections { overflow: hidden; max-height: calc(100dvh - 48px); }
#collectionsItems { max-height: calc(100dvh - 230px); overflow-y: auto; padding: 4px; }
#collectionActionStatus { font-size: 13px; color: #a53737; margin: 0 0 16px; }
.studio-collection-confirm { width: min(430px, calc(100vw - 32px)); border: 0; border-radius: 20px; padding: 24px; background: #fff; color: #17171b; }
.studio-collection-confirm::backdrop { background: rgb(25 22 34 / .45); }
.studio-collection-confirm h2 { margin: 0 0 12px; font-size: 22px; font-weight: 500; }
.studio-collection-confirm p { font-size: 14px; line-height: 1.6; color: #64646f; }
.studio-collection-confirm > div { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.studio-collection-confirm button { min-height: 44px; border: 1px solid #ded9e4; border-radius: 10px; padding: 10px 14px; font: inherit; font-size: 13px; background: #fff; cursor: pointer; }
#collectionSwitchAccept { background: #17171b; color: #fff; }
#collectionSwitchError { color: #a53737; }
@media (min-width: 1024px) {
  /* Keep the viewing area stable when the poster becomes a generated image. */
  .studio-experience.has-generated-output[data-guide-step] .studio-preview { height: max(510px, calc(100dvh - 208px)); grid-template-rows: minmax(0, 1fr) auto auto; }
  .studio-experience.has-generated-output .studio-plane { width: 100%; height: 100%; aspect-ratio: auto; align-self: stretch; }
  .studio-experience .studio-plane:has(.workspace-compare:not([hidden])) { height: auto; }
}
@media (max-width: 767px) {
  .workspace-heading { flex-wrap: wrap; }
  .workspace-new-collection { min-height: 40px; font-size: 12px; }
}
