.ct-problem-source { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-bottom: 24px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); font-size: 14px; }
.ct-problem-source a { font-weight: 650; }
.ct-problem-source > span { color: var(--muted); }
.ct-lab { margin: 28px 0 40px; padding: 22px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface-raised); color: var(--ink); font-size: 14px; }
.ct-lab__heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 20px; }
.ct-lab__heading > span { font: 600 10px/1.5 var(--font-mono); letter-spacing: .12em; color: var(--muted); }
.ct-lab__heading > strong { font-size: 17px; }
.ct-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 14px 0; }
.ct-controls label { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.ct-controls :is(select, button) { max-width: 100%; padding: 7px 10px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--surface); color: var(--ink); font-size: 13px; }
.ct-controls button { cursor: pointer; min-height: 36px; }
.ct-controls button:hover:not(:disabled) { background: var(--selection); }
.ct-controls button:disabled { opacity: .45; cursor: default; }
.ct-controls [data-lab-play] { background: var(--link); color: var(--page-bg); border-color: var(--link); }
.ct-lab .ct-hint { margin: 0 0 16px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.ct-workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, .62fr); gap: 18px; align-items: start; }
.ct-grid { display: grid; gap: 4px; width: 100%; max-width: 380px; }
.ct-cell { display: grid; place-items: center; position: relative; aspect-ratio: 1; min-width: 0; padding: 0; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--surface); color: var(--ink); font: 600 13px/1 var(--font-mono); }
button.ct-cell { cursor: pointer; }
.ct-cell.is-wall { background: #303c4b; border-color: #303c4b; color: #e5ecf4; }
.ct-cell.is-filled { background: #c8e7fa; color: #164769; border-color: #5492b6; }
.ct-cell[data-component="2"], .ct-cell[data-component="5"] { background: #e2d8fa; color: #50387e; border-color: #9884ba; }
.ct-cell[data-component="3"], .ct-cell[data-component="6"] { background: #c9eadb; color: #205e46; border-color: #75ab93; }
.ct-cell[data-component="4"], .ct-cell[data-component="7"] { background: #fae4ba; color: #6b4b14; border-color: #c4a463; }
.ct-cell.is-frontier { border: 2px dashed #a56508; }
.ct-cell.is-current { outline: 3px solid #da6c24; outline-offset: -3px; }
.ct-cell.is-path, .ct-cell.is-door { background: #c7ead6; border-color: #559a70; color: #194b2a; }
.ct-cell.is-exited { background: var(--surface); color: var(--faint); border-style: dashed; }
.ct-inspector { padding: 12px; background: var(--surface); border-radius: 8px; min-width: 0; }
.ct-inspector h3 { margin: 0 0 10px; font-size: 14px; }
.ct-metrics > div { margin: 8px 0; }
.ct-metrics small { display: block; color: var(--muted); font-size: 11px; }
.ct-metrics strong { font: 650 17px/1.5 var(--font-mono); }
.ct-lab .ct-frontier { margin: 14px 0 0; font: 12px/1.8 var(--font-mono); overflow-wrap: anywhere; }
.ct-slider { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 12px; }
.ct-slider input { flex: 1; min-width: 0; accent-color: var(--link); }
.ct-slider output { min-width: 45px; font-family: var(--font-mono); text-align: right; }
.ct-lab .ct-message { min-height: 3.4em; margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.7; }
.ct-timetable { margin-top: 16px; overflow-x: auto; }
.ct-timetable table { display: table; margin: 0; width: max-content; min-width: 100%; font: 12px/1.4 var(--font-mono); }
.ct-timetable caption { text-align: left; margin-bottom: 8px; color: var(--muted); font-family: var(--font-sans); }
.ct-timetable :is(th, td) { padding: 8px; text-align: center; white-space: nowrap; }
.ct-timetable td.is-past { background: #c7ead6; color: #194b2a; }
.ct-learning-route { padding: 18px 20px; border-left: 3px solid var(--link); background: var(--surface); border-radius: 0 8px 8px 0; }
@media (max-width: 560px) { .ct-lab { padding: 15px; } .ct-workspace { grid-template-columns: 1fr; } .ct-grid { max-width: 340px; margin: auto; } .ct-inspector { margin-top: 4px; } .ct-metrics { display: flex; flex-wrap: wrap; gap: 10px 24px; } .ct-lab__heading { display: block; } .ct-lab__heading strong { display: block; margin-top: 5px; } }
