/* Plate Pilot: the steering panel beside the canvas (stacked below it on narrow screens).
   Shared shell screens and tokens stay intact; only var(--ts-*) colours and fonts. */
.pp-dock { display: grid; gap: 10px; font: 16px/1.35 var(--ts-font); color: var(--ts-ink); }
.pp-step { display: grid; gap: 6px; padding: 8px 10px 10px; border: 2px solid var(--ts-line); border-radius: 10px; background: var(--ts-panel-2); }
.pp-step h2 { margin: 0; font: 800 18px var(--ts-display, var(--ts-font)); color: var(--ts-accent); }
.pp-plates { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pp-plate { display: flex; align-items: center; gap: 8px; text-align: left; min-height: 48px; padding: 4px 8px; justify-content: flex-start; min-width: 0; }
.pp-ptext { min-width: 0; }
.pp-ptext b { display: block; overflow-wrap: anywhere; }
.pp-plate[aria-pressed=true], .pp-dir[aria-pressed=true], .pp-speed[aria-pressed=true] { border-color: var(--ts-focus); box-shadow: inset 0 0 0 2px var(--ts-focus); }
.pp-badge { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 4px solid var(--ts-accent); font: 800 18px var(--ts-font); background: var(--ts-stage); }
.pp-ptext { display: grid; line-height: 1.2; }
.pp-ptext b { font-size: 16px; }
.pp-ptext small { font-size: 16px; color: var(--ts-muted); }
.pp-ptext .pp-pmotion { color: var(--ts-accent); }
.pp-pad { display: grid; grid-template-columns: repeat(3, minmax(44px, 1fr)); gap: 6px; }
.pp-dir { display: flex; align-items: center; justify-content: center; gap: 4px; min-height: 44px; padding: 2px 4px; }
.pp-glyph { font-size: 22px; line-height: 1; }
.pp-dirlabel { font-size: 16px; font-weight: 700; }
.pp-speeds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pp-speed { display: grid; justify-items: center; min-height: 48px; padding: 2px 4px; line-height: 1.15; }
.pp-speed small { font-size: 16px; color: var(--ts-muted); }
.pp-dir:disabled, .pp-speed:disabled { opacity: .45; }
.pp-note { margin: 0; font-size: 16px; padding: 6px 8px; border: 2px dashed var(--ts-line); border-radius: 8px; color: var(--ts-muted); }
.pp-run { display: grid; justify-items: center; min-height: 52px; font-size: 18px; font-weight: 800; background: var(--ts-accent); color: var(--ts-accent-ink, #062a27); border-color: var(--ts-accent); }
.pp-run small { font-size: 16px; font-weight: 700; }
.pp-run:disabled { opacity: .55; }
.pp-feedback { display: grid; gap: 6px; padding: 8px 10px; border-left: 4px solid var(--ts-accent); background: var(--ts-panel-2); border-radius: 0 8px 8px 0; }
.pp-feedback p { margin: 0; font-size: 16px; }
.pp-feedback.pp-bad { border-left-color: var(--ts-bad); }
.pp-feedback.pp-good { border-left-color: var(--ts-good); }
.pp-card { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.pp-card li { font-size: 16px; padding: 4px 0; border-bottom: 1px solid var(--ts-line); }
.pp-card em { font-style: normal; font-weight: 800; color: var(--ts-muted); }
.pp-card .pp-ok em { color: var(--ts-good); }
.pp-card .pp-miss em { color: var(--ts-bad); }
.pp-model summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 700; }
.pp-model p { margin: 0 0 8px; font-size: 16px; color: var(--ts-muted); }
.pp-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (min-width: 901px) {
  #topic-game .ts-panel { width: 330px; padding: 10px; }
}
@media (max-width: 900px) {
  /* The page scrolls instead of the shell's fixed-height frame, so nothing is clipped or squeezed. */
  #topic-game { height: auto !important; min-height: 0 !important; }
  #topic-game .ts-play { min-height: 100dvh; }
  #topic-game .ts-play > * { flex-shrink: 0; }
  #topic-game .ts-body { flex: none; flex-direction: column; }
  #topic-game .ts-stage { flex: none; height: calc((100vw - 16px) * 760 / 640 + 8px); max-height: 1100px; min-height: 0; }
  #topic-game .ts-panel { overflow: visible; }
  .pp-dock { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pp-dock > .pp-run, .pp-dock > .pp-feedback, .pp-dock > .pp-model, .pp-dock > .pp-cardbox { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .pp-dock { grid-template-columns: 1fr; }
}
