/* Shared brand primitives */
.button  {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   gap: var(--s10);
   min-height: var(--control-height);
   padding: var(--s12) var(--s24);
   border: 1px solid var(--border);
   border-radius: var(--radius-control);
   background: var(--white);
   color: var(--ink);
   font-size: var(--label-size);
   font-weight: var(--weight-medium);
   white-space: nowrap;
}
.button--primary  {
   background: var(--orange);
   color: var(--white);
   border-color: var(--orange);
}
 .button--primary:hover  {
   background: var(--orange-hover);
}
 .button--quiet  {
   border-color: transparent;
   background: transparent;
   padding-inline: var(--s12);
}
 .button--icon  {
   padding: var(--s12);
   width: var(--control-height);
}
 .button--small  {
   min-height: var(--s36);
   padding: var(--s6) var(--s12);
}
 .button--danger  {
   color: var(--error);
}
 .button.is-active  {
   background: var(--orange-soft);
   color: var(--orange);
   border-color: var(--orange);
}
 .icon  {
   width: var(--s20);
   height: var(--s20);
   flex-shrink: 0;
   fill: none;
   stroke: currentColor;
   stroke-width: 1.6;
   stroke-linecap: round;
   stroke-linejoin: round;
}
 .row  {
   display: flex;
   align-items: center;
   gap: var(--s12);
   flex-wrap: wrap;
}
 .row--between  {
   justify-content: space-between;
}
 .stack  {
   display: grid;
   gap: var(--s24);
}
 .stack--small  {
   gap: var(--s12);
}
 .muted  {
   color: var(--muted);
}
 .eyebrow  {
   text-transform: uppercase;
   font-size: var(--caption-size);
   letter-spacing: var(--s2);
   color: var(--subtle);
   font-weight: var(--weight-bold);
}
 .link  {
   color: var(--orange);
}
 .card  {
   border: 1px solid var(--border);
   border-radius: var(--radius-card);
   background: var(--white);
   padding: var(--s24);
}
 .photo  {
   background: var(--surface);
   border-radius: var(--radius-card);
   width: 100%;
   aspect-ratio: 1;
   object-fit: cover;
}
 .brand  {
   display: grid;
   width: fit-content;
   color: var(--ink);
   line-height: var(--logo-line);
   font-size: var(--logo-size);
   font-weight: var(--weight-bold);
   letter-spacing: var(--tracking-heading);
}
 .brand__sub  {
   font-size: var(--caption-size);
   line-height: var(--s18);
   letter-spacing: var(--tracking-logo);
   padding-left: var(--s12);
   font-weight: var(--weight-normal);
}
/* BEGIN: Sidebar */
.sidebar  {
   position: fixed;
   inset: 0 auto 0 0;
   width: var(--sidebar);
   border-right: 1px solid var(--border);
   padding: var(--s32) var(--s20) var(--s64);
   display: flex;
   flex-direction: column;
   background: var(--white);
   z-index: var(--z-nav);
}
 .sidebar__brand  {
   margin-left: var(--s12);
   margin-bottom: var(--s28);
}
 .sidebar__capture  {
   margin-inline: var(--s12) var(--s4);
   margin-bottom: var(--s22);
}
 .sidebar__label  {
   font-size: var(--tiny-size);
   color: var(--muted);
   font-weight: var(--weight-bold);
   margin: var(--s42) var(--s16) var(--s12);
}
 .sidebar__nav  {
   display: grid;
}
 .nav-item  {
   position: relative;
   display: flex;
   align-items: center;
   gap: var(--s16);
   min-height: var(--nav-height);
   padding: var(--s12) var(--s16);
   border-radius: var(--radius-nav);
   color: var(--muted);
}
 .nav-item.is-active, .nav-item[aria-current="page"]  {
   color: var(--ink);
   background: transparent;
   font-weight: var(--weight-bold);
}
 .nav-item.is-active::before, .nav-item[aria-current="page"]::before  {
   content: '';
   position: absolute;
   left: 0;
   top: var(--s12);
   bottom: var(--s12);
   width: var(--s4);
   border-radius: var(--radius-round);
   background: var(--orange);
}
 .nav-item.is-active .icon, .nav-item[aria-current="page"] .icon  {
   color: var(--orange-hover);
}
 .nav-item:hover  {
   background: var(--surface);
}
 .sidebar__divider  {
   margin: var(--s32) var(--s12);
   width: auto;
}
 .sidebar__bottom  {
   margin-top: auto;
}
 .sidebar__account  {
   margin-top: var(--s64);
   border-top: 1px solid var(--border);
   padding: var(--s24) var(--s12) 0;
   display: flex;
   align-items: center;
   gap: var(--s16);
}
 .avatar  {
   border-radius: var(--radius-round);
   width: var(--s44);
   height: var(--s44);
   display: grid;
   place-items: center;
   background: var(--orange-soft);
   font-size: var(--section-small);
}
 .sidebar--account  {
   overflow: auto;
   padding-bottom: var(--s24);
}
 .sidebar--account .sidebar__label  {
   margin-top: var(--s24);
}
 .mobile-nav  {
   display: none;
}
 .page  {
   margin-left: var(--sidebar);
   padding: var(--s44) var(--page-inset);
}
 .page__inner  {
   max-width: var(--page-max);
   margin: auto;
}
 .page-header  {
   display: flex;
   align-items: flex-start;
   justify-content: space-between;
   gap: var(--s24);
}
 .page-header p  {
   margin-top: var(--s8);
}
 .toolbar  {
   display: flex;
   gap: var(--s12);
   align-items: center;
   margin: var(--s26) 0 var(--s22);
}
 .search  {
   position: relative;
   flex: 1;
   max-width: 580px;
}
 .search input  {
   padding-left: var(--s44);
}
 .search .icon  {
   position: absolute;
   left: var(--s16);
   top: var(--s14);
   color: var(--muted);
}
 .view-toggle  {
   display: flex;
   margin-left: auto;
}
 .view-toggle .button  {
   border-radius: 0;
}
 .view-toggle .button:first-child  {
   border-radius: var(--radius-control) 0 0 var(--radius-control);
}
 .view-toggle .button:last-child  {
   border-radius: 0 var(--radius-control) var(--radius-control) 0;
}
.table-wrap  {
   overflow-x: auto;
   border: 1px solid var(--border);
   border-radius: var(--radius-nav);
}
 .data-table  {
   border-collapse: collapse;
   width: 100%;
   min-width: 980px;
   font-size: var(--label-size);
}
 .data-table th  {
   text-align: left;
   height: var(--table-head);
   font-weight: var(--weight-medium);
   color: var(--muted);
   background: var(--surface);
}
 .data-table td,.data-table th  {
   padding: var(--s8) var(--s16);
   border-bottom: 1px solid var(--border);
}
 .data-table tr:last-child td  {
   border-bottom: 0;
}
 .data-table tbody tr  {
   height: var(--row-height);
}
 .data-table tbody tr:hover  {
   background: var(--surface);
}
 .data-table__product  {
   display: flex;
   gap: var(--s16);
   align-items: center;
   min-width: 240px;
}
 .data-table__product img  {
   width: var(--thumb);
   height: var(--thumb);
   border-radius: var(--radius-control);
}
 .catalog-grid  {
   display: grid;
   grid-template-columns: repeat(auto-fill,minmax(230px,1fr));
   gap: var(--s24);
}
 .media-card  {
   min-width: 0;
}
 .media-card__image  {
   display: block;
   border: 1px solid var(--border);
   border-radius: var(--radius-card);
   padding: var(--s8);
}
 .media-card__image img  {
   width: 100%;
   aspect-ratio: 1;
   border-radius: var(--radius-control);
   background: var(--surface);
}
 .media-card__footer  {
   display: flex;
   gap: var(--s8);
   align-items: center;
   justify-content: space-between;
   padding: var(--s12) var(--s8);
}
 .media-card__name  {
   font-size: var(--label-size);
}
 .media-card__meta  {
   display: block;
   color: var(--muted);
   font-size: var(--caption-size);
}
 .status  {
   padding: var(--s48);
   text-align: center;
   display: grid;
   gap: var(--s16);
   justify-items: center;
}
 .spinner  {
   width: var(--s32);
   height: var(--s32);
   border: var(--s2) solid var(--border);
   border-top-color: var(--orange);
   border-radius: var(--radius-round);
   animation: spin 1s linear infinite;
}
 @keyframes spin  {
   to  {
   transform: rotate(360deg);
}
}
 @media(prefers-reduced-motion:reduce)  {
   .spinner  {
   animation: none;
}
}
.dialog  {
   border: 1px solid var(--border);
   border-radius: var(--radius-card);
   padding: var(--s24);
   width: min(90vw,var(--modal));
   max-height: 90vh;
   color: var(--ink);
   background: var(--white);
   box-shadow: var(--shadow);
}
 .dialog::backdrop  {
   background: var(--overlay);
}
 .dialog__header  {
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: var(--s16);
   margin-bottom: var(--s24);
}
.dialog__body  {
   display: grid;
   gap: var(--s16);
}

