.section-note {
    margin: 0;
    color: var(--text-secondary);
    font-size: max(var(--mobile-font-min, 0px), calc(13px * var(--mobile-font-scale, 1)));
}

.section-divider-card {
    border: 1px solid #dfe6f2;
    border-radius: var(--border-radius-md);
    background: #ffffff;
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.section-divider-title {
    margin: 0;
    font-size: clamp(18px, 3.2vw, 24px);
    line-height: 1.2;
    text-align: center;
    text-wrap: balance;
}

.section-divider-body {
    margin: 0;
    font-size: max(var(--mobile-font-min, 0px), calc(14px * var(--mobile-font-scale, 1)));
    line-height: 1.45;
    color: var(--text-secondary);
    text-align: center;
    max-width: 100%;
    overflow-wrap: normal;
    word-break: normal;
    text-wrap: pretty;
}

.cycle-loop-part-card {
    border: 1px solid #dfe6f2;
    border-radius: 12px;
    background: #ffffff;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cycle-loop-part-kicker {
    margin: 0;
    font-size: max(var(--mobile-font-min, 0px), calc(12px * var(--mobile-font-scale, 1)));
    color: #5f6f8d;
    text-align: center;
    text-wrap: pretty;
}

.cycle-loop-part-title {
    margin: 0;
    font-size: max(var(--mobile-font-min, 0px), calc(14px * var(--mobile-font-scale, 1)));
    line-height: 1.25;
    text-align: center;
    text-wrap: balance;
}

.cycle-loop-part-body {
    margin: 0;
    font-size: max(var(--mobile-font-min, 0px), calc(13px * var(--mobile-font-scale, 1)));
    line-height: 1.4;
    color: #4f5d77;
    text-align: center;
    text-wrap: pretty;
}

.align-bottom {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 100%;
    gap: 10px;
}

.center-field-screen {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}

.centered-text-input {
    text-align: center;
}

.textarea-field,
.text-field {
    width: 100%;
    border: 1px solid #d9dbe1;
    border-radius: var(--border-radius-md);
    background: #fff;
    font-family: inherit;
    font-size: max(var(--mobile-font-min, 0px), calc(16px * var(--mobile-font-scale, 1)));
    color: var(--text-main);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.textarea-field {
    padding: 12px 14px;
    resize: none;
    line-height: 1.45;
}

.text-field {
    padding: 12px 14px;
    height: 48px;
}

.textarea-field:focus,
.text-field:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.12);
}

.character-counter {
    text-align: right;
    color: var(--text-secondary);
    font-size: max(var(--mobile-font-min, 0px), calc(11px * var(--mobile-font-scale, 1)));
    margin-top: -1px;
}

