.ors-wrap {
    width: min(100%, 720px);
    margin: 1rem auto;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ors-stage-wrap {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 12px;
    background: transparent;
}

.ors-chart-wrap {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex: 0 0 44px;
    min-width: 44px;
}

.ors-chart {
    display: flex;
    flex-direction: column;
    width: 24px;
    height: min(92vw, 640px);
    max-height: 640px;
    min-height: 220px;
    overflow: hidden;
    border: 1px solid #333;
    background: #000;
    box-sizing: border-box;
}

.ors-chart-segment {
    width: 100%;
    min-height: 0;
    transition: height .12s linear;
}

.ors-chart-blue { background: #1e7cff; }
.ors-chart-red { background: #ff3b30; }
.ors-chart-green { background: #35e36f; }

.ors-chart-legend {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 8px;
    font-size: 11px;
    line-height: 1.1;
    color: #5a6572;
    white-space: nowrap;
}

.ors-chart-legend > span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.ors-swatch {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 1px;
}

.ors-swatch-blue { background: #1e7cff; }
.ors-swatch-red { background: #ff3b30; }
.ors-swatch-green { background: #35e36f; }


.ors-canvas {
    display: block;
    width: min(92vw, 640px);
    height: min(92vw, 640px);
    max-width: 640px;
    max-height: 640px;
    background: #000;
    border: 1px solid #222;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .18);
}

.ors-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: .55rem;
    margin-top: .85rem;
}

.ors-btn,
.ors-factor-label select {
    appearance: none;
    border: 1px solid #bfc7d1;
    border-radius: 6px;
    background: #fff;
    color: #111;
    padding: .55rem .8rem;
    font: inherit;
    line-height: 1.1;
}

.ors-btn {
    cursor: pointer;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.ors-btn:hover,
.ors-btn:focus-visible {
    border-color: #1f6feb;
}

.ors-btn[aria-pressed="true"] {
    background: #111;
    border-color: #111;
    color: #fff;
}

.ors-factor-label {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .95rem;
}

.ors-status {
    margin-top: .6rem;
    text-align: center;
    font-size: .9rem;
    color: #5a6572;
}

@media (max-width: 520px) {
    .ors-stage-wrap { gap: 8px; }
    .ors-chart-wrap { flex-basis: 40px; min-width: 40px; }
    .ors-chart { width: 20px; }
    .ors-chart-legend { font-size: 10px; }
}