.dialog--studio {
  width: min(94vw,1160px);
  padding: var(--s32);
}
.dialog--studio .dialog__header {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  background: var(--white);
  padding-bottom: var(--s12);
}

.studio-launcher-intro {
  color: var(--muted);
  font-size: var(--section-small);
}

.studio-launcher-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: var(--s20);
}

.studio-launcher-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--white);
  text-align: left;
  transition: border-color var(--transition),transform var(--transition);
}

.studio-launcher-card:hover {
  transform: translateY(calc(-1 * var(--s2)));
  border-color: var(--orange);
}

.studio-launcher-card img,
.studio-launcher-card video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 0;
  object-fit: contain;
  background: var(--surface);
}

.studio-launcher-card > span {
  display: grid;
  gap: var(--s8);
  padding: var(--s20);
  flex: 1;
  align-content: start;
  border-top: 1px solid var(--border);
}

.studio-launcher-card strong {
  font-size: var(--studio-launcher-title-size);
  line-height: var(--body-line);
}

.studio-launcher-card small {
  color: var(--muted);
  font-size: var(--caption-size);
  line-height: 1.45;
}
@media (min-width: 1024px) {
  .studio-launcher-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
}
 .picker-row  {
   display: flex;
   align-items: center;
   text-align: left;
   gap: var(--s16);
   width: 100%;
   padding: var(--s12);
   border: 1px solid var(--border);
   border-radius: var(--radius-control);
   background: var(--white);
}
 .picker-row img  {
   width: var(--s64);
   height: var(--s64);
   border-radius: var(--radius-control);
}
 .picker-grid  {
   display: grid;
   grid-template-columns: repeat(3,1fr);
   gap: var(--s12);
}
 .picker-grid button  {
   padding: var(--s4);
   border: 1px solid var(--border);
   background: var(--white);
   border-radius: var(--radius-control);
}
 .picker-grid img  {
   width: 100%;
   aspect-ratio: 1;
}
 .toast  {
   position: fixed;
   bottom: var(--s24);
   left: 50%;
   transform: translateX(-50%);
   padding: var(--s12) var(--s24);
   border-radius: var(--radius-control);
   background: var(--ink);
   color: var(--white);
   z-index: var(--z-toast);
   max-width: 90vw;
}
 .filter-options  {
   display: grid;
   gap: var(--s12);
   padding: var(--s16);
   background: var(--surface);
   border-radius: var(--radius-control);
}
 .check-label  {
   display: flex;
   align-items: center;
   gap: var(--s12);
}
/* Home composition */
.home  {
   padding: var(--home-top) var(--home-inset) var(--s64);
}
 .home__heading  {
   text-align: center;
   margin-bottom: var(--s48);
   display: grid;
   gap: var(--s12);
}
 .home__heading h1  {
   font-size: var(--greeting-size);
   line-height: var(--greeting-line);
   font-weight: var(--weight-medium);
}
 .home__heading p  {
   font-size: var(--subtitle-size);
}
 .home__tasks  {
   display: grid;
   grid-template-columns: 1.2fr 1fr .98fr;
   gap: var(--s16);
}
 .task  {
   position: relative;
   border: 1px solid var(--border);
   border-radius: var(--radius-card);
   overflow: hidden;
   height: var(--task-height);
   background: var(--white);
}
 .task h2  {
   font-size: var(--task-size);
   line-height: var(--task-line);
   letter-spacing: var(--tracking-heading);
}
 .task__copy  {
   position: relative;
   z-index: 1;
   padding: var(--s40) var(--s28);
   max-width: 218px;
   display: grid;
   gap: var(--s12);
}
 .task__hero  {
   position: absolute;
   right: var(--s14);
   top: var(--s30);
   width: var(--task-photo);
   height: var(--s292);
   object-fit: contain;
}
 .task__arrow  {
   position: absolute;
   bottom: var(--s28);
   left: var(--s28);
   display: grid;
   place-items: center;
   border-radius: var(--radius-round);
   width: var(--s40);
   height: var(--s40);
   background: var(--orange-soft);
   color: var(--orange);
   font-size: var(--task-size);
}
 .task--spin .task__copy  {
   max-width: none;
   padding-top: var(--s36);
   padding-bottom: var(--s16);
}
 .task__angles  {
   display: flex;
   gap: var(--s10);
   padding-inline: var(--s28);
}
 .task__angles img  {
   width: calc((100% - var(--s20))/3);
   height: var(--s108);
   object-fit: contain;
}
 .task-stack  {
   display: grid;
   gap: var(--s16);
}
 .task--small  {
   height: auto;
   min-height: var(--s160);
}
 .task--small .task__copy  {
   padding: var(--s20);
   padding-right: var(--s142);
   max-width: none;
   gap: var(--s4);
}
 .task--small h2  {
   font-size: var(--section-small);
   line-height: var(--s28);
}
 .task--small img  {
   position: absolute;
   right: var(--s10);
   top: var(--s10);
   bottom: var(--s10);
   width: var(--s118);
   height: calc(100% - var(--s20));
   border-radius: var(--radius-control);
}
 .task--small .task__arrow  {
   width: var(--s32);
   height: var(--s32);
   bottom: var(--s16);
   left: var(--s20);
}
 .home__recent  {
   margin-top: var(--s48);
}
 .recent-grid  {
   display: flex;
   gap: var(--s20);
   margin-top: var(--s12);
}
 .recent-grid .media-card  {
   width: var(--s212);
}
 .recent-grid img  {
   height: var(--s114);
   aspect-ratio: auto;
   object-fit: contain;
}
.detail  {
   display: grid;
   grid-template-columns: 1fr 1fr;
   gap: var(--s48);
   margin-top: var(--s24);
}
 .detail__gallery  {
   display: grid;
   gap: var(--s16);
   align-content: start;
   min-width: 0;
}
 .thumb-strip  {
   display: flex;
   gap: var(--s12);
   overflow-x: auto;
   padding-block: var(--s4);
}
 .thumb-strip a,.thumb-strip button  {
   flex: 0 0 var(--s86);
   width: var(--s86);
   height: var(--s86);
   padding: 0;
   border: 1px solid var(--border);
   border-radius: var(--radius-control);
   overflow: hidden;
   background: var(--surface);
}
 .thumb-strip img  {
   width: 100%;
   height: 100%;
}
 .metadata  {
   margin: var(--s24) 0;
}
 .metadata div  {
   display: grid;
   grid-template-columns: 1fr 1fr;
   padding: var(--s16) 0;
   border-bottom: 1px solid var(--border);
}
 .metadata dt  {
   color: var(--muted);
}
 .metadata dd  {
   margin: 0;
}
 .form-grid  {
   display: grid;
   grid-template-columns: 1fr 1fr;
   gap: var(--s24);
}
 .tabs  {
   display: flex;
   flex-wrap: wrap;
   gap: var(--s8);
   margin-bottom: var(--s24);
}
 .edit-form  {
   max-width: 800px;
   margin-top: var(--s32);
}
.viewer  {
   background: #050505;
   color: var(--white);
   height: 100vh;
   height: 100dvh;
   overflow: hidden;
   display: grid;
   grid-template-rows: var(--s72) minmax(0,1fr) var(--s80) var(--s100);
}
 .viewer__header  {
   display: grid;
   grid-template-columns: var(--s44) 1fr var(--s44);
   align-items: center;
   padding: var(--s14) var(--s24);
}
 .viewer__back  {
   width: var(--s44);
   height: var(--s44);
   display: grid;
   place-items: center;
   border-radius: var(--radius-round);
   color: var(--dark-muted);
   transition: background var(--transition),color var(--transition);
}
 .viewer__back:hover  {
   color: var(--white);
   background: rgba(255,255,255,.08);
}
 .viewer__back svg  {
   width: var(--s24);
   height: var(--s24);
   fill: none;
   stroke: currentColor;
   stroke-width: 1.8;
   stroke-linecap: round;
   stroke-linejoin: round;
 }
 .viewer__identity  {
   justify-self: center;
   padding: var(--s8) var(--s20);
   border-radius: var(--radius-round);
   background: rgba(255,255,255,.1);
   color: var(--white);
   font-size: var(--label-size);
   font-weight: var(--weight-medium);
   letter-spacing: .2px;
 }
 .viewer__workspace  {
   min-height: 0;
   display: grid;
   place-items: center;
   padding: 0 var(--s24) var(--s8);
 }
 .viewer__frame  {
   position: relative;
   width: min(var(--viewer-canvas-max),calc(100vh - 260px),calc(100vw - var(--s48)));
   height: auto;
   aspect-ratio: 1;
 }
 .viewer__stage  {
   width: 100%;
   height: 100%;
   background: var(--white);
   overflow: hidden;
   display: grid;
   place-items: center;
 }
 .viewer__media  {
   width: 100%;
   height: 100%;
   display: grid;
   place-items: center;
 }
 .viewer__media img,.viewer__media video  {
   width: 100%;
   height: 100%;
   object-fit: contain;
   background: var(--white);
 }
