/* Free-Body Fixer — the DOM control panel. Shell tokens only (docs/SHELL_CONTRACT.md §8). */
.fbf-dock { display: grid; gap: 8px; font: 16px/1.4 var(--ts-font); color: var(--ts-ink); }
.fbf-dock h2 { margin: 4px 0 0; font-size: 18px; color: var(--ts-accent); }
.fbf-dock p { margin: 0; }
.fbf-dock button { min-height: 44px; font-size: 16px; padding: 6px 10px; white-space: normal; }
.fbf-dock :focus-visible { outline: 3px solid var(--ts-focus); outline-offset: 2px; }
.fbf-sel select { width: 100%; min-height: 44px; font: 16px var(--ts-font); background: var(--ts-panel-2); color: var(--ts-ink); border: 2px solid var(--ts-line); border-radius: 10px; padding: 6px; }
.fbf-add { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.fbf-add button { display: flex; align-items: center; gap: 8px; text-align: left; justify-content: flex-start; }
.fbf-sym { flex: none; min-width: 2em; padding: 2px 6px; border-radius: 8px; font: 800 18px/1.2 var(--ts-mono); text-align: center; background: var(--ts-panel); border: 3px solid var(--ts-line); }
.fbf-note { color: var(--ts-muted); grid-column: 1 / -1; }
.fbf-system[aria-pressed=true] { outline: 3px solid var(--ts-accent); outline-offset: -3px; }
.fbf-seltext { min-height: 44px; padding: 6px 8px; background: var(--ts-panel-2); border-radius: 8px; }
.fbf-edit { display: grid; grid-template-columns: auto auto 1fr auto auto; gap: 4px; align-items: center; }
.fbf-edit button { padding: 6px 4px; }
.fbf-num input { width: 100%; min-height: 44px; box-sizing: border-box; font: 700 18px var(--ts-mono); text-align: center; background: var(--ts-panel-2); color: var(--ts-ink); border: 2px solid var(--ts-line); border-radius: 10px; }
.fbf-edit2 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 4px; }
.fbf-del:not(:disabled) { border-color: var(--ts-bad); }
.fbf-run { font-size: 18px !important; min-height: 52px !important; }
.fbf-status { border-left: 4px solid var(--ts-accent); padding: 8px; background: var(--ts-panel-2); }
.fbf-dock summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 700; }
.fbf-arrows { display: grid; gap: 4px; }
.fbf-arrow { text-align: left; border-left-width: 8px !important; font-size: 16px; }
.fbf-arrow[aria-pressed=true] { outline: 3px solid var(--ts-focus); outline-offset: -3px; }
.fbf-readout { font: 16px/1.5 var(--ts-mono); padding: 8px; background: var(--ts-panel-2); border-radius: 8px; display: grid; gap: 4px; }
.fbf-keys p { color: var(--ts-muted); margin-bottom: 6px; }
@media (min-width: 901px) { #topic-game .ts-panel { width: 330px; padding: 10px; } }
/* stacked layout on narrow screens (Gear Up / Membrane Mayday workaround for the fixed-height stage) */
@media (max-width: 900px) {
  #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: 62.5vw; min-height: 0; }
  #topic-game .ts-panel { overflow: visible; }
  .fbf-add { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 550px) { .fbf-add { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