.option-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.option-card {
    border-radius: var(--border-radius-md);
    border: 1px solid #e1e3e8;
    background: #fff;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    justify-content: center;
    min-height: 140px;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.option-card:hover {
    border-color: #b8d8ff;
    transform: translateY(-1px);
}

.option-card.selected {
    border-color: var(--primary-color);
    box-shadow: 0 8px 18px rgba(0, 122, 255, 0.18);
    background: linear-gradient(180deg, #f8fcff 0%, #edf6ff 100%);
}

.option-visual,
.result-option-visual {
    width: min(100%, 120px);
    aspect-ratio: 1 / 1;
    height: auto;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 10px;
    box-sizing: border-box;
}

.option-visual {
    border: 1px dashed #d6dae3;
    color: #9aa1ad;
    font-size: max(var(--mobile-font-min, 0px), calc(12px * var(--mobile-font-scale, 1)));
    background: #fcfcff;
}

.option-visual img,
.result-option-visual img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.option-title {
    margin: 0;
    font-size: max(var(--mobile-font-min, 0px), calc(14px * var(--mobile-font-scale, 1)));
    font-weight: 600;
    max-width: 100%;
    overflow-wrap: normal;
    word-break: normal;
    text-wrap: pretty;
}

.flow-board {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.flow-card {
    background: #fff;
    border: 1px solid #e1e3e8;
    border-radius: var(--border-radius-md);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 320px;
}

.flow-card.actor-card {
    max-height: none;
    min-height: 100%;
    height: 100%;
}

.flow-card h3 {
    margin: 0;
    font-size: max(var(--mobile-font-min, 0px), calc(14px * var(--mobile-font-scale, 1)));
    font-weight: 700;
}

.flow-card-direction-title {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 2px 0;
}

.flow-card-direction-icon {
    height: 52px;
    width: auto;
    display: block;
}

.flow-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    padding-top: 4px;
    padding-bottom: 2px;
    padding-right: 2px;
}

.actor-flow-list {
    flex: 1 1 auto;
    max-height: none;
}

.flow-card.actor-card .flow-item {
    height: 48px;
}

.flow-card.actor-card .flow-input-wrap {
    height: 48px;
    min-height: 48px;
}

.flow-item {
    display: flex;
    align-items: stretch;
    min-height: 48px;
}

.actor-check {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    flex: 0 0 18px;
    align-self: center;
}

.flow-input-wrap {
    position: relative;
    width: 100%;
    display: flex;
    align-items: stretch;
    height: 100%;
    min-height: 48px;
}

.flow-input-wrap .text-field {
    display: block;
    height: 100%;
    padding-right: 46px;
}

.field-trash-btn {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #7a7f8a;
}

.field-trash-btn:hover {
    background: #f3f5f9;
}

.field-trash-btn svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
}

.icon-btn {
    border: 1px solid #d9dbe1;
    background: #fff;
    color: #4a4f59;
    border-radius: 10px;
    min-width: 38px;
    height: 38px;
    cursor: pointer;
    font-size: max(var(--mobile-font-min, 0px), calc(14px * var(--mobile-font-scale, 1)));
}

.icon-btn:hover {
    background: #f5f7fb;
}

.add-btn {
    border: none;
    background: #ecf5ff;
    color: #005bcc;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: max(var(--mobile-font-min, 0px), calc(13px * var(--mobile-font-scale, 1)));
    font-weight: 600;
    cursor: pointer;
}

.add-btn.full-width-add {
    width: 100%;
}

.slider-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.slider-card {
    border-radius: var(--border-radius-md);
    border: 2px solid #d7e6fb;
    background: linear-gradient(180deg, #ffffff 0%, #f6fbff 100%);
    box-shadow: 0 10px 24px rgba(6, 72, 155, 0.1);
    padding: 18px 14px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 360px;
    min-width: 0;
    justify-self: center;
}

.slider-card.slider-disabled {
    opacity: 0.58;
}

.slider-title {
    margin: 0;
    font-size: max(var(--mobile-font-min, 0px), calc(15px * var(--mobile-font-scale, 1)));
    font-weight: 700;
    color: #203352;
}

.slider-direction-title {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    min-height: 52px;
    gap: 6px;
}

.slider-summation-sign {
    font-size: max(var(--mobile-font-min, 0px), calc(31px * var(--mobile-font-scale, 1)));
    line-height: 1;
    font-weight: 300;
    color: #203352;
    transform: translateY(-25%);
}

.slider-direction-icon {
    height: 52px;
    width: auto;
    display: block;
}

.vertical-slider-wrap {
    flex: 1;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    min-height: clamp(220px, 34vw, 320px);
    overflow: hidden;
}

.vertical-slider {
    -webkit-appearance: none;
    appearance: none;
    width: clamp(200px, 30vw, 300px);
    height: 36px;
    background: transparent;
    display: block;
    margin: 0 auto;
    padding: 0;
    transform: rotate(-90deg);
    transform-origin: center;
}

.vertical-slider::-webkit-slider-runnable-track {
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(180deg, #d9e9ff 0%, #e9f3ff 100%);
    border: 1px solid #c4dbfb;
}

.vertical-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.22);
    margin-top: -13px;
}

.vertical-slider.slider-in::-webkit-slider-thumb {
    background: #1e9b4f;
}

.vertical-slider.slider-out::-webkit-slider-thumb {
    background: #d63c3c;
}

.vertical-slider::-moz-range-track {
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(180deg, #d9e9ff 0%, #e9f3ff 100%);
    border: 1px solid #c4dbfb;
}

.vertical-slider::-moz-range-thumb {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.22);
}

.vertical-slider.slider-in::-moz-range-thumb {
    background: #1e9b4f;
}

.vertical-slider.slider-out::-moz-range-thumb {
    background: #d63c3c;
}

.vertical-slider:disabled {
    cursor: not-allowed;
}

.vertical-slider:disabled::-webkit-slider-thumb,
.vertical-slider:disabled::-moz-range-thumb {
    box-shadow: none;
}

.slider-comparison-text {
    margin: 0;
    padding: 12px clamp(18px, 10vw, 120px);
    border: 1px solid #d7e6fb;
    border-radius: 10px;
    background: #f9fcff;
    font-size: max(var(--mobile-font-min, 0px), calc(14px * var(--mobile-font-scale, 1)));
    line-height: 1.4;
    color: #24344e;
    text-align: center;
    max-width: 100%;
    overflow-wrap: normal;
    word-break: normal;
    text-wrap: balance;
}

@media (max-width: 640px) {
    .vertical-slider-wrap {
        min-height: clamp(190px, 50vw, 250px);
    }

    .vertical-slider {
        width: clamp(170px, 44vw, 220px);
    }
}

.qa-stack {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.qa-card {
    border: 1px solid #dfe2ea;
    border-radius: var(--border-radius-md);
    background: #fff;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.qa-question {
    border: 1px solid #eef1f7;
    border-radius: 10px;
    padding: 10px;
    background: #fcfdff;
    margin: 0;
    font-size: max(var(--mobile-font-min, 0px), calc(13px * var(--mobile-font-scale, 1)));
    color: var(--text-secondary);
    max-width: 100%;
    overflow-wrap: normal;
    word-break: normal;
    text-wrap: pretty;
}

.qa-answer {
    margin: 0;
}

.label-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.label-group label {
    font-size: max(var(--mobile-font-min, 0px), calc(13px * var(--mobile-font-scale, 1)));
    color: var(--text-secondary);
}

.acc-actions {
    display: flex;
    justify-content: flex-end;
}

.acc-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    overflow-y: auto;
}

.acc-card {
    border: 1px solid #e1e3e8;
    border-radius: var(--border-radius-md);
    background: #fff;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.acc-card-header {
    position: relative;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.acc-card-header span {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: max(var(--mobile-font-min, 0px), calc(12px * var(--mobile-font-scale, 1)));
    color: var(--text-secondary);
    font-weight: 600;
    text-align: center;
}

.stock-diagram {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    overflow: hidden;
}

.stock-side-svg {
    height: 49px;
    width: auto;
    display: block;
    flex: 0 0 auto;
}

.stock-center {
    flex: 1 1 auto;
    width: 100%;
    max-width: 300px;
    border: 2px solid #121212;
    border-radius: 8px;
    padding: 0 10px;
    height: 100px;
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0;
}

.editable-stock-center {
    cursor: text;
}

.stock-center:focus-within {
    border-color: #0b66dd;
    box-shadow: 0 0 0 4px rgba(11, 102, 221, 0.14);
}

.stock-input {
    border: none;
    width: 100%;
    display: block;
    resize: none;
    overflow-y: hidden;
    font-family: inherit;
    font-size: max(var(--mobile-font-min, 0px), calc(14px * var(--mobile-font-scale, 1)));
    line-height: 1.35;
    text-align: center;
    outline: none;
    background: transparent;
    border-radius: 0;
    padding: 4px 8px;
}

.stock-input::placeholder {
    transform: none;
    text-align: center;
}

.stock-input:focus {
    box-shadow: none;
}

.stock-label {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    border: none;
    box-shadow: none;
    background: transparent;
    user-select: none;
    pointer-events: none;
    overflow-wrap: normal;
    word-break: normal;
    text-wrap: pretty;
}

.stock-counter {
    position: absolute;
    right: 10px;
    bottom: 8px;
    font-size: max(var(--mobile-font-min, 0px), calc(10px * var(--mobile-font-scale, 1)));
    line-height: 1;
    color: var(--text-secondary);
    pointer-events: none;
    user-select: none;
}

.cycle-board {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.cycle-column {
    border-radius: var(--border-radius-md);
    border: 1px solid #e1e3e8;
    background: #fff;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 220px;
}

.cycle-column.refuerzo {
    background: linear-gradient(180deg, #fff9f8 0%, #fff 100%);
    border-color: #f3cdcb;
}

.cycle-column.balance {
    background: linear-gradient(180deg, #f5faff 0%, #fff 100%);
    border-color: #bedcff;
}

.cycle-column h3 {
    margin: 0;
    font-size: max(var(--mobile-font-min, 0px), calc(14px * var(--mobile-font-scale, 1)));
    font-weight: 700;
}

.cycle-column-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 2px;
}

.cycle-type-badge {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    text-align: center;
}

.cycle-type-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 100%;
}

.cycle-type-icon svg {
    width: 100%;
    height: auto;
    display: block;
}

.cycle-type-icon img {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    object-fit: contain;
    display: block;
}

.cycle-type-caption {
    margin: -3px 0 0;
    font-size: max(var(--mobile-font-min, 0px), calc(13px * var(--mobile-font-scale, 1)));
    line-height: 1.25;
    font-weight: 700;
    color: #3f4a60;
    text-wrap: balance;
}

.cycle-column-type-label {
    font-size: max(var(--mobile-font-min, 0px), calc(14px * var(--mobile-font-scale, 1)));
    letter-spacing: 0.01em;
}

.cycle-dropzone {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 90px;
}

.cycle-item {
    border: 1px solid #d9dbe1;
    background: #fff;
    border-radius: 12px;
    padding: 8px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px;
    align-items: center;
}

.cycle-item input {
    border: none;
    outline: none;
    font: inherit;
    font-size: max(var(--mobile-font-min, 0px), calc(14px * var(--mobile-font-scale, 1)));
    color: var(--text-main);
}

.inline-add {
    display: flex;
    justify-content: center;
}

.select-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
}

.select-card {
    border: 1px solid #d9dbe1;
    background: #fff;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    cursor: pointer;
    text-align: left;
}

.select-card > * {
    min-width: 0;
}

.select-card.selected {
    border-color: var(--primary-color);
    background: #f3f9ff;
}

.flow-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
    align-items: flex-start;
    flex-wrap: nowrap;
    min-width: 0;
}

.flow-meta strong {
    font-size: max(var(--mobile-font-min, 0px), calc(14px * var(--mobile-font-scale, 1)));
    line-height: 1.2;
    overflow-wrap: normal;
    word-break: normal;
}

.flow-meta span {
    font-size: max(var(--mobile-font-min, 0px), calc(14px * var(--mobile-font-scale, 1)));
    line-height: 1.2;
    color: var(--text-secondary);
    overflow-wrap: normal;
    word-break: normal;
}

.check-pill {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    border: 2px solid #b8bec9;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: max(var(--mobile-font-min, 0px), calc(12px * var(--mobile-font-scale, 1)));
    flex: 0 0 18px;
    color: #fff;
}

.check-pill.right {
    margin-left: auto;
}

.select-card.selected .check-pill {
    border-color: #0b66dd;
    background: #0b66dd;
}

.acc-select-card {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    column-gap: 10px;
}

.readonly-stock-diagram {
    width: 100%;
    min-width: 0;
    justify-content: center;
}

.square-name {
    border: 1px solid #dfe2ea;
    border-radius: 8px;
    padding: 10px;
    background: #fdfdff;
    font-size: max(var(--mobile-font-min, 0px), calc(14px * var(--mobile-font-scale, 1)));
    font-weight: 600;
    max-width: 100%;
    overflow-wrap: normal;
    word-break: normal;
    text-wrap: pretty;
}

.direction-tag {
    min-width: 84px;
    text-align: center;
    border-radius: 999px;
    padding: 4px 8px;
    font-size: max(var(--mobile-font-min, 0px), calc(11px * var(--mobile-font-scale, 1)));
    font-weight: 700;
    margin-left: auto;
}

.direction-tag.entrada {
    color: #0857c9;
    background: #e9f2ff;
}

.direction-tag.salida {
    color: #835305;
    background: #fff2df;
}

.delay-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.delay-flow-widget {
    width: 100%;
    display: flex;
    justify-content: center;
    min-width: 0;
    margin-bottom: 30px;
}

.delay-flow-widget.compact .delay-flow-side {
    gap: 2px;
    width: clamp(92px, 20vw, 136px);
}

.delay-flow-widget.compact .delay-flow-side-svg {
    height: 40px;
}

.delay-flow-widget.compact .delay-flow-name {
    font-size: max(var(--mobile-font-min, 0px), calc(11px * var(--mobile-font-scale, 1)));
    max-width: 100%;
}

.delay-flow-widget.compact .delay-flow-stock {
    min-height: 68px;
    height: auto;
    max-width: 162px;
    width: clamp(124px, 31vw, 162px);
    padding: 6px 8px;
}

.delay-flow-widget.compact .delay-flow-stock-label {
    font-size: max(var(--mobile-font-min, 0px), calc(13px * var(--mobile-font-scale, 1)));
}

.delay-flow-widget.compact {
    margin-bottom: 0;
}

.delay-flow-widget-track {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    min-width: 0;
    max-width: 100%;
}

.delay-flow-widget-track.reverse {
    flex-direction: row-reverse;
}

.delay-flow-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    flex: 0 0 auto;
    min-width: 0;
    width: clamp(118px, 24vw, 188px);
}

