/* Local usability fixes; retain approved typography, colors, and animation. */
.nav-toggle { display: none; }
.mg-player-header { flex-wrap: wrap; gap: 16px; }
.mg-player-header #mgCaption { flex: 1 1 280px; }
.mg-player-header .mg-action-group { display: flex; width: auto; gap: 14px; align-items: center; }
.mg-player-header .mg-stepper { display: none; }
.mg-player-header .mg-reset { min-height: 44px; padding: 8px; }
.mg-controls { min-height: 0; padding-block: 12px; }
#requestText::placeholder { color: var(--sub); opacity: 1; }
#requestText[aria-invalid=true] { border-color: var(--accent); }
@media (max-width: 600px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: flex-start; grid-row: 2; grid-column: 1; width: max-content; min-height: 44px; border: 1px solid var(--border2); border-radius: 8px; padding: 8px 14px; background: var(--surface); color: var(--text); }
  .nav-links { display: none; }
  .nav-links.is-open { display: grid; grid-row: 3; grid-column: 1 / -1; grid-template-columns: 1fr 1fr; width: 100%; overflow: visible; gap: 4px 16px; border-top: 1px solid var(--border); padding-top: 8px; }
  .nav-links a { padding: 8px; min-height: 44px; }
  #demo { padding-block: 28px; }
  #demo .section-head { margin-bottom: 20px; }
  #demo .section-head .eyebrow { display: none; }
  #demo h2 { margin-top: 0; }
  .mg-scenarios { gap: 8px; margin-bottom: 12px; }
  .mg-scenarios > button { padding: 8px 12px; min-height: 48px; }
  .mg-scenarios .software-logo { width: 28px; height: 28px; min-width: 28px; flex-basis: 28px; padding: 3px; }
  .mg-player-header { padding: 14px; gap: 8px; }
  .mg-player-header #mgCaption { flex-basis: 100%; font-size: var(--type-body) !important; }
  .mg-player-header .mg-action-group { width: 100%; justify-content: space-between; }
  .mg-player-header .button { padding: 10px 16px; min-height: 44px; }
  .mg-stage { padding: 12px; }
  .mg-window-bar { min-height: 38px; height: 38px; padding: 6px 10px; }
  .mg-window-bar img { width: 22px; height: 22px; }
  .mg-source-body { min-height: 0; padding: 12px 10px; }
  .mg-map-grid { grid-template-columns: repeat(5,minmax(0,1fr)); gap: 6px; width: 100%; }
  .mg-map,.mg-map:nth-child(4),.mg-map:nth-child(5) { grid-column: auto; }
  .mg-map > span { line-height: 1.4; overflow-wrap: anywhere; }
  .mg-map-check { width: 16px; height: 16px; }
  .mg-transfer { height: 40px; min-height: 40px; }
  .mg-host-body { min-height: 230px; padding: 12px; }
  .mg-sd-scene { gap: 12px; grid-template-columns: minmax(0,1fr); }
  .mg-graph { height: 210px; }
  .mg-sd-scene .mg-material-ball { width: 56px; height: 56px; }
  .mg-controls { padding: 10px 14px; }
}
/* Compact selection keeps the actual demonstration ahead of repeated choices. */
.mg-player-header { flex-direction: row; }
.mg-flow-picker { display: none; }
@media (max-width: 800px) {
  .mg-flow-picker { display: grid; gap: 8px; margin-bottom: 16px; color: var(--sub); }
  .mg-flow-picker select { width: 100%; min-height: 48px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--border2); border-radius: 8px; color: var(--text); }
  .mg-flow-picker select:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
  .mg-scenarios { display: none; }
}
