body.fabrication-3d-page {
    overflow-y: auto;
}

.web-sale-fixed-length-internal-page {
    background: #071018;
    overflow: auto;
}

.web-sale-fixed-length-internal-page .popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 13050;
    display: none;
    place-items: start center;
    padding: clamp(16px, 4vw, 32px);
    padding-top: clamp(24px, 8vh, 88px);
    background: rgba(4, 9, 14, 0.72);
    backdrop-filter: blur(4px);
}

.web-sale-fixed-length-internal-page .popup-overlay.show {
    display: grid;
}

.web-sale-fixed-length-internal-page .popup-overlay-content {
    display: grid;
    gap: 14px;
    width: min(100%, 520px);
    padding: 20px 22px 18px;
    border: 4px solid #79b7ff;
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(22, 31, 40, 0.99), rgba(16, 24, 33, 0.99));
    box-shadow: 0 24px 58px rgba(2, 7, 12, 0.52);
}

.web-sale-fixed-length-internal-page .popup-overlay-title,
.web-sale-fixed-length-internal-page #popup-message {
    color: #dce9f6;
}

.web-sale-fixed-length-internal-page #popup-message {
    margin: 0;
}

.web-sale-fixed-length-internal-page .popup-close-button {
    justify-self: end;
    min-height: 36px;
    padding: 0 14px;
    border: 0;
    border-radius: 8px;
    background: #2f80ed;
    color: #f8fbfc;
    cursor: pointer;
    font-weight: 700;
}

.fixed-length-studio {
    --fixed-length-summary-width: 360px;
    min-height: calc(100vh - 84px);
    display: grid;
    gap: 1rem;
    padding: 1rem;
    width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
    color: #dce9f6;
}

.fixed-length-studio__hero,
.fixed-length-studio__panel,
.fixed-length-studio__summary-panel {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid rgba(126, 154, 184, 0.16);
    background: #111;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.fixed-length-studio__summary {
    align-self: start;
    display: grid;
    gap: 14px;
    padding: 7px;
    border-radius: 18px;
    border: 1px solid rgba(128, 148, 171, 0.26);
    background: linear-gradient(180deg, rgba(31, 44, 60, 0.96), rgba(25, 36, 49, 0.94));
    box-shadow: 0 24px 52px rgba(6, 11, 16, 0.3);
    overflow: hidden;
}

.fixed-length-studio__summary-panel {
    height: 100%;
    min-height: 0;
    align-content: start;
    grid-auto-rows: max-content;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 18px;
    border: 1px solid rgba(121, 183, 255, 0.14);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(17, 25, 34, 0.96), rgba(12, 18, 24, 0.96)), rgba(7, 12, 17, 0.64);
    box-shadow: 0 16px 42px rgba(5, 9, 13, 0.24);
    scrollbar-width: thin;
    scrollbar-color: rgba(127, 158, 192, 0.45) transparent;
}

.fixed-length-studio__summary-panel::-webkit-scrollbar {
    width: 8px;
}

.fixed-length-studio__summary-panel::-webkit-scrollbar-thumb {
    background: rgba(127, 158, 192, 0.45);
    border-radius: 999px;
}

.fixed-length-studio__hero {
    display: grid;
    gap: 1rem;
    background: radial-gradient(circle at top right, rgba(121, 183, 255, 0.16), transparent 32%),
        linear-gradient(180deg, rgba(22, 31, 40, 0.96), rgba(16, 24, 33, 0.96));
}

#fixed-length-studio-app .fixed-length-studio__hero {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem;
    border-radius: 18px;
    border: 1px solid rgba(126, 154, 184, 0.18);
    background: #111;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 16px 30px rgba(10, 18, 26, 0.14);
}

#fixed-length-studio-app .fixed-length-studio__hero-copy {
    display: grid;
    gap: 0.35rem;
    max-width: 760px;
}

#fixed-length-studio-app .fixed-length-studio__eyebrow,
.purlin-sale-studio__hero .fixed-length-studio__eyebrow {
    font-size: 11px;
    letter-spacing: 0.12em;
}

.fixed-length-studio__eyebrow {
    font-size: 0.8rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #9bb7d3;
}

.fixed-length-studio__hero-copy h1,
.fixed-length-studio__panel h2,
.fixed-length-studio__summary-panel h2 {
    margin: 0;
    color: #eef6ff;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0;
}

#fixed-length-studio-app .fixed-length-studio__hero-copy h1 {
    font-size: 1.95rem;
    line-height: normal;
}

#fixed-length-studio-app .fixed-length-studio__hero-copy p {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
}

.fixed-length-studio__hero-copy p,
.fixed-length-studio__panel p,
.fixed-length-studio__summary-panel p {
    margin: 0.25rem 0 0;
    color: #9db5cb;
    font-size: 12px;
    line-height: 1.45;
}

@media (max-width: 1280px) {
    .web-page-shell:has(.purlin-sale-studio) > .web-sidebar,
    .web-page-shell:has(.fixed-length-studio) > .web-sidebar {
        display: none;
    }

    .web-page-shell:has(.purlin-sale-studio) > .web-page-shell__main,
    .web-page-shell:has(.fixed-length-studio) > .web-page-shell__main {
        grid-column: 1 / -1;
    }
}