.viewer__studio  {
   position: absolute;
   left: 50%;
   bottom: var(--s16);
   transform: translateX(-50%);
   min-height: var(--control-height);
   display: inline-flex;
   align-items: center;
   gap: var(--s10);
   padding: var(--s10) var(--s22);
   border: 1px solid var(--orange);
   border-radius: var(--radius-round);
   background: var(--orange);
   color: var(--white);
   box-shadow: var(--shadow-soft);
   font-weight: var(--weight-bold);
   white-space: nowrap;
 }
.viewer__studio:hover  {
   background: var(--orange-hover);
 }
 .viewer__studio svg  {
   width: var(--s20);
   height: var(--s20);
   fill: none;
   stroke: currentColor;
   stroke-width: 1.6;
   stroke-linecap: round;
   stroke-linejoin: round;
 }
 .viewer__thumbs  {
   align-self: center;
   justify-self: center;
   max-width: calc(100vw - var(--s48));
   margin: 0;
   gap: var(--s10);
   padding: var(--s8) var(--s4);
   overflow-x: auto;
 }
 .viewer__thumbs a  {
   flex-basis: var(--viewer-thumb);
   width: var(--viewer-thumb);
   height: var(--viewer-thumb);
   padding: var(--s4);
   border-color: rgba(255,255,255,.16);
   border-radius: var(--radius-sm);
   background: rgba(255,255,255,.12);
   opacity: .58;
   transition: opacity var(--transition),border-color var(--transition),background var(--transition);
 }
 .viewer__thumbs a:hover  {
   opacity: .86;
 }
 .viewer__thumbs a.is-active  {
   opacity: 1;
   border: var(--s2) solid var(--orange);
   background: var(--white);
 }
 .viewer__thumbs img  {
   border-radius: var(--radius-sm);
   object-fit: cover;
 }
 .viewer__actions  {
   display: flex;
   align-items: center;
   justify-content: center;
   gap: var(--s12);
   padding: var(--s10) var(--s24) var(--s14);
   border-top: 1px solid rgba(255,255,255,.12);
 }
 .viewer-action  {
   width: var(--viewer-action-width);
   min-height: var(--s72);
   display: grid;
   justify-items: center;
   align-content: center;
   gap: var(--s8);
   padding: var(--s8);
   border: 0;
   border-radius: var(--radius-control);
   background: transparent;
   color: var(--dark-muted);
   font-size: var(--caption-size);
   transition: background var(--transition),color var(--transition);
 }
 .viewer-action:hover  {
   background: rgba(255,255,255,.08);
   color: var(--white);
 }
 .viewer-action--danger:hover  {
   color: #ffb4ad;
 }
 .viewer-action svg  {
   width: var(--s24);
   height: var(--s24);
   fill: none;
   stroke: currentColor;
   stroke-width: 1.7;
   stroke-linecap: round;
   stroke-linejoin: round;
 }
 .viewer .dialog  {
   color: var(--ink);
}
 .viewer .dialog .button  {
   color: var(--ink);
   border-color: var(--border);
}
 .viewer .dialog .button--primary  {
   color: var(--white);
}
.workspace  {
   height: 100vh;
   display: flex;
   flex-direction: column;
}
 .workspace__header  {
   display: flex;
   align-items: center;
   justify-content: space-between;
   padding: var(--s16) var(--s24);
   border-bottom: 1px solid var(--border);
   gap: var(--s16);
}
 .workspace__header h1  {
   font-size: var(--section-small);
}
 .workspace__body  {
   display: flex;
   min-height: 0;
   flex: 1;
}
 .workspace__canvas  {
   flex: 1;
   background: var(--surface);
   padding: var(--s32);
   display: flex;
   align-items: center;
   justify-content: center;
   min-width: 0;
   position: relative;
}
 .workspace__canvas img,.workspace__canvas canvas,.workspace__canvas video  {
   max-width: 100%;
   max-height: 100%;
   object-fit: contain;
}
 .inspector  {
   width: var(--inspector);
   border-left: 1px solid var(--border);
   padding: var(--s24);
   overflow-y: auto;
   display: flex;
   flex-direction: column;
   gap: var(--s24);
}
 .tool-tabs  {
   display: flex;
   flex-wrap: wrap;
   gap: var(--s4);
}
 .tool-tabs .button  {
   flex: 1;
}
 .inspector__panel  {
   display: grid;
   gap: var(--s20);
}
 .studio  {
   margin-top: var(--s32);
   display: grid;
   grid-template-columns: 380px 1fr;
   gap: var(--s48);
}
 .studio__choices  {
   display: grid;
   gap: var(--s24);
   align-content: start;
}
 .source  {
   display: flex;
   align-items: center;
   gap: var(--s16);
}
 .source img  {
   width: var(--s86);
   height: var(--s86);
   border-radius: var(--radius-control);
}
 .model-grid  {
   display: grid;
   grid-template-columns: repeat(4,1fr);
   gap: var(--s8);
}
 .model-card  {
   background: var(--white);
   border: 1px solid var(--border);
   border-radius: var(--radius-control);
   padding: var(--s4);
   text-align: center;
}
 .model-card img  {
   width: 100%;
   height: var(--s80);
   border-radius: var(--radius-sm);
}
 .model-card.is-active,.preset.is-active  {
   border-color: var(--orange);
   color: var(--orange);
}
 .preset-grid  {
   display: grid;
   grid-template-columns: 1fr 1fr;
   gap: var(--s12);
}
 .preset  {
   border: 1px solid var(--border);
   border-radius: var(--radius-control);
   background: var(--white);
   padding: var(--s6);
   text-align: left;
   font-size: var(--caption-size);
}
 .preset img  {
   width: 100%;
   aspect-ratio: 2;
   border-radius: var(--radius-sm);
   margin-bottom: var(--s6);
}
 .preview  {
   width: 100%;
   max-width: var(--preview);
   aspect-ratio: 1;
   border: 1px solid var(--border);
   border-radius: var(--radius-card);
   background: var(--surface);
   display: grid;
   place-items: center;
   overflow: hidden;
   margin-block: var(--s16);
}
 .preview img,.preview video  {
   width: 100%;
   height: 100%;
   object-fit: contain;
}
 .comparison  {
   display: grid;
   grid-template-columns: 1fr 1fr;
   width: 100%;
   gap: var(--s8);
   padding: var(--s8);
}
 .comparison figcaption  {
   text-align: center;
   font-size: var(--caption-size);
   padding: var(--s8);
}
 .comparison figure  {
   margin: 0;
}
 .session  {
   display: flex;
   align-items: center;
   gap: var(--s24);
   padding: var(--s20);
   border-bottom: 1px solid var(--border);
}
 .session img  {
   width: var(--s80);
   height: var(--s80);
   border-radius: var(--radius-control);
}
 .session[href]:hover  {
   background: var(--surface);
 }
 .session__main  {
   flex: 1;
}
 .tutorial img  {
   aspect-ratio: 1.6;
   margin-bottom: var(--s16);
}
 .integration__logo  {
   width: 100px;
   height: var(--s32);
   object-fit: contain;
   object-position: left;
   margin-bottom: var(--s24);
}
 .login  {
   max-width: 410px;
   margin: var(--s96) auto;
   padding: var(--s30);
}
 .hub  {
   max-width: 1100px;
   margin: auto;
   padding: var(--s48) var(--s24);
}
 .hub__grid  {
   display: grid;
   grid-template-columns: repeat(auto-fit,minmax(240px,1fr));
   gap: var(--s16);
   margin-top: var(--s32);
}
/* Public composition: same primitives and tokens, broader whitespace */
.marketing  {
   max-width: var(--page-max);
   margin: auto;
   padding-inline: var(--s48);
}
 .public-header  {
   border-bottom: 1px solid var(--border);
}
 .public-header__inner  {
   max-width: var(--page-max);
   margin: auto;
   padding: var(--s20) var(--s48);
   min-height: var(--s100);
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: var(--s24);
}
 .public-nav  {
   display: flex;
   align-items: center;
   gap: var(--s24);
   font-size: var(--caption-size);
}
 .public-nav details  {
   position: relative;
}
 .public-nav details div  {
   position: absolute;
   background: var(--white);
   padding: var(--s16);
   border: 1px solid var(--border);
   border-radius: var(--radius-control);
   width: 240px;
   z-index: var(--z-nav);
   display: grid;
   gap: var(--s12);
}
 .marketing-section  {
   padding-block: var(--s64);
   display: grid;
   gap: var(--s32);
}
 .marketing-section h2  {
   font-size: var(--section-size);
   line-height: var(--section-line);
   letter-spacing: var(--tracking-heading);
}
 .marketing-section p  {
   line-height: var(--s28);
   max-width: 720px;
}
 .marketing-hero  {
   display: grid;
   grid-template-columns: 1fr 1.1fr;
   gap: var(--s56);
   align-items: center;
   padding-top: var(--s52);
}
 .marketing-hero h1  {
   font-size: var(--hero-size);
   line-height: var(--hero-line);
   font-weight: var(--weight-medium);
   letter-spacing: var(--tracking-hero);
}
 .marketing-hero__copy  {
   display: grid;
   gap: var(--s24);
}
 .marketing-hero .photo  {
   aspect-ratio: 1.1;
}
 .editorial  {
   display: grid;
   grid-template-columns: 1.15fr .85fr;
   align-items: center;
   gap: var(--s80);
}
 .editorial--reverse  {
   direction: rtl;
}
 .editorial--reverse>*  {
   direction: ltr;
}
 .editorial .photo  {
   aspect-ratio: 1.5;
}
 .marketing-grid  {
   display: grid;
   grid-template-columns: repeat(3,1fr);
   gap: var(--s24);
}
 .marketing-grid--four  {
   grid-template-columns: repeat(4,1fr);
}
 .marketing-grid h3  {
   margin-top: var(--s16);
}
 .marketing-grid p  {
   margin-top: var(--s12);
}
 .marketing-dark  {
   padding: var(--s48);
   border-radius: var(--radius-card);
   background: var(--ink);
   color: var(--white);
}
 .marketing-dark p  {
   color: var(--dark-muted);
}
 .public-footer  {
   border-top: 1px solid var(--border);
   padding: var(--s48);
   display: flex;
   flex-wrap: wrap;
   justify-content: space-between;
   gap: var(--s32);
}
 .public-footer nav  {
   display: grid;
   gap: var(--s12);
}
 .public-footer small  {
   width: 100%;
}
 .marketing-platform  {
   aspect-ratio: 1.65;
   object-fit: contain;
   border: 1px solid var(--border);
}
 .workflow  {
   display: grid;
   grid-template-columns: repeat(5,1fr);
   gap: var(--s16);
}
 .workflow img  {
   aspect-ratio: 1.2;
}
@media(max-width:1440px)  {
   .home__tasks  {
   grid-template-columns: 1.2fr 1fr;
}
 .task-stack  {
   grid-column: 1/-1;
   grid-template-columns: 1fr 1fr;
}
 .public-nav  {
   gap: var(--s12);
}
}
@media(max-width:1180px)  {
   .home  {
   padding-inline: var(--s32);
}
 .home__tasks  {
   grid-template-columns: 1fr;
}
 .task-stack  {
   grid-column: auto;
}
 .studio  {
   grid-template-columns: 320px 1fr;
   gap: var(--s24);
}
 .marketing-hero h1  {
   font-size: var(--section-size);
   line-height: var(--section-line);
}
 .public-nav  {
   display: none;
}
 .public-nav.is-open  {
   display: flex;
   flex-wrap: wrap;
   position: absolute;
   top: var(--s100);
   left: 0;
   right: 0;
   background: var(--white);
   padding: var(--s24);
   z-index: var(--z-nav);
   border-bottom: 1px solid var(--border);
}
 .public-menu  {
   display: inline-flex !important;
}
 .editorial  {
   gap: var(--s32);
}
}
@media(max-width:780px)  {
   .sidebar  {
   transform: translateX(-100%);
   transition: transform var(--transition);
}
 .sidebar.is-open  {
   transform: translateX(0);
   box-shadow: var(--shadow);
}
 .mobile-nav  {
   display: flex;
   align-items: center;
   gap: var(--s16);
   padding: var(--s12) var(--s20);
   border-bottom: 1px solid var(--border);
}
 .page  {
   margin-left: 0;
   padding: var(--s24) var(--s20);
}
 .home__heading h1  {
   font-size: var(--title-size);
   line-height: var(--title-line);
}
 .home__heading  {
   margin-block: var(--s24);
}
 .task-stack  {
   grid-template-columns: 1fr;
}
 .recent-grid  {
   overflow: auto;
}
 .recent-grid .media-card  {
   flex: 0 0 var(--s212);
}
 .toolbar  {
   flex-wrap: wrap;
}
 .search  {
   flex-basis: 100%;
   max-width: none;
}
 .page-header  {
   flex-wrap: wrap;
}
 .detail,.studio  {
   grid-template-columns: 1fr;
}
 .form-grid  {
   grid-template-columns: 1fr;
}
 .workspace  {
   height: auto;
   min-height: 100vh;
}
 .workspace__body  {
   flex-direction: column;
}
 .workspace__canvas  {
   min-height: 45vh;
   height: 45vh;
}
 .workspace__canvas canvas,.workspace__canvas img  {
   max-height: 40vh;
}
 .inspector  {
   width: 100%;
   border-left: 0;
   border-top: 1px solid var(--border);
}
 .workspace__header  {
   padding: var(--s12);
   flex-wrap: wrap;
}
 .viewer__frame  {
   width: min(calc(100vh - 238px),calc(100vw - var(--s24)));
   height: auto;
 }
 .viewer__actions  {
   justify-content: flex-start;
   gap: var(--s4);
   padding: var(--s8) var(--s12);
   overflow-x: auto;
 }
 .viewer-action  {
   min-width: var(--s80);
   width: var(--s80);
 }
 .session  {
   flex-wrap: wrap;
   gap: var(--s12);
}
 .marketing,.public-header__inner  {
   padding-inline: var(--s20);
}
 .marketing-hero,.editorial  {
   grid-template-columns: 1fr;
   gap: var(--s24);
}
 .marketing-hero h1  {
   font-size: var(--mobile-hero);
   line-height: var(--mobile-hero-line);
}
 .marketing-section  {
   padding-block: var(--s40);
   gap: var(--s24);
}
 .marketing-section h2  {
   font-size: var(--title-size);
   line-height: var(--title-line);
}
 .marketing-grid,.marketing-grid--four  {
   grid-template-columns: 1fr 1fr;
}
 .workflow  {
   grid-template-columns: 1fr 1fr;
}
 .marketing-dark,.public-footer  {
   padding: var(--s24);
}
 .public-header__inner>.button  {
   padding-inline: var(--s12);
}
}
@media(max-width:440px)  {
   .marketing-grid  {
   grid-template-columns: 1fr;
}
 .marketing-grid--four  {
   grid-template-columns: 1fr 1fr;
}
 .task__hero  {
   width: 45%;
}
 .task__copy  {
   max-width: 60%;
   padding-left: var(--s20);
}
 .task--spin .task__copy  {
   max-width: none;
}
 .catalog-grid  {
   grid-template-columns: 1fr;
}
}
.public-menu  {
   display: none;
}
 .output-figure  {
   margin: 0;
}
 .output-figure figcaption  {
   margin-top: var(--s12);
   font-size: var(--label-size);
}
@media(max-width:1180px)  {
   .public-menu  {
   display: inline-flex;
}
}
.recent-grid .media-card__footer  {
   padding: var(--s4) var(--s16);
}
 .recent-grid .button  {
   color: var(--muted);
}
 .home__heading  {
   margin-bottom: var(--s52);
}
 .task--small p  {
   font-size: var(--label-size);
}
.table-wrap  {
   position:relative;
   max-width:100%;
}

