/* theseus.css — Maze lab layout */
.th-layout { display: grid; grid-template-columns: 258px minmax(0, 1fr) 282px; gap: 16px; height: 100%; min-height: 0; }
.th-col { display: flex; flex-direction: column; gap: 14px; overflow-y: auto; min-height: 0; padding-right: 2px; }
.th-col .panel { flex: none; }
.th-pbody { display: flex; flex-direction: column; gap: 10px; }
.th-ptitle { font-size: 15px; margin-bottom: 2px; }
.th-center { display: flex; flex-direction: column; gap: 10px; min-height: 0; min-width: 0; }
.th-stage { flex: 1; min-height: 0; }
.th-stage canvas { cursor: crosshair; touch-action: none; }
.th-status { position: absolute; right: 12px; top: 12px; z-index: 2; }
.th-unreach { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 3; box-shadow: var(--shadow); background: var(--surface); border: 1px solid var(--amber); }
.th-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--text-2); padding: 0 4px; }
.th-legend span { display: inline-flex; align-items: center; gap: 6px; }
.th-legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }

.th-tools { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.th-tool { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 2px 6px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text-2); cursor: pointer; font-size: 11px; font-weight: 500; transition: .15s; }
.th-tool svg { width: 18px; height: 18px; }
.th-tool:hover { color: var(--text); border-color: var(--text-3); }
.th-tool.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

.th-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.th-mini { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; display: flex; flex-direction: column; }
.th-mini span { font-size: 11px; color: var(--text-3); }
.th-mini b { font-family: 'Space Grotesk'; font-size: 17px; }
.th-sub { font-family: 'JetBrains Mono'; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); margin-top: 4px; }
.th-batt { height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.th-batt i { display: block; height: 100%; width: 100%; background: var(--green); transition: width .2s; }
.th-cmp-wrap { max-height: 300px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.th-cmp-title { font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }

/* Labyrinth Race game */
.race { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 16px; height: 100%; min-height: 0; }
.race-stage { position: relative; min-height: 0; }
.race-stage canvas { width: 100%; height: 100%; display: block; }
.race-side { display: flex; flex-direction: column; gap: 12px; overflow-y: auto; }
.race-vs { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; text-align: center; }
.race-vs .who { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 6px; }
.race-vs .who b { display: block; font-family: 'Space Grotesk'; font-size: 22px; }
.race-vs .who span { font-size: 11px; color: var(--text-3); }
.race-timer { font-family: 'JetBrains Mono'; font-size: 30px; text-align: center; letter-spacing: .05em; }
.race-over { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(3,7,14,.6); backdrop-filter: blur(3px); z-index: 4; border-radius: 14px; }
.race-over .box { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 24px 28px; text-align: center; box-shadow: var(--shadow); max-width: 340px; animation: popIn .3s cubic-bezier(.3,1.4,.5,1); }
.race-over h2 { font-size: 26px; margin-bottom: 6px; }
.race-count { font-family: 'Space Grotesk'; font-size: 96px; font-weight: 700; color: var(--accent); text-shadow: 0 0 30px var(--accent-soft); }
.th-col { overflow-x: hidden; }
.th-col .seg.full button { padding: 0 4px; gap: 4px; font-size: 12.5px; min-width: 0; }
.th-col .panel-head { padding: 10px 14px; }
.th-col .panel-body { padding: 12px 14px; }
.th-eyebrow { font-family: 'JetBrains Mono'; font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