.fixed-length-studio__hero-notes {
    display: grid;
    gap: 0.75rem;
}

.fixed-length-studio__hero-note {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 0.75rem;
    align-items: center;
    padding: 0.75rem;
    border-radius: 14px;
    background: rgba(7, 12, 18, 0.34);
    border: 1px solid rgba(126, 154, 184, 0.14);
}

.fixed-length-studio__hero-note strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: rgba(121, 183, 255, 0.16);
    color: #eef6ff;
}

.fixed-length-studio__hero-note span {
    font-size: 14.67px;
}

.fixed-length-studio__layout {
    display: grid;
    gap: 1rem;
    align-items: start;
}

.fixed-length-studio__workspace,
.fixed-length-studio__summary,
.fixed-length-studio__main {
    min-width: 0;
}

.fixed-length-studio__workspace,
.fixed-length-studio__summary {
    display: grid;
    gap: 1rem;
}

.fixed-length-studio__summary {
    position: static;
    align-self: start;
    gap: 14px;
}

.fixed-length-studio__summary-panel {
    display: grid;
    gap: 1rem;
    overflow-y: auto;
    overflow-x: hidden;
}

.fixed-length-studio__panel h1,
.fixed-length-studio__main-panel h2 {
    margin: 0;
    color: #eef6ff;
}

.fixed-length-studio__panel h1 {
    font-size: 1.55rem;
}

.fixed-length-studio__panel--header {
    display: grid;
    gap: 1rem;
}

.fixed-length-studio__toolbar,
.fixed-length-studio__compact-grid,
.fixed-length-studio__main,
.fixed-length-studio__metrics,
.fixed-length-studio__piece-list,
.fixed-length-studio__final-summary {
    display: grid;
    gap: 0.75rem;
}

.fixed-length-studio .button-link,
.fixed-length-studio button,
.fixed-length-studio input,
.fixed-length-studio select {
    min-height: 38px;
    border-radius: 10px;
    font-size: 12px;
    box-sizing: border-box;
}

.fixed-length-studio input,
.fixed-length-studio select,
.fixed-length-studio textarea {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid rgba(122, 146, 170, 0.28);
    background: rgba(18, 24, 31, 0.72);
    color: #eef6ff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.fixed-length-studio input:not([readonly]):not([type="hidden"]),
.fixed-length-studio select:not(:disabled),
.fixed-length-studio textarea:not([readonly]) {
    background: rgba(62, 68, 74, 0.94);
    border-color: rgba(162, 182, 202, 0.32);
}

.fixed-length-studio input[readonly],
.fixed-length-studio textarea[readonly],
.fixed-length-studio input:disabled,
.fixed-length-studio select:disabled,
.fixed-length-studio textarea:disabled {
    background: rgba(18, 24, 31, 0.72);
}

.fixed-length-studio input,
.fixed-length-studio select {
    height: 38px;
    line-height: 1.2;
}

.fixed-length-studio textarea {
    max-width: none;
    margin: 0;
    padding-left: 10px;
    font-size: 12px;
    line-height: 1.45;
}

.fixed-length-studio input::placeholder,
.fixed-length-studio textarea::placeholder {
    color: rgba(229, 238, 247, 0.78);
}

.fixed-length-studio input[type="number"] {
    appearance: textfield;
}

.fixed-length-studio input[type="number"]::-webkit-outer-spin-button,
.fixed-length-studio input[type="number"]::-webkit-inner-spin-button {
    margin: 0;
}

.fixed-length-studio button,
.fixed-length-studio .button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    min-height: 38px;
    padding: 0 12px;
    text-decoration: none;
    font-weight: 600;
}

.fixed-length-studio button[hidden],
.fixed-length-studio .button-link[hidden] {
    display: none;
}

.fixed-length-studio__summary-panel > .warm:not([id*="update"])::before,
.fixed-length-studio__summary-panel [class$="__summary-actions"] > .warm:not([id*="update"])::before {
    content: "";
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    background: url('/images/cart-white.png') center / contain no-repeat;
}

.fixed-length-studio__summary-panel > .warm[hidden]::before,
.fixed-length-studio__summary-panel [class$="__summary-actions"] > .warm[hidden]::before {
    content: none;
}

.fixed-length-studio button.secondary,
.fixed-length-studio .button-link.secondary {
    background: linear-gradient(180deg, rgba(52, 72, 90, 0.98), rgba(35, 49, 62, 0.98));
    border: 1px solid rgba(126, 154, 184, 0.24);
    color: #dce9f6;
}