/* BEGIN: CaptureWorkspace */
.capture-workspace {
  display: grid;
  grid-template-columns: minmax(var(--capture-stage-min), 1fr) var(--capture-inspector);
  min-height: 100vh;
  background: var(--surface);
}

.capture-stage {
  position: relative;
  min-width: 0;
  min-height: 100vh;
  overflow: hidden;
  background: var(--white);
}

.capture-stage__header {
  position: absolute;
  inset: var(--s24) var(--s32) auto;
  z-index: var(--z-nav);
  display: grid;
  grid-template-columns: var(--control-height) 1fr auto;
  align-items: center;
  gap: var(--s16);
}

.capture-stage__header h1 {
  font-size: var(--section-small);
  line-height: var(--s28);
}

.capture-stage__back {
  display: grid;
  place-items: center;
  width: var(--control-height);
  height: var(--control-height);
  border: 1px solid var(--border);
  border-radius: var(--radius-round);
  background: var(--white);
}

.capture-stage__view {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: var(--s100) var(--s64) var(--s128);
}

.capture-stage__view .capture-stage__product,
.capture-stage__view video {
  width: min(58vw, var(--capture-product-max));
  height: min(68vh, var(--capture-product-max));
  object-fit: contain;
  transform-origin: center;
  transition: filter var(--transition), transform var(--transition);
}

.capture-stage__view .status {
  color: var(--muted);
}

.capture-zoom {
  position: absolute;
  left: 50%;
  bottom: var(--s32);
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--s16);
  width: min(calc(100% - var(--s48)), var(--s480));
  min-height: var(--control-height);
  padding: var(--s8) var(--s20);
  border: 1px solid var(--border);
  border-radius: var(--radius-round);
  background: var(--white);
  box-shadow: var(--shadow-soft);
  font-size: var(--caption-size);
  color: var(--muted);
}

.capture-zoom input {
  min-height: 0;
}

.capture-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--s16);
  min-width: 0;
  height: 100vh;
  padding: var(--s20);
  overflow-y: auto;
  border-left: 1px solid var(--border);
  background: var(--surface);
}

.capture-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--s52);
  padding-inline: var(--s4);
}

.capture-panel__header h2 {
  margin-top: var(--s2);
}

.capture-device {
  display: grid;
  grid-template-columns: var(--s40) 1fr var(--s10) auto;
  align-items: center;
  gap: var(--s12);
  width: 100%;
  min-height: var(--s72);
  padding: var(--s12) var(--s16);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--white);
  text-align: left;
}

