#fiber-lab {
    width: 800px;
    max-width: 800px;
    box-sizing: border-box;
    background: #05090f;
    color: #d7ebff;
    font-family: "Courier New", monospace;
    border: 1px solid #26364d;
    padding: 10px;
    font-size: 12px;
}

#fiber-lab * {
    box-sizing: border-box;
    font-family: "Courier New", monospace;
}

#fiber-lab button,
#fiber-lab select,
#fiber-lab input {
    background: #101a28;
    color: #ffffff;
    border: 1px solid #36506f;
    padding: 4px 8px;
    font-weight: bold;
}

#fiber-lab label,
#fiber-lab select,
#fiber-lab input,
.fiber-value,
.fiber-note,
.fiber-card,
.fiber-legend {
    font-size: 12px;
}

#fiber-lab button {
    cursor: pointer;
    font-size: 14px;
}

#fiber-lab button:hover,
#fiber-lab select:hover,
#fiber-lab input:hover {
    border-color: #ffd166;
}

.fiber-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px 12px;
    border: 1px solid #26364d;
    padding: 10px;
    margin-bottom: 10px;
    overflow: hidden;
}

.fiber-control-row {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr) 84px;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.fiber-control-row.fiber-animation-row {
    grid-column: 1 / span 2;
    grid-template-columns: 120px 110px 110px 90px 90px 1fr;
    justify-content: start;
}

.fiber-value {
    color: #ffd166;
    white-space: nowrap;
}

.fiber-panel {
    border: 1px solid #26364d;
    background: #07101a;
    padding: 10px;
    margin-bottom: 10px;
}

.fiber-panel h3 {
    margin: 0 0 8px;
    color: #9bd3ff;
    font-size: 14px;
}

.fiber-canvas-wrap {
    position: relative;
    border: 1px solid #26364d;
    background: #02060b;
}

#fiberCanvas {
    display: block;
    width: 100%;
    height: 420px;
    background: #02060b;
}

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

.fiber-card {
    border: 1px solid #26364d;
    background: #02060b;
    padding: 8px;
    line-height: 1.45;
    min-width: 0;
}

.fiber-card .label {
    color: #9bd3ff;
}

.fiber-card .good {
    color: #66f2a5;
}

.fiber-card .warn {
    color: #ffd166;
}

.fiber-card .bad {
    color: #ff6b8a;
}

.fiber-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 8px;
    color: #a9c7e8;
}

.fiber-swatch {
    display: inline-block;
    width: 14px;
    height: 10px;
    border: 1px solid #36506f;
    margin-right: 4px;
}

.fiber-swatch.core {
    background: #0c5b7d;
}

.fiber-swatch.clad {
    background: #112236;
}

.fiber-swatch.ray {
    background: #ffd166;
}

.fiber-swatch.loss {
    background: #ff6b8a;
}

.fiber-note {
    color: #a9c7e8;
    margin-top: 8px;
    line-height: 1.4;
}

.fiber-example {
    width: 800px;
    max-width: 100%;
    box-sizing: border-box;
    border: 1px solid #26364d;
    background: #f7fbff;
    padding: 8px 10px;
    margin: 8px 0;
}

.fiber-example p {
    margin: 4px 0;
}