.fixed-length-studio button.warm,
.fixed-length-studio .button-link.warm {
    background: linear-gradient(180deg, #4aa84f 0%, #38973d 100%);
    border: 1px solid rgba(57, 181, 74, 0.48);
    color: #111111;
    box-shadow: 0 0.8rem 1.8rem rgba(56, 151, 61, 0.22);
}

.fixed-length-studio button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.fixed-length-studio button.warm:hover,
.fixed-length-studio button.warm:focus-visible,
.fixed-length-studio .button-link.warm:hover,
.fixed-length-studio .button-link.warm:focus-visible {
    background: linear-gradient(180deg, #72cb73 0%, #39B54A 100%);
    color: #111111;
    box-shadow: 0 1rem 2.2rem rgba(57, 181, 74, 0.28);
}

.fixed-length-studio__section-header {
    display: grid;
    gap: 0.15rem;
    padding: 0.75rem 0.9rem;
    border-radius: 10px;
    background: #111;
    margin-bottom: 0.65rem;
}

.fixed-length-studio__section-header--summary,
.fixed-length-studio__section-header--embedded {
    background: radial-gradient(circle at top right, rgba(121, 183, 255, 0.16), transparent 32%),
        linear-gradient(180deg, rgba(22, 31, 40, 0.96), rgba(16, 24, 33, 0.96));
}

.fixed-length-studio__section-header-row {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
}

.fixed-length-studio__section-header-row--summary {
    align-items: center;
}

.fixed-length-studio__section-header-copy {
    min-width: 0;
}

.fixed-length-studio__section-header-copy h2,
.fixed-length-studio__summary-panel h2 {
    font-size: 20px;
    line-height: 1.2;
}

.fixed-length-studio__section-header-copy p,
.fixed-length-studio__summary-panel p {
    font-size: 12px;
    line-height: 1.45;
}

.fixed-length-studio__section-header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    min-width: 0;
}

.fixed-length-studio__section-header-actions--summary {
    flex-wrap: wrap;
}

.fixed-length-studio__add-to-cart,
.fixed-length-studio__return-link {
    width: 100%;
}

.fixed-length-studio__add-to-cart[hidden],
.fixed-length-studio__return-link[hidden] {
    display: none !important;
}

.fixed-length-studio__summary-header-btn {
    min-height: 32px !important;
    padding: 0 10px !important;
    font-size: 11px !important;
    white-space: nowrap;
}

.fixed-length-studio__add-to-cart {
    min-height: 38px;
    border: 1px solid rgba(57, 181, 74, 0.48);
    border-radius: 10px;
    background: linear-gradient(180deg, #4aa84f 0%, #38973d 100%);
    color: #111111;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    padding: 0 12px;
    box-shadow: 0 0.8rem 1.8rem rgba(56, 151, 61, 0.22);
}

.fixed-length-studio__add-to-cart:hover,
.fixed-length-studio__add-to-cart:focus-visible {
    background: linear-gradient(180deg, #72cb73 0%, #39B54A 100%);
    color: #111111;
    box-shadow: 0 1rem 2.2rem rgba(57, 181, 74, 0.28);
}

.fixed-length-studio__return-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid rgba(126, 154, 184, 0.24);
    background: linear-gradient(180deg, rgba(52, 72, 90, 0.98), rgba(35, 49, 62, 0.98));
    color: #dce9f6;
    text-decoration: none;
    font-weight: 600;
}

.fixed-length-studio__section-header-action {
    margin-left: auto;
    align-self: flex-start;
    min-width: 104px;
    white-space: nowrap;
}

#fixed-length-cuts-details > .fixed-length-studio__section-header {
    padding-top: 0.45rem;
}

.fixed-length-studio__field {
    display: grid;
    gap: 0.3rem;
    min-width: 0;
    width: 100%;
}

.fixed-length-studio__field > span {
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #9bb7d3;
}

.fixed-length-studio__header-controls {
    display: grid;
    gap: 0.85rem;
}

.fixed-length-studio__search-field-row,
.fixed-length-studio__mode-selector-row,
.fixed-length-studio__stock-selector-row {
    display: grid;
    gap: 0.75rem;
}

.fixed-length-studio__search-field-row {
    grid-template-columns: minmax(0, 1fr) auto;
}

.fixed-length-studio__search-toggle {
    min-width: 40px;
    padding: 0;
}

.fixed-length-studio__stock-selector-row {
    grid-template-columns: minmax(0, 1fr) minmax(120px, 160px);
    align-items: end;
}

.fixed-length-studio__stock-selector-row--sheet {
    grid-template-columns: minmax(170px, 0.9fr) minmax(120px, 160px);
}

.fixed-length-studio__stock-selector-row--header {
    grid-template-columns: minmax(0, 1fr) minmax(140px, 180px);
}

.fixed-length-studio__stock-selector-row--sheet-materials {
    grid-template-columns: minmax(150px, 0.8fr) minmax(0, 1.35fr) minmax(130px, 170px);
    align-items: end;
}

.fixed-length-studio__stock-selector-row--custom {
    grid-template-columns: minmax(0, 1fr) minmax(140px, 180px);
}

.fixed-length-studio__stock-selector-row--custom > .fixed-length-studio__field {
    display: none;
}

.fixed-length-studio__toggle-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.fixed-length-studio__toggle-row--cut-type {
    gap: 0.85rem;
    margin-left: 100px;
}

.fixed-length-studio__checkbox-row {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    width: fit-content;
    font-size: 12px;
    font-weight: 600;
    color: #eef6ff;
    cursor: pointer;
}

.fixed-length-studio__checkbox-row input[type="checkbox"],
.fixed-length-studio__checkbox-row input[type="radio"] {
    width: 18px;
    height: 18px;
    min-height: 18px;
    accent-color: #eef6ff;
    cursor: pointer;
}

.fixed-length-studio__mode-selector-row {
    grid-template-columns: minmax(0, 1fr);
    margin-bottom: 0.75rem;
}

.fixed-length-studio__compact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.fixed-length-studio__compact-grid--triple {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.fixed-length-studio__mode-help {
    padding: 0.75rem 0.85rem;
    border-radius: 12px;
    border: 1px solid rgba(121, 183, 255, 0.14);
    background: rgba(7, 12, 17, 0.42);
    color: #c9ddf0;
    font-size: 12px;
    line-height: 1.45;
}

.fixed-length-studio .is-hidden {
    display: none;
}

.fixed-length-studio__details-panel {
    padding: 0;
    overflow: hidden;
}

.fixed-length-studio__details-summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px;
    cursor: pointer;
}

.fixed-length-studio__details-summary::after {
    content: '+';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid rgba(121, 183, 255, 0.18);
    background: rgba(7, 12, 17, 0.52);
    color: #eef6ff;
    font-size: 18px;
    line-height: 1;
}

.fixed-length-studio__details-panel[open] .fixed-length-studio__details-summary::after {
    content: '-';
}

.fixed-length-studio__details-summary::-webkit-details-marker {
    display: none;
}

.fixed-length-studio__details-content {
    display: grid;
    gap: 0.85rem;
    padding: 0 14px 14px;
}

.fixed-length-studio__details-content--standalone {
    padding: 0;
}

.fixed-length-studio__section-header--embedded {
    margin-bottom: 0;
}

.fixed-length-studio__cut-panel {
    display: grid;
    gap: 0.75rem;
}

.fixed-length-studio__cut-actions {
    display: flex;
    justify-content: flex-start;
}

.fixed-length-studio__add-cut-btn {
    min-width: 96px;
}

.fixed-length-studio__stock-card h3,
.fixed-length-studio__mini-header h4,
.fixed-length-studio__section-header h3 {
    margin: 0;
    color: #eef6ff;
    font-size: 13px;
}

.fixed-length-studio__mini-header span,
.fixed-length-studio__stock-qty span,
.fixed-length-studio__mini-header span {
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #9bb7d3;
}

.fixed-length-studio__mini-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.55rem;
}