.capture-device__icon {
  display: grid;
  place-items: center;
  width: var(--s40);
  height: var(--s40);
  border-radius: var(--radius-control);
  background: var(--orange-soft);
  color: var(--orange);
}

.capture-device small {
  display: block;
}

.capture-device__status {
  width: var(--s10);
  height: var(--s10);
  border-radius: var(--radius-round);
  background: var(--orange);
}

.capture-card {
  display: grid;
  gap: var(--s16);
  padding: var(--s16);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--white);
}

.capture-card h3 {
  font-size: var(--body-size);
  font-weight: var(--weight-bold);
}

.capture-segment {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s4);
  padding: var(--s4);
  border-radius: var(--radius-nav);
  background: var(--surface);
}

.capture-segment button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s8);
  min-height: var(--s42);
  padding: var(--s8);
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--muted);
  font-size: var(--caption-size);
}

.capture-segment button.is-active {
  border-color: var(--border);
  background: var(--white);
  color: var(--orange);
  box-shadow: var(--shadow-soft);
}

.capture-mode-settings {
  border-top: 1px solid var(--border);
  padding-top: var(--s14);
}

.capture-mode-setting {
  display: grid;
  gap: var(--s12);
}

.capture-mode-setting[hidden] {
  display: none;
}

.capture-setting-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--label-size);
  font-weight: var(--weight-medium);
}

.capture-setting-heading small,
.capture-setting-heading output,
.capture-speed-scale {
  color: var(--muted);
  font-size: var(--caption-size);
  font-weight: var(--weight-regular);
}

.capture-count-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s8);
}

.capture-count-options button {
  display: grid;
  place-items: center;
  gap: 0;
  min-height: var(--s52);
  padding: var(--s6);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--white);
  color: var(--muted);
}

.capture-count-options button strong {
  color: var(--ink);
  font-size: var(--body-size);
}

.capture-count-options button span {
  font-size: var(--caption-size);
}

.capture-count-options button.is-active {
  border-color: var(--orange);
  background: var(--orange-soft);
  color: var(--orange);
}

.capture-count-options button.is-active strong {
  color: var(--orange);
}

.capture-mode-setting > input[type="range"] {
  min-height: 0;
}

.capture-speed-scale {
  display: flex;
  justify-content: space-between;
}

.capture-essentials {
  display: grid;
  gap: var(--s12);
  padding-top: var(--s14);
  border-top: 1px solid var(--border);
}

.capture-light {
  display: grid;
  gap: var(--s8);
}

.capture-light > span {
  display: flex;
  justify-content: space-between;
  font-size: var(--label-size);
}

.capture-light output {
  color: var(--muted);
  font-size: var(--caption-size);
}

.capture-light input {
  min-height: 0;
}

.capture-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  grid-template-columns: 1fr auto;
  min-height: var(--s40);
}

.capture-switch__label {
  display: grid;
  gap: var(--s2);
}

.capture-switch__label strong {
  font-size: var(--label-size);
}

.capture-switch__label small {
  color: var(--muted);
  font-size: var(--caption-size);
}

.capture-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.capture-switch > input + span {
  position: relative;
  width: var(--s44);
  height: var(--s24);
  border-radius: var(--radius-round);
  background: var(--border);
  transition: background var(--transition);
}

.capture-switch > input + span::after {
  position: absolute;
  top: var(--s2);
  left: var(--s2);
  width: var(--s20);
  height: var(--s20);
  border-radius: var(--radius-round);
  background: var(--white);
  content: "";
  transition: transform var(--transition);
}

.capture-switch input:checked + span {
  background: var(--orange);
}

.capture-switch input:checked + span::after {
  transform: translateX(var(--s20));
}

.capture-switch input:focus-visible + span {
  outline: var(--s2) solid var(--orange);
  outline-offset: var(--s4);
}

.capture-panel__actions {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: var(--s20);
  margin-top: auto;
  position: sticky;
  bottom: 0;
  z-index: var(--z-nav);
  padding: var(--s16) var(--s8) var(--s4);
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.capture-turn {
  display: grid;
  justify-items: center;
  gap: var(--s4);
  border: 0;
  background: transparent;
  color: var(--muted);
}

.capture-turn > span {
  display: grid;
  place-items: center;
  width: var(--capture-control);
  height: var(--capture-control);
  border: 1px solid var(--border);
  border-radius: var(--radius-round);
  background: var(--white);
  color: var(--ink);
  font-size: var(--task-size);
}

.capture-action {
  display: grid;
  place-items: center;
  align-content: center;
  gap: var(--s4);
  width: var(--capture-action);
  height: var(--capture-action);
  border: var(--s4) solid var(--orange-soft);
  border-radius: var(--radius-round);
  background: var(--orange);
  color: var(--white);
  box-shadow: var(--shadow-soft);
}

.capture-action .icon {
  width: var(--s24);
  height: var(--s24);
}

.capture-action span {
  font-size: var(--tiny-size);
  font-weight: var(--weight-bold);
}

.capture-result {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s8);
  margin-top: auto;
  padding-top: var(--s16);
  border-top: 1px solid var(--border);
}

.capture-result .button:first-child {
  grid-column: 1 / -1;
}
/* END: CaptureWorkspace */

@media(max-width:1180px) {
  .capture-workspace {
    grid-template-columns: minmax(var(--s480), 1fr) var(--s380);
  }

  .capture-stage__view {
    padding-inline: var(--s32);
  }
}

@media(max-width:900px) {
  .capture-workspace {
    display: block;
  }

  .capture-stage {
    min-height: 60vh;
  }

  .capture-stage__view {
    min-height: 60vh;
    padding-block: var(--s96) var(--s100);
  }

  .capture-stage__view .capture-stage__product,
  .capture-stage__view video {
    width: min(78vw, var(--capture-product-max));
    height: 42vh;
  }

  .capture-panel {
    width: 100%;
    height: auto;
    min-height: 40vh;
    border-top: 1px solid var(--border);
    border-left: 0;
  }
}

@media(max-width:540px) {
  .capture-stage,
  .capture-stage__view {
    min-height: 52vh;
  }

  .capture-stage__header {
    inset: var(--s16) var(--s16) auto;
    grid-template-columns: var(--control-height) 1fr;
  }

  .capture-stage__header > .button {
    display: none;
  }

  .capture-stage__view {
    padding: var(--s80) var(--s20) var(--s86);
  }

  .capture-stage__view .capture-stage__product,
  .capture-stage__view video {
    width: 86vw;
    height: 34vh;
  }

  .capture-zoom {
    bottom: var(--s16);
  }

  .capture-panel {
    padding: var(--s16);
  }

  .capture-setting-heading small {
    display: none;
  }
}

/* BEGIN: EditorWorkspace */
.editor-workspace {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--surface);
}

.editor-header {
  min-height: var(--s72);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  padding: var(--s10) var(--s24);
  background: var(--white);
}

.editor-header h1 {
  justify-self: center;
  align-self: center;
}

.editor-back,
.editor-header__actions {
  display: inline-flex;
  align-items: center;
}

.editor-back {
  justify-self: start;
  gap: var(--s8);
  font-weight: var(--weight-medium);
}

.editor-back svg,
.editor-header .button--icon svg,
.editor-viewport-controls svg,
.editor-toolrail svg,
.editor-quickbar svg {
  width: var(--s20);
  height: var(--s20);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.editor-header__actions {
  justify-self: end;
  gap: var(--s8);
}

.editor-header__divider,
.editor-control-divider {
  width: 1px;
  background: var(--border);
}

.editor-header__divider {
  height: var(--s32);
  margin-inline: var(--s4);
}

.editor-text-action,
.editor-panel__reset {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: var(--s8);
}

.editor-panel__reset {
  color: var(--orange);
}

.editor-body {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0,1fr) calc(var(--editor-inspector) + var(--s32));
  background: #f7f8fa;
}

.editor-stage {
  min-height: 0;
  height: 100%;
  padding: var(--s32) var(--s96) var(--s100) var(--s32);
  overflow: hidden;
  background: #f7f8fa;
}

.editor-canvas-frame {
  width: min(var(--editor-canvas-max),calc(100vw - var(--editor-inspector) - var(--s190)));
  height: min(var(--editor-canvas-max),calc(100vh - var(--s212)));
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--border);
  box-shadow: 0 3px 18px rgba(16,24,40,.06);
}

.editor-canvas-frame canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: center;
  transition: transform var(--transition);
}

.editor-viewport-controls,
.editor-toolrail,
.editor-quickbar {
  position: absolute;
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.97);
  box-shadow: var(--shadow-soft);
  z-index: var(--z-nav);
}

.editor-viewport-controls {
  top: var(--s20);
  left: var(--s20);
  min-height: var(--s52);
  padding: var(--s6);
  border-radius: var(--radius-card);
}

.editor-icon-button,
.editor-toolrail button,
.editor-quickbar button {
  border: 0;
  background: transparent;
}

.editor-icon-button {
  width: var(--s40);
  height: var(--s40);
  display: grid;
  place-items: center;
  border-radius: var(--radius-control);
}

.editor-control-divider {
  height: var(--s28);
  margin-inline: var(--s4);
}

.editor-zoom select {
  width: var(--s80);
  border: 0;
  padding: var(--s8);
  background: transparent;
  font-weight: var(--weight-medium);
}

