.planning-animation-pipeline-field {
  display: grid;
  grid-column: 1 / -1;
  gap: 5px;
  min-width: 0;
}

/* Desktop Planning shares Asset's identity panel and compact stage columns. */
@media (min-width: 768px) {
  .planning-plan-table.planning-animation-asset-table .planning-stage-cell-compact label > span {
    display: none;
  }
  .planning-plan-table.planning-animation-asset-table .planning-stage-cell-compact label {
    display: contents;
  }
  .planning-plan-table.planning-animation-asset-table .planning-stage-mandays-only {
    grid-template-columns: minmax(52px, 1fr) minmax(52px, 1fr);
  }
  .planning-plan-table.planning-animation-asset-table .planning-animation-shot-name-cell {
    min-width: 0;
    display: grid;
    gap: 6px;
  }
  .planning-plan-table.planning-animation-asset-table .planning-animation-input-column {
    width: 160px !important;
    min-width: 160px !important;
    vertical-align: middle;
  }
  .planning-plan-table.planning-animation-asset-table .planning-shot-row-preview-cell {
    width: 80px !important;
    min-width: 80px !important;
    text-align: center;
    vertical-align: middle;
  }
  .planning-plan-table.planning-animation-asset-table .planning-assignment-thumb-large-wrap {
    position: relative;
  }
  .planning-plan-table.planning-animation-asset-table .planning-assignment-thumb-large-wrap > .planning-plan-clear-btn {
    position: absolute;
    right: 3px;
    bottom: 3px;
  }
}
.planning-animation-plan-table.planning-animation-stage-plan-table {
  table-layout: auto !important;
  min-width: calc(900px + var(--planning-animation-stage-count, 1) * 190px);
}
.planning-animation-stage-plan-table .planning-stage-compact-cell {
  min-width: 180px;
}
.planning-animation-stage-plan-table .planning-stage-cell-compact label {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.planning-animation-stage-plan-table .planning-stage-cell-compact label > span {
  color: #9ca3af;
  font-size: 10px;
}
.planning-animation-stage-plan-table .planning-shot-plan-sub-head > .planning-animation-stage-subhead {
  width: auto !important;
  min-width: 180px !important;
  max-width: none !important;
  padding: 8px 4px;
}
.planning-animation-stage-subhead .planning-stage-num-grid > span {
  text-align: center;
}
.planning-animation-stage-plan-table .planning-stage-num-grid label > span {
  display: none;
}
.planning-animation-stage-subhead .planning-stage-mandays-only,
.planning-animation-stage-plan-table .planning-stage-mandays-only {
  grid-template-columns: 1fr;
}

/* Desktop Animation shot identity beside its workflow and controls. */
@media(min-width:768px){
 .animation-shot-stage-desktop{display:grid;grid-template-columns:clamp(240px,24vw,320px) minmax(0,1fr);gap:0;align-items:stretch;min-width:0;width:100%;padding:0}
 .animation-shot-identity{display:grid;grid-template-columns:clamp(80px,8vw,104px) minmax(0,1fr);min-width:0;border-right:1px solid #4b5563}
 .animation-shot-thumbnail{position:relative;width:100%;min-height:120px;display:flex;align-items:center;justify-content:center;overflow:hidden;background:#202020;border-radius:6px 0 0 6px}
 .animation-shot-thumbnail img{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:cover}
 .animation-shot-caption{flex:1;min-width:0;margin:0;text-align:left;font-size:14px;line-height:1.4;font-weight:750;overflow-wrap:anywhere}
 .animation-shot-identity-details{min-width:0;padding:16px 12px}
 .animation-shot-identity-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
 .animation-shot-stage-content{display:flex;flex-direction:column;gap:12px;min-width:0;padding:12px}
 .animation-shot-stage-top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;min-width:0}
 .animation-shot-stage-top>.assignment-stage-track{flex:1;min-width:0}
 .animation-shot-stage-edit-actions{display:flex;align-items:center;gap:8px;flex:none}
}

/* Override the shared right-opening Asset flyout at Animation's right edge. */
@media(min-width:768px){
 .animation-shot-stage-desktop [data-mobile-assignment-actions-menu="true"]{
  top:auto!important;left:auto!important;right:0!important;bottom:calc(100% + 8px)!important;transform:none!important;
  width:208px!important;min-width:208px!important;max-width:calc(100vw - 32px)!important;
  flex-direction:column!important;align-items:stretch!important;z-index:120!important;
 }
 .animation-shot-stage-desktop [data-mobile-assignment-actions-menu="true"]:not(.assignment-actions-menu-closed){display:flex!important}
 .animation-shot-stage-desktop [data-mobile-assignment-actions-menu="true"] button{
  width:100%!important;min-width:0!important;min-height:42px!important;line-height:1.4!important;
  border-right:0!important;border-bottom:1px solid rgba(75,85,99,.85)!important;padding:10px 12px!important;
 }
 .animation-shot-stage-desktop [data-mobile-assignment-actions-menu="true"] button:last-child{border-bottom:0!important}
}


/* Keep Animation actions visible within the narrower workflow column. */
@media(min-width:768px){
 .animation-shot-stage-desktop .assignment-selected-stage-panel{grid-template-columns:minmax(120px,1fr) minmax(96px,max-content) minmax(160px,240px)}
 .animation-shot-stage-desktop .assignment-selected-stage-panel-no-assignee{grid-template-columns:minmax(120px,1fr) minmax(96px,max-content)}
 .animation-shot-stage-desktop .assignment-selected-stage-actions{grid-column:1 / -1;border-left:0!important;border-top:1px solid rgba(107,114,128,.34)}
 .animation-shot-stage-desktop .assignment-selected-stage-actions-body{width:100%;flex-wrap:wrap;justify-content:flex-start;overflow:visible}
}

/* Use one row when the Animation workspace has room for all controls. */
@media(min-width:768px){
 .animation-shot-stage-content{container-type:inline-size}
}
@container(min-width:900px){
 .animation-shot-stage-desktop .assignment-selected-stage-panel{grid-template-columns:minmax(100px,360px) 124px 206px minmax(max-content,1fr)}
 .animation-shot-stage-desktop .assignment-selected-stage-panel-no-assignee{grid-template-columns:minmax(100px,360px) 124px minmax(max-content,1fr)}
 .animation-shot-stage-desktop .assignment-selected-stage-actions{grid-column:auto;border-top:0!important;border-left:1px solid rgba(107,114,128,.34)!important}
 .animation-shot-stage-desktop .assignment-selected-stage-actions-body{flex-wrap:nowrap;justify-content:flex-end}
 .animation-shot-stage-desktop .assignment-selected-stage-cell{padding:8px}
}

/* A scrub preview covers only the current pane while comparing two videos. */
#ai-movie-wrapper.animation-compare-open{--animation-seek-inset:var(--comparison-header-height,42px) 0 0 50%}

/* Mobile Animation sequence lives in the left drawer, opposite Notes & Versions. */
.animation-mobile-shots-list{display:flex;flex-direction:column;gap:10px}
.animation-mobile-shots-list>[id^="assignment-card-"]{width:100%;display:grid;grid-template-columns:96px minmax(0,1fr);align-items:center;flex:none}
.animation-mobile-shots-list>[id^="assignment-card-"]>div:first-child{height:80px}
.animation-mobile-shots-list>button{width:100%;min-height:64px}