.fixed-length-studio__requirements-table--advanced th,
.fixed-length-studio__requirements-table--advanced td {
    padding: 0.45rem;
}

.fixed-length-studio__requirements-table--cut-list th,
.fixed-length-studio__requirements-table--cut-list td {
    padding: 0.5rem;
    text-align: center;
    vertical-align: middle;
}

.fixed-length-studio__requirements-table--cut-list th:last-child,
.fixed-length-studio__requirements-table--cut-list td:last-child {
    width: 48px;
}

.fixed-length-studio__requirements-table--cut-list th:first-child,
.fixed-length-studio__requirements-table--cut-list td:first-child {
    min-width: 60px;
    width: 1%;
}

.fixed-length-studio__requirements-table--advanced input,
.fixed-length-studio__requirements-table--advanced select {
    min-height: 34px;
    padding: 6px 8px;
    font-size: 11px;
}

.fixed-length-studio__requirements-table--cut-list input,
.fixed-length-studio__requirements-table--cut-list select {
    text-align: center;
}

.fixed-length-studio__requirements-table--cut-list .fixed-length-studio__cut-input--label {
    text-align: left;
}

.fixed-length-studio__toolbar--advanced {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.fixed-length-studio__final-summary textarea {
    display: block;
    width: 100%;
    max-width: none;
    min-width: 0;
    min-height: 132px;
    resize: vertical;
    box-sizing: border-box;
}

.fixed-length-studio__final-summary {
    gap: 0;
}

.fixed-length-studio__sale-description {
    min-height: 168px;
    resize: vertical;
}

.fixed-length-studio__search-results,
.fixed-length-studio__selected-product,
.fixed-length-studio__empty-card {
    border-radius: 12px;
    border: 1px solid rgba(121, 183, 255, 0.14);
    background: rgba(7, 12, 17, 0.42);
}

.fixed-length-studio__search-results {
    display: none;
    overflow: hidden;
}

.fixed-length-studio__search-results.is-visible {
    display: grid;
}

.fixed-length-studio__search-option {
    width: 100%;
    border: 0;
    border-bottom: 1px solid rgba(121, 183, 255, 0.12);
    background: transparent;
    color: #eef6ff;
    text-align: left;
    padding: 0.75rem 0.85rem;
}

.fixed-length-studio__search-option:last-child {
    border-bottom: 0;
}

.fixed-length-studio__search-option strong,
.fixed-length-studio__search-option span {
    display: block;
}

.fixed-length-studio__search-option span {
    margin-top: 0.2rem;
    color: #9db5cb;
}

.fixed-length-studio__selected-product,
.fixed-length-studio__empty-card {
    padding: 0.8rem 0.9rem;
    color: #dce9f6;
}

.fixed-length-studio__selected-product {
    margin-top: 0.85rem;
}

.fixed-length-studio__selected-product dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem 0.85rem;
    margin: 0;
}

.fixed-length-studio__selected-product dt {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #9bb7d3;
}

.fixed-length-studio__selected-product dd {
    margin: 0.2rem 0 0;
    color: #eef6ff;
    font-weight: 600;
    font-size: 10pt;
}