.editor-toolrail {
  top: 50%;
  right: var(--s20);
  transform: translateY(-50%);
  flex-direction: column;
  gap: var(--s4);
  padding: var(--s6);
  border-radius: var(--radius-card);
}

.editor-toolrail button {
  width: var(--editor-tool);
  height: var(--editor-tool);
  display: grid;
  place-items: center;
  border-radius: var(--radius-control);
  color: var(--muted);
}

.editor-toolrail button:hover,
.editor-toolrail button.is-active,
.editor-icon-button:hover {
  background: var(--orange-soft);
  color: var(--orange);
}

.editor-quickbar {
  left: 50%;
  bottom: var(--s20);
  transform: translateX(-50%);
  min-height: var(--s58);
  padding: var(--s6);
  border-radius: var(--radius-card);
  white-space: nowrap;
}

.editor-quickbar button {
  min-height: var(--s44);
  display: inline-flex;
  align-items: center;
  gap: var(--s8);
  padding: var(--s8) var(--s14);
  border-radius: var(--radius-control);
}

.editor-quickbar button + button {
  border-left: 1px solid var(--border);
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.editor-quickbar button:hover,
.editor-quickbar button.is-active {
  color: var(--orange);
  background: var(--orange-soft);
}

.editor-inspector {
  width: auto;
  min-height: 0;
  margin: var(--s16) var(--s16) var(--s16) 0;
  padding: 0;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--white);
  box-shadow: 0 3px 18px rgba(16,24,40,.06);
}

.editor-inspector .inspector__panel {
  display: block;
}

.editor-panel__header {
  min-height: var(--s118);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s20);
  padding: var(--s24);
  border-bottom: 1px solid var(--border);
}

.editor-panel__header h2 {
  font-size: var(--task-size);
  font-weight: var(--weight-bold);
}

.editor-panel__header p {
  margin-top: var(--s8);
  max-width: 280px;
  font-size: var(--label-size);
}

.editor-panel__content {
  display: grid;
}

.editor-panel__section {
  display: grid;
  gap: var(--s14);
  padding: var(--s24);
  border-bottom: 1px solid var(--border);
}

.editor-panel__section > .button,
.editor-panel__actions > .button,
.editor-retouch-grid .button {
  width: 100%;
}

.editor-section-label {
  color: var(--muted);
  font-size: var(--caption-size);
  font-weight: var(--weight-bold);
  letter-spacing: .4px;
}

.editor-ratio-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: var(--s10);
}

.editor-ratio-grid .button,
.editor-background-options .button {
  min-width: 0;
  padding-inline: var(--s8);
}

.editor-ratio-grid .button.is-active,
.editor-background-options .button.is-active {
  border-color: var(--orange);
  color: var(--orange);
  background: var(--orange-soft);
}

.editor-panel__actions details {
  border-top: 1px solid var(--border);
  padding-top: var(--s14);
}

.editor-panel__actions summary {
  cursor: pointer;
  font-weight: var(--weight-medium);
}

.editor-panel__actions .form-grid {
  margin-top: var(--s14);
  gap: var(--s12);
}

.editor-panel__note {
  padding: var(--s20) var(--s24);
  font-size: var(--caption-size);
}

.editor-sliders {
  gap: var(--s20);
}

.editor-slider {
  display: grid;
  gap: var(--s8);
}

.editor-slider > span {
  display: flex;
  justify-content: space-between;
  font-weight: var(--weight-medium);
}

.editor-slider output {
  color: var(--muted);
  font-weight: var(--weight-normal);
}

.editor-slider input[type="range"] {
  width: 100%;
  accent-color: var(--orange);
}

.editor-slider.is-disabled {
  opacity: .5;
}

.editor-background-options {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: var(--s8);
}

.editor-color-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.editor-color-control input {
  width: var(--s44);
  height: var(--s40);
  padding: var(--s4);
}

.editor-upload-placeholder {
  min-height: var(--s96);
  border: 1px dashed var(--border);
  border-radius: var(--radius-control);
  background: var(--surface);
}

.editor-retouch-grid {
  grid-template-columns: 1fr;
}

@media(max-width:1100px) {
  .editor-body {
    grid-template-columns: minmax(0,1fr) 340px;
  }
  .editor-stage {
    padding-inline: var(--s20) var(--s80);
  }
  .editor-canvas-frame {
    width: min(620px,calc(100vw - 440px));
  }
  .editor-quickbar button {
    font-size: 0;
  }
  .editor-quickbar svg {
    width: var(--s24);
    height: var(--s24);
  }
}

@media(max-width:780px) {
  .editor-workspace {
    height: auto;
    overflow: visible;
  }
  .editor-header {
    grid-template-columns: auto 1fr;
  }
  .editor-header h1 {
    justify-self: start;
  }
  .editor-header__actions {
    grid-column: 1/-1;
    width: 100%;
    justify-content: flex-end;
  }
  .editor-text-action,
  .editor-header__divider,
  [data-editor-undo],
  [data-editor-redo] {
    display: none;
  }
  .editor-body {
    display: flex;
    flex-direction: column;
  }
  .editor-stage {
    min-height: 62vh;
    height: 62vh;
    padding: var(--s72) var(--s16) var(--s86);
  }
  .editor-canvas-frame {
    width: min(100%,calc(100vw - var(--s32)));
    height: calc(62vh - var(--s160));
  }
  .editor-toolrail {
    top: var(--s12);
    right: var(--s12);
    transform: none;
    flex-direction: row;
  }
  .editor-toolrail button {
    width: var(--s42);
    height: var(--s42);
  }
  .editor-viewport-controls {
    top: var(--s12);
    left: var(--s12);
  }
  .editor-quickbar {
    bottom: var(--s12);
  }
  .editor-inspector {
    width: 100%;
    margin: 0;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    border-top: 1px solid var(--border);
  }
}
/* END: EditorWorkspace */

/* BEGIN: ProductDetail */
.product-detail-header {
  display: grid;
  grid-template-columns: var(--s44) 1fr auto;
  align-items: center;
  gap: var(--s16);
  padding-bottom: var(--s16);
  border-bottom: 1px solid var(--border);
}

.product-detail-header h1 {
  margin-top: var(--s2);
}

.product-detail-back,
.product-detail-expand {
  display: grid;
  place-items: center;
  width: var(--s44);
  height: var(--s44);
  border: 1px solid var(--border);
  border-radius: var(--radius-round);
  background: var(--white);
  color: var(--muted);
}

.product-detail-back svg,
.product-detail-expand svg {
  width: var(--s20);
  height: var(--s20);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.product-detail-header__actions {
  display: flex;
  align-items: center;
  gap: var(--s10);
}

.product-detail-layout {
  grid-template-columns: minmax(0,1.08fr) minmax(360px,.92fr);
  gap: var(--s56);
  margin-top: var(--s20);
}

body[data-page="product-detail"] .page {
  padding-top: var(--s24);
}

.product-detail-layout .detail__gallery {
  grid-template-columns: minmax(0,1fr);
}

.product-detail-media {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-width: 0;
  height: clamp(400px,calc(100vh - 360px),540px);
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.product-detail-media__main,
.product-detail-media__main .photo,
.product-detail-media__main video {
  width: 100%;
  height: 100%;
}

.product-detail-media__main .photo,
.product-detail-media__main video {
  border-radius: 0;
  object-fit: contain;
}

.product-detail-media__main video {
  background: var(--surface);
  pointer-events: none;
}

.product-detail-expand {
  position: absolute;
  left: var(--s20);
  bottom: var(--s20);
  box-shadow: var(--shadow-soft);
}

.product-detail-studio {
  position: absolute;
  left: 50%;
  bottom: var(--s20);
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: var(--s10);
  min-height: var(--control-height);
  padding: var(--s10) var(--s22);
  border: 1px solid var(--orange);
  border-radius: var(--radius-round);
  background: var(--orange);
  color: var(--white);
  font-weight: var(--weight-bold);
  box-shadow: var(--shadow-soft);
  white-space: nowrap;
}

.product-detail-studio:hover {
  background: var(--orange-hover);
}

.product-detail-media-list {
  padding: var(--s18);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--white);
}

.product-detail-media-list > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s16);
  margin-bottom: var(--s14);
}

.product-detail-media-list > header div {
  display: flex;
  align-items: baseline;
  gap: var(--s10);
}

.product-detail-media-list > header a {
  color: var(--orange);
  font-size: var(--label-size);
  font-weight: var(--weight-medium);
}

.product-detail-media-list .thumb-strip a,
.product-detail-media-list .thumb-strip button {
  flex-basis: var(--s72);
  width: var(--s72);
  height: var(--s72);
  background: var(--surface);
}

.product-detail-media-list .thumb-strip a.is-active,
.product-detail-media-list .thumb-strip button.is-active {
  border-color: var(--orange);
  box-shadow: 0 0 0 var(--s2) var(--orange-soft);
}

.product-detail-media-list .thumb-strip img {
  object-fit: cover;
}

.product-detail-summary {
  align-self: start;
  padding: var(--s20) 0;
}

