/* Prevent a first-child margin from changing the card coordinate system when
   the score grid becomes the two-column route. These styles are scoped to this
   workbench; page movement continues to use CalculatorSheetMotion's timing. */
.calc-plan-workbench {display:flow-root;overflow-anchor:none;}
.calc-plan-workbench .calc-score-cards {position:relative;overflow-anchor:none;}
.calc-plan-workbench.plan-motion-active :is(.calc-plan-card,.calc-plan-detail) {will-change:transform,opacity;transition:none!important;}
.calc-plan-workbench.plan-motion-active .calc-plan-detail {will-change:transform,opacity,clip-path;}
.calc-plan-arrow {display:inline-block;}

/* The portrait route shares the selected card's full-width column. Keep its
   table scroll local instead of widening the whole score-planning page. */
@media (orientation:portrait) {
 .calc-plan-workbench.plan-detail-open {min-width:0;width:100%;grid-template-columns:minmax(0,1fr);gap:0;align-content:start;}
 .calc-plan-workbench.plan-detail-open > .calc-score-cards {margin:12px 0 20px;}
 .calc-plan-workbench.plan-detail-open > .calc-plan-detail {margin:0;width:100%;box-sizing:border-box;transform-origin:top left;}
 .calc-plan-detail .table-scroll {max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;}
 .calc-plan-arrow {transform:rotate(90deg);}
}