.fixed-length-studio__requirements-table-wrap {
    overflow: auto;
    border-radius: 12px;
    border: 1px solid rgba(121, 183, 255, 0.14);
}

.fixed-length-studio__requirements-table-wrap--cut-list {
    overflow-x: hidden;
    overflow-y: visible;
}

.fixed-length-studio__requirements-table {
    width: 100%;
    min-width: 100%;
    border-collapse: collapse;
}

.fixed-length-studio__requirements-table th,
.fixed-length-studio__requirements-table td {
    padding: 0.55rem;
    border-bottom: 1px solid rgba(121, 183, 255, 0.1);
    font-size: 12px;
}

.fixed-length-studio__requirements-table th {
    text-align: left;
    color: #9bb7d3;
    text-transform: uppercase;
    font-size: 10px;
    background: rgba(11, 17, 23, 0.55);
}

.fixed-length-studio__requirements-table input {
    min-width: 0;
}

.fixed-length-studio__requirements-table .secondary {
    min-width: 32px;
    padding: 0;
}

.fixed-length-studio__requirements-table--cut-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    width: 100%;
    min-width: 0;
    padding: 0.35rem;
    container-type: inline-size;
}

.fixed-length-studio__cut-list-head,
.fixed-length-studio__cut-list-body {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.fixed-length-studio__cut-list-head {
    display: none;
}

.fixed-length-studio__cut-row {
    --fixed-length-cut-gap: 0.35rem;
    --fixed-length-cut-preview-width: 76px;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.4rem;
    padding: 0.85rem;
    border-radius: 18px;
    border: 1px solid rgba(128, 148, 171, 0.26);
    background: linear-gradient(180deg, rgba(31, 44, 60, 0.96), rgba(25, 36, 49, 0.94));
    box-shadow: 0 24px 52px rgba(6, 11, 16, 0.24);
    overflow: hidden;
}

.fixed-length-studio__cut-cell,
.fixed-length-studio__cut-head-cell {
    flex: 0 0 auto;
    min-width: 0;
}

.fixed-length-studio__cut-mitre-line {
    display: contents;
}

.fixed-length-studio__cut-actions-line {
    display: flex;
    flex: 0 0 auto;
    justify-content: flex-end;
    align-items: flex-end;
    min-width: 0;
    gap: 0.15rem;
    margin-left: 0;
}

.fixed-length-studio__cut-cell {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 0;
}

.fixed-length-studio__cut-cell::before {
    content: attr(data-label);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #8eaac3;
    line-height: 1.1;
}

.fixed-length-studio__cut-head-cell {
    color: #9bb7d3;
    text-transform: uppercase;
    font-size: 10px;
    line-height: 1.2;
}

.fixed-length-studio__cut-cell--preview {
    flex-basis: 76px;
    width: 76px;
}

.fixed-length-studio__cut-cell--type {
    flex-basis: 114px;
    width: 114px;
}

.fixed-length-studio__cut-cell--qty {
    flex-basis: 68px;
    width: 68px;
}

.fixed-length-studio__cut-cell--length {
    flex-basis: 88px;
    width: 88px;
}

.fixed-length-studio__cut-cell--label {
    flex: 1 1 132px;
    width: auto;
    min-width: 104px;
    max-width: none;
}

.fixed-length-studio__cut-cell--face {
    flex-basis: 118px;
    width: 118px;
}

.fixed-length-studio__cut-cell--angle {
    flex-basis: 67px;
    width: 67px;
}

.fixed-length-studio__cut-cell--direction {
    flex-basis: 82px;
    width: 82px;
}

.fixed-length-studio__cut-cell--action {
    flex-basis: 42px;
    width: 42px;
}

.fixed-length-studio__cut-cell--action::before {
    text-align: center;
}

.fixed-length-studio__requirements-table--cut-list input,
.fixed-length-studio__requirements-table--cut-list select {
    display: block;
    width: 100%;
    min-width: 0;
    margin: 0;
    height: 36px;
    min-height: 36px;
    padding: 8px 10px;
    border: 1px solid rgba(122, 146, 170, 0.28);
    border-radius: 12px;
    background: rgba(7, 12, 17, 0.52);
    color: #eef6ff;
    box-sizing: border-box;
    text-align: center;
}

.fixed-length-studio__requirements-table--cut-list select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 40px;
    background-image:
        linear-gradient(45deg, transparent 50%, rgba(182, 209, 233, 0.88) 50%),
        linear-gradient(135deg, rgba(182, 209, 233, 0.88) 50%, transparent 50%),
        linear-gradient(180deg, rgba(18, 29, 40, 0.96), rgba(8, 12, 17, 0.9));
    background-position:
        calc(100% - 18px) calc(50% - 2px),
        calc(100% - 12px) calc(50% - 2px),
        0 0;
    background-size: 6px 6px, 6px 6px, 100% 100%;
    background-repeat: no-repeat;
}

.fixed-length-studio__requirements-table--cut-list .fixed-length-studio__cut-input--label {
    text-align: left;
}

.fixed-length-studio__requirements-table--cut-list .fixed-length-studio__cut-input--mitre-dir {
    padding-right: 28px;
    padding-left: 8px;
    background-position:
        calc(100% - 14px) calc(50% - 2px),
        calc(100% - 8px) calc(50% - 2px),
        0 0;
    background-size: 5px 5px, 5px 5px, 100% 100%;
    text-align: left;
}

