/* LED module layout panel (led-modules.js): front-lit Lighting step and the backlit Build step. */
.led-modules{margin:12px 0 0;border:1px solid var(--card-line,#2a3a50);border-radius:var(--radius-control,8px);background:var(--card,#132033);color:var(--ink,#e6edf5)}
.led-modules>summary{display:flex;align-items:center;gap:8px;padding:10px 12px;cursor:pointer;font-weight:600}
.led-modules .lm-badge{margin-left:auto;padding:2px 8px;border-radius:999px;background:#ffd34d22;color:#ffd34d;font-size:12px;font-weight:600;white-space:nowrap}
.led-modules .lm-content{padding:0 12px 12px}
.led-modules .lm-intro,.led-modules .lm-hint{margin:6px 0;color:var(--muted,#9fb0c4);font-size:12px;line-height:1.45}
.led-modules .lm-switch,.led-modules .lm-check{display:flex;align-items:center;gap:8px;margin:8px 0;font-size:13px;cursor:pointer}
.led-modules .lm-switch{font-weight:600}
.led-modules .lm-summary{margin:8px 0;padding:8px 10px;border-radius:6px;background:#ffd34d14;color:var(--ink,#e6edf5);font-size:13px;font-weight:600}
.led-modules .lm-plan-wrap{width:100%;border:1px solid var(--card-line,#2a3a50);border-radius:6px;overflow:hidden;background:#0d1520}
.led-modules .lm-plan{display:block;width:100%;height:auto}
.led-modules .lm-legend{display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;margin:6px 0;color:var(--muted,#9fb0c4);font-size:11px}
.led-modules .lm-leg{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}
.led-modules .lm-key{display:inline-block;width:14px;height:8px;border-radius:2px}
.led-modules .lm-key-m{width:16px;height:7px;background:radial-gradient(circle at 25% 50%,#fff7d6 1.5px,#7d8794 1.9px,transparent 2.3px),radial-gradient(circle at 75% 50%,#fff7d6 1.5px,#7d8794 1.9px,transparent 2.3px),#e3e8ee;box-shadow:0 0 0 1px #0d1520}
.led-modules .lm-key-s{width:18px;height:5px;border-radius:1px;background:repeating-linear-gradient(90deg,#f5c542 0 3px,#e3e8ee 3px 6px)}
.led-modules .lm-key-w{height:0;border-top:2px solid #8a9bb0;border-radius:0}
.led-modules .lm-key-glow{width:46px;height:8px;background:linear-gradient(90deg,#2b2620,#fff1de)}
.led-modules .lm-key-glow.lm-key-halo{background:linear-gradient(90deg,#0b0f15,#fff1de)}
.led-modules .lm-key-e{background:#c8ced8}
.led-modules .lm-key-p{width:9px;height:9px;border-radius:50%;border:1px dashed #b6c4d4;background:radial-gradient(circle,#b6c4d4 0 1.5px,transparent 2px)}
.led-modules .lm-key-c{height:0;border-top:2px dashed #5f7fa3;border-radius:0}
.led-modules .lm-key-d{background:#4a72ff}
.led-modules .lm-key-h{background:#ff6a2a}
.led-modules .lm-key-n{height:3px;background:#ff5d6c}
.led-modules .lm-field{display:grid;gap:4px;margin:8px 0;font-size:12px;color:var(--muted,#9fb0c4)}
.led-modules .lm-field :is(input,select){width:100%;min-height:32px;box-sizing:border-box;padding:4px 8px;border:1px solid var(--control-line,#33465f);border-radius:6px;background:var(--input-fill,#0f1a2a);color:var(--ink,#e6edf5);font:inherit;font-size:13px}
.led-modules .lm-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:0 10px}
.led-modules .lm-grid .lm-wide{grid-column:1/-1}
.led-modules .lm-grid button,.led-modules .lm-pro-actions button{margin:6px 0}
.led-modules .lm-table-wrap{margin:10px 0 4px;overflow-x:auto}
.led-modules .lm-table{width:100%;border-collapse:collapse;font-size:12px}
.led-modules .lm-table :is(th,td){padding:5px 6px;border-bottom:1px solid var(--card-line,#2a3a50);text-align:right;vertical-align:top}
.led-modules .lm-table th:first-child{text-align:left}
.led-modules .lm-table thead th{color:var(--muted,#9fb0c4);font-weight:600;white-space:nowrap}
.led-modules .lm-table tfoot :is(th,td){border-bottom:0;font-weight:700}
.led-modules .lm-flags{margin:8px 0;padding-left:18px;font-size:12px;line-height:1.45;color:var(--warn,#ffb35c)}
.led-modules .lm-flags:empty{display:none}
.led-modules .lm-groups{font-size:12px;line-height:1.45}
.led-modules .lm-groups ol{margin:4px 0 8px;padding-left:20px}
.led-modules .lm-sub{margin:8px 0;border-top:1px solid var(--card-line,#2a3a50)}
.led-modules .lm-sub>summary{padding:8px 0;cursor:pointer;font-size:13px;font-weight:600}
.led-modules .lm-pro-actions{display:flex;flex-wrap:wrap;gap:8px}
.led-modules[data-led-modules="halo"]{margin-top:14px}
.led-modules .lm-reasons{margin:4px 0;padding-left:18px;font-size:12px;line-height:1.45;color:var(--muted,#9fb0c4)}
.led-modules .lm-reasons:empty{display:none}
.led-modules .lm-flags .lm-bad{color:#ff6b78;font-weight:600}
.led-modules .lm-summary-bad{background:#ff4d5e1f;box-shadow:inset 3px 0 0 #ff4d5e}
.led-modules .lm-badge-bad{background:#ff4d5e2e;color:#ff8a94}
.led-modules .lm-key-x{background:#ff4d5e}
.led-modules .lm-edit-row{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;margin:6px 0}
dialog.lm-editor{width:min(1200px,94vw);height:min(820px,90vh);max-width:none;max-height:none;margin:auto;padding:0;border:1px solid var(--card-line,#2a3a50);border-radius:12px;background:var(--card,#132033);color:var(--ink,#e6edf5);overflow:hidden}
dialog.lm-editor[open]{display:flex;flex-direction:column}
.lm-editor::backdrop{background:#0009}
.lm-editor .lm-ed-head{position:relative;display:block;padding:12px 16px 4px;background:none;border:0}
.lm-editor .lm-ed-head .msls-language{position:absolute;top:8px;right:12px}
.lm-editor .lm-ed-head h2,.lm-editor .lm-ed-head p{padding-right:150px}
.lm-editor .lm-ed-head h2{margin:0 0 4px;font-size:18px}
.lm-editor .lm-ed-head p{margin:0;color:var(--muted,#9fb0c4);font-size:13px}
.lm-editor .lm-ed-tools{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:8px 16px}
.lm-editor .lm-ed-tools button{width:auto;flex:0 0 auto;margin:0;min-height:34px;padding:6px 12px}
.lm-editor .lm-ed-tools [aria-pressed="true"]{outline:2px solid #ffd34d;outline-offset:1px}
.lm-editor .lm-ed-status{margin-left:auto;font-size:13px;color:var(--muted,#9fb0c4)}
.lm-editor .lm-ed-status.lm-bad{color:#ff6b78;font-weight:600}
.lm-editor .lm-ed-wrap{flex:1 1 auto;min-height:240px;height:calc(min(820px,90vh) - 170px);margin:0 16px 16px;border:1px solid var(--card-line,#2a3a50);border-radius:8px;overflow:hidden}
.lm-editor .lm-ed-canvas{display:block;width:100%;height:100%;touch-action:none}
/* The Lighting step makes five steps on the phone step row (four before) and six in the backlit studio */
@media(max-width:760px),(max-width:960px) and (pointer:coarse){
 body.ms-main-studio[data-phone-ready] .step-nav:has(#tab-leds){grid-template-columns:repeat(5,minmax(0,1fr))}
 body.ms-main-studio[data-phone-ready] .step-nav:has(#tab-leds) [role="tab"]{min-width:0;padding-left:2px;padding-right:2px}
 body.ms-main-studio[data-phone-ready] .step-nav:has(#tab-leds) [role="tab"] span{font-size:11px;overflow-wrap:anywhere;text-align:center}
 #haloStudio .ux-step-nav:has([data-lm-step]) > button{flex:1 1 auto;min-width:0;padding-left:2px;padding-right:2px;font-size:10.5px;white-space:nowrap}
}
