/* Course Map Ruler — the Training layout panel (layout-ui.js); colours and buttons come from app.css */
.workspace { display: grid; gap: 18px; padding-top: 20px; border-top: 1px solid var(--line); }
.wshead { display: grid; gap: 6px; max-width: 92ch; }
.wsrow { display: grid; grid-template-columns: minmax(0, 1fr) 372px; gap: 20px; align-items: start; }
@media (max-width: 920px) { .wsrow { grid-template-columns: minmax(0, 1fr); } }
.workspace h3 { font: 600 19px/1.2 var(--display); letter-spacing: .01em; margin: 0 0 8px; overflow-wrap: anywhere; }
.workspace h3 span { color: var(--muted); font-weight: 500; }
.wsside { display: grid; gap: 12px; align-content: start; }
.workspace .toggles { margin-left: 0; flex-wrap: wrap; }
.lhead { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-bottom: 8px; }
.lhead h3 { margin: 0; }
.lhead .toggles { margin-left: auto; }
@media (max-width: 560px) { .lhead .toggles { margin-left: 0; } }
.workspace .caption { margin-top: 6px; }

/* the two drawings: white pages like the course drawing */
.lview { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.lview svg { display: block; width: 100%; height: auto; touch-action: none; user-select: none; -webkit-user-select: none; cursor: crosshair; }
.lview svg.off { display: none; }
.lview svg:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.lempty { padding: 40px 20px; text-align: center; color: #586674; }
#laySvg { cursor: default; }
#laySvg .hits polygon, #laySvg .hits circle { fill: #000; fill-opacity: 0; pointer-events: all; cursor: grab; }
#laySvg .handle { cursor: grab; }
#laySvg.dragging, #laySvg.dragging .hits polygon, #laySvg.dragging .handle { cursor: grabbing; }

/* the chosen piece's tools */
.ltools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; }
.lsel { flex: 1 1 100%; font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.btn.sm { font-size: 13px; padding: 7px 10px; }
.btn:disabled, .chip:disabled { opacity: .45; cursor: default; }
.btn:disabled:hover { border-color: var(--line); }
.ltools .angle { display: inline-flex; align-items: center; gap: 2px; font: 500 13px var(--mono); }
.ltools .angle input { width: 64px; font: 500 13px var(--mono); padding: 6px 6px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-align: right; }

/* forms in the side column */
.lform { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px 10px; align-items: center; }
.lform label { font-size: 14px; }
.lform small { grid-column: 1 / -1; color: var(--muted); font-size: 12.5px; }
.lform input, .lform select { font: 500 14px var(--body); padding: 7px 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); min-width: 0; }
.lform input[type="number"] { font-family: var(--mono); width: 70px; text-align: right; }
.lform input[type="text"] { width: 100%; box-sizing: border-box; }
.hallform { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
.hallform > label { padding-top: 8px; }
.hallform .wh { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; }
.hallform .wh select { flex: 1 1 auto; }
.hallform .wh small { grid-column: auto; }
.hallform .wh small.full { flex: 1 1 100%; }
.lchecks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.lchecks .pill { border-radius: 8px; align-items: flex-start; line-height: 1.35; padding: 6px 10px; }
.lchecks .pill::before { margin-top: 6px; flex: none; }

/* the obstacles, piece by piece */
#layItems tr.lpiece td { font-weight: 600; font-size: 13px; color: var(--muted); padding-top: 10px; cursor: pointer; overflow-wrap: anywhere; }
#layItems tr.lpiece td small { font-weight: 500; }
#layItems tr.litem { cursor: pointer; }
#layItems tr.on td, #layItems tr.lpiece.on td { background: var(--accent-soft); }
#layItems tr.lpiece.on td { color: var(--accent); }
#layItems tr.bad td:nth-child(2) { color: var(--bad); font-weight: 600; }

/* the 3D view (view3d.js, research/course-creator/02-design.md §9): the same workspace as the Training layout */
.v3bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.v3field { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.v3field select, .v3field input { font: 500 14px var(--body); padding: 7px 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.v3field input[type="number"] { font-family: var(--mono); width: 64px; text-align: right; }
.v3stage { position: relative; aspect-ratio: 16 / 10; max-height: 78vh; width: 100%; background: #e6ebef; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.v3stage canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.v3stage canvas:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
@media (max-width: 560px) { .v3stage { aspect-ratio: 4 / 5; } }
/* the Stand camera's controls (view3d.js, 02-design.md §9.4): Dog and Handler side by side, each word whole; on a
   phone the group wraps under the cameras */
#v3StandWrap { flex-wrap: wrap; row-gap: 6px; }
#v3StandWrap .toggles { flex-wrap: nowrap; }
#v3StandWrap label, #v3StandWrap .chip { white-space: nowrap; }
/* the line camera's player under the stage (view3d.js, 02-design.md §9.4) */
.v3player { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 8px; font-size: 14px; }
.v3player strong { font-weight: 600; }
.v3player input[type="range"] { flex: 1 1 200px; min-width: 0; accent-color: var(--accent); }
.v3player output { font-family: var(--mono); font-size: 13px; color: var(--muted); min-width: 16ch; }
.v3notes ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: 14px; color: var(--muted); }
#h3d span { color: var(--muted); font-weight: 500; }

/* the rescale report: its k-table is the preview (layout-ui.js and, in the course creator, creator-report.js;
   research/course-creator/02-design.md §6.6) */
.ktable { display: grid; gap: 8px; margin-top: 14px; }
.ktable .lhead { margin-bottom: 0; }
.ktable h4 { font: 600 16px/1.2 var(--display); margin: 0; }
.ktable .toggles { align-items: center; gap: 6px 8px; }
.ktable select { font: 500 13px var(--body); padding: 6px 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.kt th { white-space: nowrap; }
.kt th[title] { cursor: help; }
.kt tbody tr { cursor: pointer; }
.kt tbody tr.first td { border-top-width: 2px; }
.kt tbody tr:not(.first) td { border-top-style: dotted; }
.kt tbody tr.on td { background: var(--accent-soft); }
.kt tbody td.bad { color: var(--bad); font-weight: 600; }
.kt tbody .linkbtn { text-align: left; white-space: nowrap; }
.kt tbody .linkbtn[aria-pressed="true"] { font-weight: 600; text-decoration: none; }
.kt th, .kt td { padding-right: 14px; }
/* the line camera's speed ruler (view3d.js, 02-design.md §9.4; cc-people): slower to the left, the planned speed at the
   right end, its value beside it */
.v3rate { display: inline-flex; align-items: center; gap: 6px; flex: 0 1 auto; }
.v3player .v3rate input[type="range"] { flex: 0 1 160px; width: 160px; }
.v3player .v3rate output { min-width: 17ch; }
/* every class's dog's line in 3D (view3d.js; 02-design.md §13 rows 746-749): a chip for each class, XS to L, its line's
   colour a dot in it; the class in view's letter bold, since the line camera runs its line [OURS: design pick] */
.v3lineslbl { font-size: 14px; color: var(--ink); margin-left: 4px; }
.v3lines { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.v3lines .chip { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; }
.v3lines .chip i { display: inline-block; width: 11px; height: 11px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(20, 32, 44, .35); }
.v3lines .chip.v3in { font-weight: 700; }
/* Edit in 2D, on the 3D stage where 3D view stands on the ring: only while the 3D stands in the ring's place
   (creator-3d.js, creator.css; §13 rows 750-751) */
.v3to2d { display: none; position: absolute; right: 10px; top: 10px; }
/* the camera's history and Show in 2D on the stage's top left, off the bar (V1 N5, N3: design-notes/2026-10-06-v1.md) */
.v3hist { position: absolute; left: 10px; top: 10px; display: flex; flex-wrap: wrap; gap: 4px; max-width: calc(100% - 120px); }
.v3hist .btn { background: rgba(255, 255, 255, .92); color: #14202c; }
.v3hist .btn[hidden] { display: none; }
/* (only an enabled button takes a press: the stage under the rest is the camera's and the obstacles') */
.v3hist { pointer-events: none; } .v3hist .btn { pointer-events: auto; } .v3hist .btn:disabled { pointer-events: none; }
@media (pointer: coarse) { .v3hist .btn { min-height: 44px; } }
.v3to2d .btn { min-height: 44px; min-width: 44px; justify-content: center; background: rgba(255, 255, 255, .92); color: #14202c; }