.fixed-length-studio__requirements-table--cut-list .secondary {
    min-width: 36px;
    margin-left: auto;
    margin-right: auto;
}

.fixed-length-studio__cut-actions-line .fixed-length-studio__cut-cell--action {
    align-self: end;
}

.fixed-length-studio__requirements-table--sheet-panels th:first-child,
.fixed-length-studio__requirements-table--sheet-panels td:first-child {
    width: 88px;
}

.fixed-length-studio__requirements-table--sheet-panels th:nth-child(2),
.fixed-length-studio__requirements-table--sheet-panels td:nth-child(2),
.fixed-length-studio__requirements-table--sheet-panels th:nth-child(3),
.fixed-length-studio__requirements-table--sheet-panels td:nth-child(3),
.fixed-length-studio__requirements-table--sheet-panels th:nth-child(4),
.fixed-length-studio__requirements-table--sheet-panels td:nth-child(4) {
    width: 92px;
}

.fixed-length-studio__requirements-table--sheet-panels th:nth-child(5),
.fixed-length-studio__requirements-table--sheet-panels td:nth-child(5) {
    width: auto;
    text-align: left;
}

.fixed-length-studio__requirements-table--sheet-panels th:nth-child(6),
.fixed-length-studio__requirements-table--sheet-panels td:nth-child(6) {
    width: 42px;
    padding-left: 0.2rem;
    padding-right: 0.2rem;
}

.fixed-length-studio__row-name {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    font-size: 11px;
    font-weight: 700;
    color: #eef6ff;
    white-space: nowrap;
}

.fixed-length-studio__requirements-table--sheet-panels .fixed-length-studio__cut-input--label {
    min-width: 5.5ch;
    text-align: left;
}

.fixed-length-studio__cut-input--qty {
    min-width: 4.5ch;
}

.fixed-length-studio__cut-input--length {
    min-width: 5.5ch;
}

.fixed-length-studio__cut-input--label {
    min-width: 96px;
    text-align: left;
}

.fixed-length-studio__row-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.fixed-length-studio__row-preview {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    width: 100%;
    min-width: 0;
    padding: 0 0.4rem;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(52, 72, 90, 0.98), rgba(35, 49, 62, 0.98)) !important;
    border: 1px solid rgba(126, 154, 184, 0.24) !important;
    color: #dce9f6 !important;
    font-size: 10px !important;
    white-space: nowrap;
}

.fixed-length-studio__row-preview.is-active {
    background: linear-gradient(180deg, #e1a262, #c77e39) !important;
    border: 1px solid rgba(185, 116, 52, 0.48) !important;
    color: #1b0f04 !important;
}

.fixed-length-studio__row-preview.has-processing {
    border-color: rgba(119, 199, 140, 0.45) !important;
    box-shadow: inset 0 0 0 1px rgba(119, 199, 140, 0.18);
}

.fixed-length-studio__row-preview-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}

.fixed-length-studio__row-preview-label svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.fixed-length-studio__row-preview-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: rgba(119, 199, 140, 0.16);
    color: #bfe9c7;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.fixed-length-studio__cut-row.is-processed {
    background: linear-gradient(180deg, rgba(31, 44, 60, 0.96), rgba(25, 36, 49, 0.94));
}

.fixed-length-studio__cut-row.is-active {
    border-color: rgba(185, 116, 52, 0.48);
    box-shadow: 0 24px 52px rgba(6, 11, 16, 0.24), inset 0 0 0 1px rgba(199, 126, 57, 0.16);
}

.fixed-length-studio__cut-row.is-active.is-processed {
    background: linear-gradient(180deg, rgba(31, 44, 60, 0.96), rgba(25, 36, 49, 0.94));
}

.fixed-length-studio__row-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    padding: 0;
}

.fixed-length-studio__row-icon svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
}

.fixed-length-studio__row-edit {
    background: linear-gradient(180deg, rgba(103, 150, 123, 0.98), rgba(83, 130, 130, 0.65)) !important;
    border: 1px solid rgba(103, 150, 123, 0.48) !important;
    color: #1b0f04 !important;
}

.fixed-length-studio__row-delete {
    width: 36px;
    height: 36px;
    min-width: 36px;
    padding: 0;
    border-radius: 12px;
    background: rgba(118, 32, 32, 0.24) !important;
    border: 1px solid rgba(255, 127, 127, 0.32) !important;
    color: #ffd8d8 !important;
}

.fixed-length-studio__metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7.5px;
}

.fixed-length-studio__metrics--summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7.5px;
}

.fixed-length-studio__metrics .metric {
    gap: 2px;
    padding: 8px 9px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(48, 62, 76, 0.98), rgba(29, 40, 51, 0.98));
    border: 1px solid rgba(182, 196, 209, 0.26);
}

.fixed-length-studio__metrics .metric span {
    display: block;
    margin: 0;
    font-size: 9px;
    line-height: 1.25;
    font-weight: 700;
    color: #9bb7d3;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.fixed-length-studio__metrics .metric strong {
    display: block;
    margin: 0;
    font-size: 12.33px;
    line-height: 1.25;
    color: #eef6ff;
}