.delay-flow-widget-track.entrada .delay-flow-side {
    align-items: flex-end;
}

.delay-flow-widget-track.salida .delay-flow-side {
    align-items: flex-start;
}

.delay-flow-side-svg {
    height: 52px;
    width: auto;
    display: block;
}

.delay-flow-name {
    margin: 0;
    font-size: max(var(--mobile-font-min, 0px), calc(14px * var(--mobile-font-scale, 1)));
    line-height: 1.2;
    font-weight: 700;
    text-align: center;
    width: 100%;
    max-width: 100%;
    padding: 0 8px;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
    text-wrap: pretty;
}

.delay-flow-stock {
    border: 2px solid #121212;
    border-radius: 8px;
    min-height: 100px;
    height: auto;
    width: clamp(152px, 40vw, 208px);
    padding: 8px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    flex: 1 1 auto;
    max-width: 208px;
}

.delay-flow-stock-label {
    font-size: max(var(--mobile-font-min, 0px), calc(14px * var(--mobile-font-scale, 1)));
    line-height: 1.3;
    text-align: center;
    padding: 0 6px;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
    text-wrap: pretty;
}

.flow-select-delay-card {
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.flow-select-delay-card .delay-flow-widget {
    min-width: 0;
    flex: 1 1 auto;
}

.delay-card {
    border: 1px solid #d9dbe1;
    background: #fff;
    border-radius: 12px;
    padding: 14px;
    cursor: pointer;
}

.delay-card.selected {
    border-color: var(--primary-color);
    background: #f3f9ff;
}

.delay-card h3 {
    margin: 0 0 5px;
    font-size: max(var(--mobile-font-min, 0px), calc(15px * var(--mobile-font-scale, 1)));
    line-height: 1.25;
    text-align: center;
    overflow-wrap: normal;
    word-break: normal;
    text-wrap: balance;
}

.delay-card p {
    margin: 0 auto;
    font-size: max(var(--mobile-font-min, 0px), calc(13px * var(--mobile-font-scale, 1)));
    color: var(--text-secondary);
    line-height: 1.35;
    text-align: center;
    max-width: 38ch;
    overflow-wrap: normal;
    word-break: normal;
    text-wrap: balance;
}

.results-tab-manager {
    position: sticky;
    top: calc(66px + env(safe-area-inset-top));
    z-index: 45;
    border: 1px solid #dbe2ef;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 20px rgba(25, 59, 124, 0.08);
    padding: 8px;
}

.results-tab-list {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
}

.results-tab-list::-webkit-scrollbar {
    display: none;
}

.results-tab-btn {
    border: 1px solid #d6deed;
    background: #f7f9fe;
    color: #42506d;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: max(var(--mobile-font-min, 0px), calc(12px * var(--mobile-font-scale, 1)));
    line-height: 1.1;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.results-tab-btn.active {
    background: var(--primary-gradient);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 5px 14px rgba(0, 122, 255, 0.25);
}

.result-export-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.result-export-btn {
    width: 100%;
    border: none;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: max(var(--mobile-font-min, 0px), calc(14px * var(--mobile-font-scale, 1)));
    font-weight: 600;
    cursor: pointer;
}

.result-export-btn.primary {
    background: var(--primary-gradient);
    color: #fff;
}

.result-export-btn.secondary {
    background: #eef3fb;
    border: 1px solid #d4ddec;
    color: #30405c;
}

.result-export-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.result-pdf-page {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.result-pdf-page-title {
    margin: 0;
    text-align: center;
    font-size: 24px;
    line-height: 1.2;
    font-weight: 700;
    color: #1f2d46;
}

.results-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

.result-group {
    border: 1px solid #dfe2ea;
    border-radius: var(--border-radius-md);
    background: #fff;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.result-group h3 {
    margin: 0;
    font-size: max(var(--mobile-font-min, 0px), calc(17px * var(--mobile-font-scale, 1)));
    text-align: center;
}

.result-subsection {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.result-subsection-title {
    margin: 0;
    font-size: max(var(--mobile-font-min, 0px), calc(14px * var(--mobile-font-scale, 1)));
    color: #3f4a60;
    font-weight: 700;
    text-align: left;
}

.result-subcard {
    border: 1px solid #ebedf3;
    border-radius: 12px;
    padding: 12px;
    background: #fcfcff;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.result-subcard h4 {
    margin: 0;
    font-size: max(var(--mobile-font-min, 0px), calc(13px * var(--mobile-font-scale, 1)));
    font-weight: 700;
}

.result-cycle-type {
    padding-bottom: 2px;
}

.result-cycle-name {
    margin: 0;
    font-size: max(var(--mobile-font-min, 0px), calc(14px * var(--mobile-font-scale, 1)));
    font-weight: 700;
    line-height: 1.25;
    color: #2d3649;
    text-align: center;
    max-width: 100%;
    overflow-wrap: normal;
    word-break: normal;
    text-wrap: balance;
}

.result-flow-subcard {
    gap: 18px;
}

.result-flow-subcard.flat {
    border: none;
    background: transparent;
    padding: 0;
}

.result-flow-subcard.accumulation-result-card {
    padding-top: 22px;
}

.result-stock-diagram {
    justify-content: center;
    overflow: visible;
    margin-bottom: 6px;
}

.result-stock-center {
    max-width: min(300px, 100%);
    height: 82px;
}

.result-stock-label {
    font-size: max(var(--mobile-font-min, 0px), calc(13px * var(--mobile-font-scale, 1)));
    font-weight: 400;
}

.result-flow-split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 0;
}

.result-flow-metrics-subcard {
    border: 1px solid #dfe6f2;
    border-radius: 10px;
    background: #ffffff;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.result-flow-column {
    border-radius: 10px;
    border: 1px solid #dde4f0;
    background: #fff;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.result-flow-column.entrada {
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.result-flow-column.salida {
    background: linear-gradient(180deg, #fffafa 0%, #ffffff 100%);
}

.result-flow-column-title {
    margin: 0;
    font-size: max(var(--mobile-font-min, 0px), calc(12px * var(--mobile-font-scale, 1)));
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #4a5873;
    text-align: center;
}

.result-flow-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.result-flow-item {
    border: 1px solid #e5eaf3;
    border-radius: 8px;
    background: #fff;
    padding: 6px 8px;
    font-size: max(var(--mobile-font-min, 0px), calc(12px * var(--mobile-font-scale, 1)));
    font-weight: 400;
    line-height: 1.35;
    text-align: center;
    max-width: 100%;
    overflow-wrap: normal;
    word-break: normal;
    text-wrap: pretty;
}

.result-flow-item.empty {
    color: var(--text-secondary);
    font-style: italic;
}

.result-cycle-flow-widget {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.result-cycle-flows-card {
    border: 1px solid #dfe6f2;
    border-radius: 10px;
    background: #ffffff;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.result-cycle-flows-title {
    margin: 0;
    font-size: max(var(--mobile-font-min, 0px), calc(12px * var(--mobile-font-scale, 1)));
    font-weight: 700;
    color: #4a5873;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.result-cycle-flow-column {
    padding: 10px;
}

.result-cycle-flow-title-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2px 0;
}

.result-cycle-flow-direction-icon {
    height: 52px;
    width: auto;
    display: block;
}

.result-cycle-flow-table {
    margin-top: 2px;
}

.result-cycle-flow-name-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.result-cycle-flow-name {
    font-size: max(var(--mobile-font-min, 0px), calc(12px * var(--mobile-font-scale, 1)));
    line-height: 1.3;
    color: #2d3649;
    max-width: 100%;
    overflow-wrap: normal;
    word-break: normal;
    text-wrap: pretty;
}

.result-cycle-flow-scope {
    font-size: max(var(--mobile-font-min, 0px), calc(11px * var(--mobile-font-scale, 1)));
    line-height: 1.25;
    color: #6a7894;
    max-width: 100%;
    overflow-wrap: normal;
    word-break: normal;
    text-wrap: pretty;
}

.result-cycle-flow-empty {
    color: var(--text-secondary);
}

.result-cycle-flow-row.active td {
    background: #eef6ff;
    border-top-color: #b8d8ff;
    border-bottom-color: #b8d8ff;
}

.result-cycle-flow-row.active td:first-child {
    border-left-color: #b8d8ff;
}

.result-cycle-flow-row.active td:last-child {
    border-right-color: #b8d8ff;
}

.result-cycle-flow-row.active .result-cycle-flow-name {
    color: #1f2f4a;
    font-weight: 600;
}

.result-cycle-flow-row.active .result-cycle-flow-scope {
    color: #3f567d;
}

.result-cycle-flow-row.active .result-actors-checkbox {
    accent-color: #0b66dd;
}

.result-cycle-flow-row.emphasized td {
    background: #d8ebff;
    border-top-color: #4a98ff;
    border-bottom-color: #4a98ff;
}

.result-cycle-flow-row.emphasized td:first-child {
    border-left-color: #4a98ff;
}

.result-cycle-flow-row.emphasized td:last-child {
    border-right-color: #4a98ff;
}

.result-cycle-flow-row.emphasized .result-cycle-flow-name {
    color: #0e2d5a;
    font-weight: 700;
}

.result-cycle-flow-row.emphasized .result-cycle-flow-scope {
    color: #1a467f;
}

.result-cycle-flow-row.emphasized .result-actors-checkbox {
    accent-color: #005bd1;
}

.result-cycle-acc-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.result-cycle-actors-card .result-actors-row.active td {
    background: #eef6ff;
    border-top-color: #b8d8ff;
    border-bottom-color: #b8d8ff;
}

.result-cycle-actors-card .result-actors-row.active td:first-child {
    border-left-color: #b8d8ff;
}

.result-cycle-actors-card .result-actors-row.active td:last-child {
    border-right-color: #b8d8ff;
}

.result-cycle-actors-card .result-actors-row.active .result-actors-name-cell {
    color: #1f2f4a;
    font-weight: 600;
}

.result-cycle-actors-card .result-actors-row.active .result-actors-checkbox {
    accent-color: #0b66dd;
}

.result-cycle-acc-row {
    border: 1px solid #d9dbe1;
    border-radius: 12px;
    background: #fff;
    padding: 8px;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    column-gap: 8px;
}

.result-cycle-acc-row.active {
    border-color: #0b66dd;
    background: #f3f9ff;
}

.result-cycle-acc-row.inactive {
    opacity: 0.45;
}

.result-cycle-acc-check {
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-cycle-acc-diagram {
    width: 100%;
    min-width: 0;
}

.result-cycle-acc-center {
    height: 84px;
}

.result-cycle-acc-label {
    font-size: max(var(--mobile-font-min, 0px), calc(13px * var(--mobile-font-scale, 1)));
    line-height: 1.3;
}

.result-cycle-bottom-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.result-cycle-perception-card {
    width: 100%;
}

.result-imbalance {
    border: 1px solid #dde6f4;
    border-radius: 10px;
    background: #fbfdff;
    padding: 11px 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.result-imbalance-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: max(var(--mobile-font-min, 0px), calc(11px * var(--mobile-font-scale, 1)));
    color: #5b6883;
    gap: 10px;
}

.result-imbalance-axis {
    position: relative;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, #d7e6ff 0%, #f2f4f8 50%, #fff2df 100%);
    border: 1px solid #d9e1ef;
}

.result-imbalance-axis::before {
    content: "";
    position: absolute;
    left: 50%;
    top: -6px;
    width: 1px;
    height: 20px;
    background: #a5b2ca;
}

.result-imbalance-indicator {
    position: absolute;
    top: 50%;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.24);
    transform: translate(-50%, -50%);
}

.result-imbalance-indicator.toward-in {
    background: #0b66dd;
}

.result-imbalance-indicator.toward-out {
    background: #d63c3c;
}

.result-imbalance-indicator.neutral {
    background: #6f7b92;
}

.result-imbalance-summary {
    margin: 8px 0 0;
    font-size: max(var(--mobile-font-min, 0px), calc(13px * var(--mobile-font-scale, 1)));
    line-height: 1.35;
    text-align: center;
    max-width: 100%;
    overflow-wrap: normal;
    word-break: normal;
    text-wrap: balance;
}

.result-option-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.result-option-grid.single {
    grid-template-columns: 1fr;
}

.result-delay-type {
    margin: 0 0 20px;
    text-align: center;
    font-size: max(var(--mobile-font-min, 0px), calc(16px * var(--mobile-font-scale, 1)));
    line-height: 1.25;
    font-weight: 700;
    color: #2f3a52;
    max-width: 100%;
    overflow-wrap: normal;
    word-break: normal;
    text-wrap: balance;
}

.result-delay-bottom-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.result-delay-perception-card {
    width: 100%;
}

.result-delay-narrative-card {
    height: 100%;
}

.result-delay-card .delay-flow-widget {
    margin-bottom: 9px;
}

.result-delay-cycle-icon-title {
    padding: 2px 0;
}

.result-delay-cycle-type-icon {
    height: 84px;
    width: auto;
    display: block;
    margin: 0 auto;
}

.result-option-card {
    border: 1px solid #dfe6f2;
    border-radius: 10px;
    background: #fff;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    min-width: 0;
}

.result-option-card-title {
    margin: 0;
    font-size: max(var(--mobile-font-min, 0px), calc(12px * var(--mobile-font-scale, 1)));
    font-weight: 700;
    color: #4a5873;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.result-option-visual {
    border: 1px dashed #d6deeb;
    background: #fbfdff;
    color: #8b95aa;
    font-size: max(var(--mobile-font-min, 0px), calc(11px * var(--mobile-font-scale, 1)));
}

.result-option-label {
    margin: 0;
    font-size: max(var(--mobile-font-min, 0px), calc(12px * var(--mobile-font-scale, 1)));
    font-weight: 400;
    color: #2f3a52;
    text-align: center;
    max-width: 100%;
    overflow-wrap: normal;
    word-break: normal;
    text-wrap: pretty;
}

.result-actors-module {
    border: 1px solid #dfe6f2;
    border-radius: 10px;
    background: #ffffff;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.result-actors-title {
    margin: 0;
    font-size: max(var(--mobile-font-min, 0px), calc(12px * var(--mobile-font-scale, 1)));
    font-weight: 700;
    color: #4a5873;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.result-actors-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 6px;
}

.result-actors-row td {
    background: #f9fbff;
    border-top: 1px solid #e2e8f3;
    border-bottom: 1px solid #e2e8f3;
    padding: 7px 10px;
    font-size: max(var(--mobile-font-min, 0px), calc(12px * var(--mobile-font-scale, 1)));
    line-height: 1.3;
}

.result-actors-row td:first-child {
    border-left: 1px solid #e2e8f3;
    border-radius: 8px 0 0 8px;
}

.result-actors-row td:last-child {
    border-right: 1px solid #e2e8f3;
    border-radius: 0 8px 8px 0;
}

.result-actors-row.active td {
    background: #eef6ff;
    border-top-color: #b8d8ff;
    border-bottom-color: #b8d8ff;
}

.result-actors-row.active td:first-child {
    border-left-color: #b8d8ff;
}

.result-actors-row.active td:last-child {
    border-right-color: #b8d8ff;
}

.result-actors-row.active .result-actors-name-cell {
    color: #1f2f4a;
    font-weight: 600;
}

.result-actors-row.active .result-actors-checkbox {
    accent-color: #0b66dd;
}

.result-actors-row.inactive td {
    opacity: 0.45;
}

.result-actors-check-cell {
    width: 38px;
    text-align: center;
}

.result-actors-checkbox {
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: #0b66dd;
}

.result-actors-name-cell {
    color: #2d3649;
    text-align: left;
    max-width: 100%;
    overflow-wrap: normal;
    word-break: normal;
    text-wrap: pretty;
}

.result-narrative-subcard {
    border: 1px solid #dfe6f2;
    border-radius: 10px;
    background: #ffffff;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.result-narrative-title {
    margin: 0;
    font-size: max(var(--mobile-font-min, 0px), calc(12px * var(--mobile-font-scale, 1)));
    font-weight: 700;
    color: #4a5873;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.result-narrative-text {
    margin: 0;
    font-size: max(var(--mobile-font-min, 0px), calc(13px * var(--mobile-font-scale, 1)));
    line-height: 1.45;
    color: #2d3649;
    text-align: left;
    max-width: 100%;
    overflow-wrap: normal;
    word-break: normal;
    text-wrap: pretty;
}

.result-narrative-text strong {
    font-weight: 700;
}

.result-line {
    margin: 0;
    font-size: max(var(--mobile-font-min, 0px), calc(13px * var(--mobile-font-scale, 1)));
    line-height: 1.4;
    max-width: 100%;
    overflow-wrap: normal;
    word-break: normal;
    text-wrap: pretty;
}

.badge {
    display: inline-block;
    font-size: max(var(--mobile-font-min, 0px), calc(11px * var(--mobile-font-scale, 1)));
    font-weight: 700;
    border-radius: 999px;
    padding: 2px 8px;
    background: #eef1f8;
    color: #485061;
}

.restart-btn {
    border: 1px solid #d9dbe1;
    background: #fff;
    color: #2d3340;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: max(var(--mobile-font-min, 0px), calc(13px * var(--mobile-font-scale, 1)));
    cursor: pointer;
}

.empty-state {
    margin: 0;
    font-size: max(var(--mobile-font-min, 0px), calc(13px * var(--mobile-font-scale, 1)));
    color: var(--text-secondary);
    border: 1px dashed #d9dbe1;
    border-radius: 10px;
    padding: 12px;
}

@media (min-width: 720px) {
    .option-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .flow-board {
        grid-template-columns: 1fr 1fr;
    }

    .cycle-board {
        grid-template-columns: 1fr 1fr;
    }

    .result-cycle-flow-widget {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .result-cycle-bottom-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        align-items: stretch;
    }

}

@media (min-width: 1024px) {
    .results-tab-manager {
        top: calc(72px + env(safe-area-inset-top));
    }

    .result-delay-bottom-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        align-items: stretch;
    }
}

@media (max-width: 720px) {
    .section-divider-title {
        font-size: clamp(15px, 2.7vw, 20px);
    }

    .option-grid,
    .flow-board,
    .slider-columns,
    .qa-stack,
    .acc-list,
    .cycle-board,
    .select-grid,
    .delay-grid,
    .results-grid,
    .result-flow-split,
    .result-cycle-flow-widget,
    .result-cycle-bottom-grid,
    .result-option-grid {
        gap: 8px;
    }

    .option-card {
        min-height: 120px;
        padding: 9px;
        gap: 7px;
    }

    .option-visual,
    .result-option-visual {
        width: min(100%, 96px);
        padding: 8px;
    }

    .option-title {
        font-size: max(var(--mobile-font-min, 0px), calc(13px * var(--mobile-font-scale, 1)));
    }

    .flow-card,
    .cycle-column,
    .result-group,
    .result-subcard,
    .delay-card {
        padding: 10px;
    }

    .flow-card {
        max-height: none;
    }

    .slider-card {
        padding: 12px 10px 10px;
        min-width: 0;
    }

    .slider-direction-title {
        min-height: 42px;
    }

    .slider-direction-icon,
    .flow-card-direction-icon {
        height: 42px;
    }

    .vertical-slider-wrap {
        min-height: 170px;
    }

    .vertical-slider {
        width: min(56vw, 198px);
        height: 30px;
    }

    .vertical-slider::-webkit-slider-thumb {
        width: 26px;
        height: 26px;
        margin-top: -10px;
    }

    .vertical-slider::-moz-range-thumb {
        width: 26px;
        height: 26px;
    }

    .slider-comparison-text {
        padding: 9px 12px;
        font-size: max(var(--mobile-font-min, 0px), calc(13px * var(--mobile-font-scale, 1)));
    }

    .text-field {
        height: 44px;
        padding: 10px 12px;
        font-size: max(var(--mobile-font-min, 0px), calc(15px * var(--mobile-font-scale, 1)));
    }

    .stock-input {
        font-size: max(var(--mobile-font-min, 0px), calc(12.5px * var(--mobile-font-scale, 1)));
        padding: 3px 6px;
    }

    .textarea-field {
        padding: 10px 12px;
        font-size: max(var(--mobile-font-min, 0px), calc(15px * var(--mobile-font-scale, 1)));
    }

    .select-card,
    .delay-card {
        padding: 10px;
        border-radius: 11px;
    }

    .flow-meta {
        gap: 2px;
    }

    .delay-flow-side-svg {
        height: 36px;
    }

    .delay-flow-name {
        width: 100%;
        max-width: 100%;
        font-size: max(var(--mobile-font-min, 0px), calc(12px * var(--mobile-font-scale, 1)));
    }

    .delay-flow-stock {
        min-height: 74px;
        height: auto;
        max-width: 156px;
        width: clamp(128px, 43vw, 156px);
        padding: 6px 8px;
    }

    .delay-flow-stock-label {
        font-size: max(var(--mobile-font-min, 0px), calc(12px * var(--mobile-font-scale, 1)));
    }

    .delay-flow-widget.compact .delay-flow-side-svg {
        height: 30px;
    }

    .delay-flow-widget.compact .delay-flow-name {
        font-size: max(var(--mobile-font-min, 0px), calc(10px * var(--mobile-font-scale, 1)));
        width: 100%;
        max-width: 100%;
        padding: 0 6px;
    }

    .delay-flow-widget.compact .delay-flow-stock {
        min-height: 58px;
        height: auto;
        max-width: 118px;
        width: clamp(98px, 32vw, 118px);
        padding: 5px 6px;
    }

    .delay-flow-widget.compact .delay-flow-stock-label {
        font-size: max(var(--mobile-font-min, 0px), calc(11px * var(--mobile-font-scale, 1)));
    }

    .flow-meta strong {
        font-size: max(var(--mobile-font-min, 0px), calc(14px * var(--mobile-font-scale, 1)));
    }

    .flow-meta span {
        font-size: max(var(--mobile-font-min, 0px), calc(11px * var(--mobile-font-scale, 1)));
    }

    .result-group h3 {
        font-size: max(var(--mobile-font-min, 0px), calc(16px * var(--mobile-font-scale, 1)));
    }

    .result-stock-center {
        height: 74px;
    }

    .stock-diagram .stock-side-svg {
        height: 34px;
    }
}