.product-detail-context {
  display: flex;
  align-items: center;
  gap: var(--s10);
  color: var(--muted);
  font-size: var(--label-size);
  font-weight: var(--weight-medium);
}

.product-detail-summary > h1 {
  max-width: 620px;
  margin-top: var(--s16);
  font-size: var(--title-size);
  line-height: var(--title-line);
}

.product-detail-summary > p {
  max-width: 620px;
  margin-top: var(--s14);
  font-size: var(--body-size);
  line-height: var(--body-line);
}

.product-detail-section {
  margin-top: var(--s28);
  padding-top: var(--s22);
  border-top: 1px solid var(--border);
}

.product-detail-section h2 {
  font-weight: var(--weight-bold);
}

.product-detail-section .metadata {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 var(--s32);
  margin: var(--s16) 0 0;
}

.product-detail-section .metadata div {
  grid-template-columns: minmax(100px,.8fr) 1.2fr;
  gap: var(--s16);
}

.product-detail-section .metadata dd {
  font-weight: var(--weight-medium);
}

.product-detail-note p {
  margin: var(--s10) 0 var(--s18);
}

@media(max-width:1180px) {
  .product-detail-layout {
    gap: var(--s32);
    grid-template-columns: minmax(0,1fr) minmax(330px,.8fr);
  }

  .product-detail-summary > h1 {
    font-size: var(--task-size);
    line-height: var(--task-line);
  }

  .product-detail-summary > p {
    font-size: var(--body-size);
    line-height: var(--body-line);
  }

  .product-detail-section .metadata {
    grid-template-columns: 1fr;
  }
}

@media(max-width:780px) {
  .product-detail-header {
    grid-template-columns: var(--s44) 1fr;
  }

  .product-detail-header__actions {
    grid-column: 1/-1;
    justify-content: flex-end;
  }

  .product-detail-layout {
    grid-template-columns: 1fr;
    gap: var(--s24);
  }

  .product-detail-media {
    height: auto;
    aspect-ratio: 1;
    min-height: 0;
  }

  .product-detail-summary {
    padding-top: 0;
  }

  .product-detail-summary > h1 {
    font-size: var(--task-size);
    line-height: var(--task-line);
  }

  .product-detail-studio {
    left: auto;
    right: var(--s16);
    bottom: var(--s16);
    transform: none;
  }

  .product-detail-expand {
    left: var(--s16);
    bottom: var(--s16);
  }
}
/* END: ProductDetail */

/* BEGIN: StudioSelectionWorkspace */
.studio-page-shell {
  background: var(--surface);
  padding-block: var(--s16);
}

.studio-page {
  max-width: var(--page-max);
}

.studio-page__header {
  display: grid;
  grid-template-columns: var(--s44) 1fr;
  align-items: center;
  gap: var(--s16);
}

.studio-page__header h1 {
  margin-top: var(--s2);
  font-size: var(--task-size);
  line-height: var(--task-line);
}

.studio-page__back {
  display: grid;
  place-items: center;
  width: var(--s44);
  height: var(--s44);
  border: 1px solid var(--border);
  border-radius: var(--radius-round);
  background: var(--white);
  color: var(--muted);
  font-size: var(--task-size);
}

.studio--selection {
  grid-template-columns: minmax(500px,680px) minmax(360px,1fr);
  gap: var(--s24);
  margin-top: var(--s12);
  align-items: start;
}

.studio--selection > *,
.studio--selection .studio__choices,
.studio--selection [data-studio-options],
.studio-selection-card {
  min-width: 0;
}

.studio--selection .studio__choices,
.studio--selection [data-studio-options] {
  display: grid;
  gap: var(--s12);
}

.studio-selection-card,
.studio-advanced,
.studio-submit,
.studio-preview-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--white);
}

.studio-selection-card {
  padding: var(--s12);
}

.studio-selection-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s16);
  margin-bottom: var(--s6);
}

.studio-selection-card > header h2 {
  font-size: var(--body-size);
  font-weight: var(--weight-bold);
}

.studio-selection-card > header .button {
  border-color: rgba(255,101,0,.45);
  color: var(--orange);
  background: var(--white);
  min-height: var(--s32);
  padding: var(--s4) var(--s10);
}

.studio-source {
  display: grid;
  grid-template-columns: var(--s160) minmax(0,1fr);
  align-items: center;
  gap: var(--s18);
  width: 100%;
  max-width: 100%;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.studio-source > img {
  width: var(--s160);
  height: var(--s118);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--surface);
  object-fit: cover;
}

.studio-source > div {
  display: grid;
  gap: var(--s6);
  padding: 0;
}

.studio-source strong {
  font-size: var(--body-size);
}

.studio-source span,
.studio-selected-tile span {
  color: var(--muted);
}

.studio-selected-tile {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  width: var(--s230);
  max-width: 100%;
  overflow: hidden;
  border: 2px solid var(--orange);
  border-radius: var(--radius-card);
  background: var(--white);
}

.studio-selected-tile > img {
  width: 100%;
  height: var(--s142);
  border-radius: 0;
  object-fit: cover;
}

.studio-selected-tile > div {
  display: grid;
  gap: var(--s6);
  padding: var(--s12);
}

.studio-selected-tile strong {
  font-size: var(--body-size);
}

.studio-selected-check {
  position: absolute;
  top: var(--s8);
  right: var(--s8);
  display: grid;
  place-items: center;
  width: var(--s24);
  height: var(--s24);
  border-radius: var(--radius-round);
  background: var(--orange);
  color: var(--white) !important;
  font-weight: var(--weight-bold);
}

.studio-model-selection {
  display: grid;
  grid-template-columns: minmax(280px,310px) 1fr;
  align-items: start;
  gap: var(--s14);
}

.studio-tone-picker {
  display: grid;
  gap: var(--s6);
  margin-top: 0;
}

.studio-tone-picker > span {
  font-size: var(--label-size);
  font-weight: var(--weight-bold);
}

.studio-tone-picker > div,
.studio-choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s6);
}

.studio-tone-picker > div {
  display: grid;
  grid-template-columns: 1fr;
}

.studio-tone-picker button,
.studio-choice-row button {
  display: inline-flex;
  align-items: center;
  gap: var(--s8);
  min-height: var(--s32);
  padding: var(--s4) var(--s10);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--white);
  font-weight: var(--weight-medium);
}

.studio-tone-picker button.is-active,
.studio-choice-row button.is-active {
  border-color: var(--orange);
  background: var(--orange-soft);
  color: var(--orange);
}

.studio-tone-picker i {
  width: var(--s20);
  height: var(--s20);
  border: 1px solid rgba(16,24,40,.12);
  border-radius: var(--radius-round);
}

.studio-tone--light img,
img.studio-tone--light {
  filter: brightness(1.08) saturate(.9);
}

.studio-tone--medium img,
img.studio-tone--medium {
  filter: none;
}

.studio-tone--dark img,
img.studio-tone--dark {
  filter: brightness(.72) saturate(.82) sepia(.12);
}

.studio-gender-choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s16);
  margin-bottom: var(--s10);
}

.studio-gender-choice > span {
  font-size: var(--label-size);
  font-weight: var(--weight-bold);
}

.studio-gender-choice > div {
  display: grid;
  grid-template-columns: repeat(2,minmax(92px,1fr));
  gap: var(--s6);
}

.studio-gender-choice button {
  min-height: var(--s32);
  padding: var(--s4) var(--s16);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--ink);
  font-weight: var(--weight-medium);
}

.studio-gender-choice button.is-active {
  border-color: var(--orange);
  background: var(--orange-soft);
  color: var(--orange);
}

.studio-template-grid {
  display: grid;
  grid-auto-columns: var(--s128);
  grid-auto-flow: column;
  gap: var(--s8);
  overflow-x: auto;
  padding-bottom: var(--s4);
  width: 100%;
  max-width: 100%;
  scrollbar-width: thin;
}

.studio-template-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--white);
  text-align: left;
}

.studio-template-card.is-active {
  border: 2px solid var(--orange);
}

.studio-template-card > img {
  display: block;
  width: 100%;
  aspect-ratio: 1.28;
  object-fit: cover;
}

.studio-template-card > span:last-child {
  display: grid;
  gap: var(--s2);
  padding: var(--s6);
}

.studio-template-card strong,
.studio-template-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.studio-template-card strong {
  font-size: var(--label-size);
}

.studio-template-card small {
  color: var(--muted);
  font-size: 11px;
}

.studio-template-check {
  position: absolute;
  top: var(--s6);
  right: var(--s6);
  display: none;
  place-items: center;
  width: var(--s20);
  height: var(--s20);
  border-radius: var(--radius-round);
  background: var(--orange);
  color: var(--white);
  font-size: 11px;
  font-weight: var(--weight-bold);
}

.studio-template-card.is-active .studio-template-check {
  display: grid;
}

.studio-crop--1 > img {
  object-position: 62% center;
  transform: scale(1.08);
}

.studio-template-note {
  margin-top: var(--s8);
  color: var(--muted);
  font-size: var(--label-size);
}

.studio-advanced {
  overflow: hidden;
}

.studio-advanced summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s20);
  padding: var(--s12) var(--s14);
  list-style: none;
}