.fixed-length-studio__metrics--summary .metric:nth-child(n + 4) {
    grid-column: 1 / -1;
}

@media (max-width: 980px) {
    .fixed-length-studio__metrics--summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .fixed-length-studio__metrics--summary {
        grid-template-columns: minmax(0, 1fr);
    }
}

.fixed-length-studio__viewport-pill {
    flex: 0 0 auto;
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
    background: rgba(121, 183, 255, 0.12);
    border: 1px solid rgba(121, 183, 255, 0.22);
    color: #d8ecff;
    font-size: 10px;
    font-weight: 700;
}

.fixed-length-studio__viewport-shell {
    position: relative;
    min-height: min(calc(100vh - 176px), 860px);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(121, 183, 255, 0.14);
    background: rgba(7, 12, 17, 0.42);
}

.fixed-length-editor-overlay {
    position: fixed;
    inset: 0;
    z-index: 12100;
    display: grid;
    place-items: center;
    padding: 1.25rem;
    isolation: isolate;
    pointer-events: auto;
}

.fixed-length-editor-overlay.is-hidden {
    display: none;
}

.fixed-length-editor-overlay__backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: rgba(5, 9, 12, 0.72);
    backdrop-filter: blur(6px);
}

.fixed-length-editor-overlay__dialog {
    position: relative;
    z-index: 1;
    width: min(1380px, 100%);
    max-height: calc(100vh - 2.5rem);
    display: grid;
    gap: 0.85rem;
    overflow: auto;
    padding: 1rem;
    border-radius: 18px;
    border: 1px solid rgba(126, 154, 184, 0.16);
    background: linear-gradient(180deg, rgba(22, 31, 40, 0.98), rgba(16, 24, 33, 0.98));
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.fixed-length-editor-overlay__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.fixed-length-editor-overlay__header h2 {
    margin: 0;
    color: #eef6ff;
}

.fixed-length-editor-overlay__header p {
    margin: 0.25rem 0 0;
    color: #9db5cb;
    font-size: 12px;
    line-height: 1.45;
}

.fixed-length-editor-overlay__close {
    width: 38px;
    min-width: 38px;
    height: 38px;
    font-size: 20px;
}

.fixed-length-editor-overlay__frame-shell {
    min-height: min(calc(100vh - 180px), 980px);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(121, 183, 255, 0.14);
    background: rgba(7, 12, 17, 0.42);
}

.fixed-length-editor-overlay__frame {
    width: 100%;
    min-height: min(calc(100vh - 180px), 980px);
    border: 0;
    background: rgba(7, 12, 17, 0.42);
}

.fixed-length-optimizer-overlay {
    position: fixed;
    inset: 0;
    z-index: 12150;
    display: grid;
    place-items: center;
    padding: 1.25rem;
    isolation: isolate;
    pointer-events: auto;
}

.fixed-length-optimizer-overlay.is-hidden {
    display: none;
}

.fixed-length-optimizer-overlay__backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: rgba(5, 9, 12, 0.72);
    backdrop-filter: blur(6px);
}

.fixed-length-optimizer-overlay__dialog {
    position: relative;
    z-index: 1;
    width: min(1720px, 100%);
    max-height: calc(100vh - 2.5rem);
    display: grid;
    gap: 0.85rem;
    overflow: auto;
    padding: 1rem;
    border-radius: 18px;
    border: 1px solid rgba(126, 154, 184, 0.16);
    background: linear-gradient(180deg, rgba(22, 31, 40, 0.98), rgba(16, 24, 33, 0.98));
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.fixed-length-optimizer-overlay__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.fixed-length-optimizer-overlay__header h2 {
    margin: 0;
    color: #eef6ff;
}

.fixed-length-optimizer-overlay__header p {
    margin: 0.25rem 0 0;
    color: #9db5cb;
    font-size: 12px;
    line-height: 1.45;
}

.fixed-length-optimizer-overlay__close {
    width: 38px;
    min-width: 38px;
    height: 38px;
    font-size: 20px;
}

.fixed-length-optimizer-overlay__frame-shell {
    min-height: min(calc(100vh - 180px), 980px);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(121, 183, 255, 0.14);
    background: rgba(7, 12, 17, 0.42);
}

.fixed-length-optimizer-overlay__frame {
    width: 100%;
    min-height: min(calc(100vh - 180px), 980px);
    border: 0;
    background: rgba(7, 12, 17, 0.42);
}

@container (max-width: 900px) {
    .fixed-length-studio__cut-row {
        align-items: flex-start;
    }

    .fixed-length-studio__cut-actions-line {
        margin-left: 0;
    }

    .fixed-length-studio__cut-cell--label {
        min-width: 0;
    }

    .fixed-length-studio__cut-cell--action {
        width: 38px;
    }
}

@media (min-width: 769px) {
    #fixed-length-studio-app .fixed-length-studio__hero {
        grid-template-columns: minmax(0, 1fr);
    }

    .fixed-length-studio__hero {
        grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr);
        align-items: start;
    }

    .fixed-length-studio__layout {
        grid-template-columns: minmax(0, 1fr) var(--fixed-length-summary-width);
    }

    .fixed-length-studio__summary {
        position: sticky;
        top: 1rem;
        width: var(--fixed-length-summary-width);
        height: calc(100dvh - 1rem - 24px);
        max-height: calc(100dvh - 1rem - 24px);
    }
}

@media (max-width: 768px) {
    .web-page-shell:has(.purlin-sale-studio),
    .web-page-shell:has(.fixed-length-studio) {
        width: 100%;
        margin: 0;
    }

    .fixed-length-studio__summary {
        position: static;
        width: 100%;
        height: auto;
        max-height: none;
    }
}

@media (max-width: 760px) {
    .fixed-length-studio {
        width: min(100%, calc(100% - 12px));
        padding: 0.35rem 0 1rem;
    }

    .fixed-length-studio__hero,
    .fixed-length-studio__panel,
    .fixed-length-studio__summary-panel {
        padding: 0.85rem;
    }

    .fixed-length-studio__compact-grid,
    .fixed-length-studio__compact-grid--triple,
    .fixed-length-studio__metrics,
    .fixed-length-studio__stock-selector-row,
    .fixed-length-studio__stock-selector-row--sheet-materials,
    .fixed-length-studio__toolbar--advanced {
        grid-template-columns: 1fr;
    }

    .fixed-length-studio__main-panel-header {
        flex-direction: column;
        align-items: stretch;
    }

    .fixed-length-studio__section-header-row {
        flex-direction: column;
    }

    .fixed-length-studio__section-header-action {
        margin-left: 0;
    }

    .fixed-length-studio__section-header-actions {
        margin-left: 0;
        justify-content: flex-start;
    }

    .fixed-length-studio__hero,
    .fixed-length-studio__hero-note {
        grid-template-columns: minmax(0, 1fr);
    }

    .fixed-length-studio__viewport-pill {
        align-self: flex-start;
    }

    .fixed-length-studio__requirements-table--cut-list {
        gap: 0.25rem;
    }

    .fixed-length-studio__cut-list-head,
    .fixed-length-studio__cut-row {
        gap: 0.25rem;
    }

    .fixed-length-studio__cut-row {
        padding: 0.55rem;
        --fixed-length-cut-preview-width: 56px;
        gap: 0.45rem;
    }

    .fixed-length-studio__cut-cell--preview {
        flex: 1 1 calc(50% - 0.225rem);
        width: auto;
    }

    .fixed-length-studio__cut-cell--qty {
        flex: 1 1 calc(50% - 0.225rem);
        width: auto;
    }

    .fixed-length-studio__cut-cell--type {
        flex: 1 1 calc(50% - 0.225rem);
        width: auto;
    }

    .fixed-length-studio__cut-cell--length {
        flex: 1 1 calc(50% - 0.225rem);
        width: auto;
    }

    .fixed-length-studio__requirements-table--cut-list input,
    .fixed-length-studio__requirements-table--cut-list select {
        padding: 6px 4px;
        font-size: 11px;
    }

    .fixed-length-studio__cut-input--qty {
        min-width: 3ch;
    }

    .fixed-length-studio__cut-input--length {
        min-width: 4ch;
    }

    .fixed-length-studio__cut-input--label {
        min-width: 64px;
    }

    .fixed-length-studio__cut-cell--face {
        flex: 1 1 calc(50% - 0.225rem);
        width: auto;
    }

    .fixed-length-studio__cut-cell--angle {
        flex: 1 1 calc(50% - 0.225rem);
        width: auto;
    }

    .fixed-length-studio__cut-cell--direction {
        flex: 1 1 calc(50% - 0.225rem);
        width: auto;
    }

    .fixed-length-studio__cut-cell--label {
        flex: 1 1 calc(50% - 0.225rem);
        width: auto;
    }

    .fixed-length-studio__cut-cell--action {
        flex-basis: 34px;
        width: 34px;
    }

    .fixed-length-studio__cut-actions-line {
        flex: 1 1 100%;
        justify-content: flex-start;
        margin-left: 0;
    }

    .fixed-length-studio__cut-cell::before {
        font-size: 9px;
    }

    .fixed-length-studio__requirements-table--cut-list .secondary {
        min-width: 28px;
    }

    .fixed-length-studio__requirements-table--sheet-panels th:nth-child(4),
    .fixed-length-studio__requirements-table--sheet-panels td:nth-child(4) {
        width: 72px;
    }

    .fixed-length-studio__requirements-table--sheet-panels th:nth-child(5),
    .fixed-length-studio__requirements-table--sheet-panels td:nth-child(5) {
        width: auto;
    }

    .fixed-length-editor-overlay,
    .fixed-length-optimizer-overlay {
        padding: 0.5rem;
    }

    .fixed-length-editor-overlay__dialog,
    .fixed-length-optimizer-overlay__dialog {
        max-height: calc(100vh - 1rem);
        padding: 0.8rem;
    }

    .fixed-length-editor-overlay__header,
    .fixed-length-optimizer-overlay__header {
        flex-direction: column;
        align-items: stretch;
    }

    .fixed-length-editor-overlay__frame-shell,
    .fixed-length-editor-overlay__frame,
    .fixed-length-optimizer-overlay__frame-shell,
    .fixed-length-optimizer-overlay__frame {
        min-height: 520px;
    }
}