.studio-advanced summary::-webkit-details-marker {
  display: none;
}

.studio-advanced summary > span:first-child {
  display: grid;
  gap: var(--s4);
}

.studio-advanced summary small {
  font-weight: var(--weight-normal);
}

.studio-advanced__content {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: var(--s16);
  padding: 0 var(--s16) var(--s16);
}

.studio-output-size {
  grid-column: 1/-1;
  overflow: hidden;
  border: 1px solid rgba(255,101,0,.35);
  border-radius: var(--radius-control);
}

.studio-output-size > header {
  display: flex;
  align-items: center;
  gap: var(--s12);
  padding: var(--s10) var(--s12);
}

.studio-output-size > header > span:last-child {
  display: grid;
  gap: var(--s2);
}

.studio-output-size > header small {
  color: var(--muted);
}

.studio-output-size__icon {
  position: relative;
  width: var(--s36);
  height: var(--s36);
  border-radius: var(--radius-control);
  background: var(--orange-soft);
}

.studio-output-size__icon::before,
.studio-output-size__icon::after {
  position: absolute;
  content: '';
  border: 1.5px solid var(--orange);
}

.studio-output-size__icon::before {
  top: 9px;
  left: 12px;
  width: 12px;
  height: 15px;
}

.studio-output-size__icon::after {
  top: 6px;
  left: 9px;
  width: 12px;
  height: 15px;
  border-right: 0;
  border-bottom: 0;
}

.studio-ratio-grid {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: var(--s8);
  padding: var(--s10) var(--s12) var(--s12);
  border-top: 1px solid var(--border);
}

.studio-ratio-grid button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s8);
  min-height: var(--s52);
  padding: var(--s8);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--white);
}

.studio-ratio-grid button.is-active {
  border-color: var(--orange);
  color: var(--orange);
}

.studio-ratio-grid button > span {
  display: grid;
  text-align: left;
}

.studio-ratio-grid button small {
  color: var(--muted);
  font-weight: var(--weight-normal);
}

.studio-ratio-icon {
  display: block;
  border: 1.5px solid currentColor;
  border-radius: 3px;
}

.studio-ratio-icon--square { width: 18px; height: 18px; }
.studio-ratio-icon--portrait { width: 14px; height: 20px; }
.studio-ratio-icon--tall { width: 11px; height: 21px; }
.studio-ratio-icon--landscape { width: 22px; height: 13px; }

.studio-setting-group {
  display: grid;
  gap: var(--s10);
  padding: var(--s12);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
}

.studio-setting-group > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s12);
}

.studio-setting-group > header small {
  color: var(--muted);
}

.studio-setting-options {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: var(--s8);
}

.studio-setting-options button {
  min-height: var(--s40);
  padding: var(--s8);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--white);
  font-weight: var(--weight-medium);
}

.studio-setting-options button.is-active {
  border-color: var(--orange);
  background: var(--orange-soft);
  color: var(--orange);
}

.studio-setting-group--range input {
  width: 100%;
  accent-color: var(--orange);
}

.studio-variation-image-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: var(--s10);
}

.studio-variation-image-grid button {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--white);
  text-align: left;
}

.studio-variation-image-grid button.is-active {
  border: 2px solid var(--orange);
}

.studio-variation-image-grid img {
  display: block;
  width: 100%;
  height: var(--s96);
  background: var(--surface);
  object-fit: cover;
}

.studio-variation-image-grid button > span {
  display: grid;
  gap: var(--s2);
  padding: var(--s8);
}

.studio-variation-image-grid small {
  color: var(--muted);
}

.studio-variation-image-grid button > i {
  position: absolute;
  top: var(--s8);
  right: var(--s8);
  display: none;
  place-items: center;
  width: var(--s22);
  height: var(--s22);
  border-radius: var(--radius-round);
  background: var(--orange);
  color: var(--white);
  font-style: normal;
  font-weight: var(--weight-bold);
}

.studio-variation-image-grid button.is-active > i {
  display: grid;
}

.studio-submit {
  display: grid;
  gap: var(--s8);
  padding: var(--s10) var(--s14);
  text-align: center;
}

.studio-submit .button {
  width: 100%;
  min-height: var(--control-height);
  font-size: var(--body-size);
}

.studio-preview-panel {
  position: sticky;
  top: var(--s24);
  padding: var(--s18);
}

.studio-preview-panel > header {
  display: grid;
  gap: var(--s4);
}

.studio-preview-panel > header h2 {
  font-size: var(--section-small);
  font-weight: var(--weight-bold);
}

.studio--selection .preview {
  max-width: none;
  margin: var(--s12) 0;
  background: var(--surface);
}

.studio--selection .preview > p {
  max-width: 260px;
  text-align: center;
}

.studio--selection [data-result-actions] {
  gap: var(--s8);
}

.studio--selection [data-result-actions] .button {
  flex: 1 1 auto;
  padding-inline: var(--s12);
}

.studio-result-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.studio-picker-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: var(--s12);
  margin-top: var(--s20);
}

.studio-picker-card {
  display: grid;
  gap: var(--s6);
  padding: var(--s6);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--white);
  text-align: left;
}

.studio-picker-card.is-active {
  border: 2px solid var(--orange);
  color: var(--orange);
}

.studio-picker-card img {
  width: 100%;
  aspect-ratio: 1.35;
  border-radius: var(--radius-control);
  object-fit: cover;
}

.studio-model--hand-02 img,
.studio-model--wrist-02 img {
  object-position: 62% center;
  transform: scale(1.06);
}

.studio-model--hand-03 img,
.studio-model--neck-02 img,
.studio-model--ear-02 img {
  object-position: 38% center;
  transform: scale(1.1);
}

.studio-picker-card strong,
.studio-picker-card small {
  padding-inline: var(--s8);
}

.studio-picker-card small {
  padding-bottom: var(--s8);
}

.studio-variant-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: var(--s10);
}

.studio-variant-grid button {
  display: grid;
  grid-template-columns: var(--s28) 1fr;
  align-items: center;
  gap: var(--s10);
  min-height: var(--s52);
  padding: var(--s10);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--white);
  text-align: left;
}

.studio-variant-grid button.is-active {
  border-color: var(--orange);
  background: var(--orange-soft);
  color: var(--orange);
}

.studio-variant-grid button small {
  grid-column: 2;
}

.studio-variant-swatch {
  grid-row: 1/3;
  width: var(--s28);
  height: var(--s28);
  border: 1px solid var(--border);
  border-radius: var(--radius-round);
  background: #d9b45f;
}

.studio-variant-swatch--metal-1 { background: #e8e9ec; }
.studio-variant-swatch--metal-2 { background: #cf9b8e; }
.studio-variant-swatch--stone-0 { background: #f7f8fb; }
.studio-variant-swatch--stone-1 { background: #315dba; }
.studio-variant-swatch--stone-2 { background: #23865c; }
.studio-variant-swatch--stone-3 { background: #b72f3b; }
.studio-variant-swatch--stone-4 { background: #df8fb1; }
.studio-variant-swatch--stone-5 { background: #e2c847; }

@media(max-width:1180px) {
  .studio--selection {
    grid-template-columns: minmax(440px,1fr) minmax(320px,.8fr);
  }

  .studio-selected-tile {
    grid-template-columns: 1fr;
  }

  .studio-selected-tile > img {
    width: 100%;
  }

  .studio-model-selection {
    grid-template-columns: 1fr;
  }

  .studio-tone-picker > div {
    grid-template-columns: repeat(3,1fr);
  }

  .studio-template-grid { grid-auto-columns: var(--s128); }
}

@media(max-width:900px) {
  .studio--selection {
    grid-template-columns: 1fr;
  }

  .studio-preview-panel {
    position: static;
  }

  .studio-submit {
    position: sticky;
    bottom: var(--s12);
    z-index: var(--z-nav);
    box-shadow: var(--shadow-soft);
  }
}

@media(max-width:540px) {
  .studio-selection-card,
  .studio-preview-panel {
    padding: var(--s18);
  }

  .studio-selection-card > header {
    align-items: flex-start;
  }

  .studio-source {
    grid-template-columns: var(--s96) minmax(0,1fr);
    width: 100%;
  }

  .studio-source > img {
    width: var(--s96);
    height: var(--s86);
  }

  .studio-selected-tile {
    grid-template-columns: 1fr;
    max-width: none;
  }

  .studio-selected-tile > img {
    width: 100%;
    height: var(--s196);
  }

  .studio-advanced__content,
  .studio-variant-grid {
    grid-template-columns: 1fr;
  }

  .studio-picker-grid {
    grid-template-columns: 1fr 1fr;
  }

  .studio-gender-choice {
    align-items: stretch;
    flex-direction: column;
  }

  .studio-ratio-grid,
  .studio-variation-image-grid {
    grid-template-columns: repeat(2,1fr);
  }

  .studio-setting-options { grid-template-columns: 1fr; }

  .studio-launcher-grid { grid-template-columns: 1fr; }

  .dialog--studio {
    width: min(94vw,var(--modal));
    padding: var(--s20);
  }
}
/* END: StudioSelectionWorkspace */
