/* Projectile Motion */
#bar .slider input[type=range]{width:6.5em}
.pm-slide .slider{gap:.3em}
.pm-slide output{min-width:4.3em;text-align:left}
#bar .pm-slide:first-child output{min-width:2.3em}
.pm-nudge{flex:none;width:max(1.9em,36px);height:max(2.15em,40px);padding:0;border:2px solid var(--ink);border-radius:.55em;background:#fff;color:var(--ink);font:700 1.15em/1 var(--font-head);cursor:pointer;-webkit-tap-highlight-color:transparent}
.pm-nudge:hover{background:var(--grid)}
.pm-nudge:active{transform:translateY(1px)}
.pm-pause{min-width:6.2em}

/* readout line and picture: a white sheet with a grid in metres */
.pm-main{flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;background:#fff}
.pm-read{flex:none;display:flex;flex-wrap:wrap;align-items:center;gap:.3em 1.6em;padding:.4em .9em .2em;border-left:.45em solid var(--c,var(--ink));margin:.45em 0 0 .7em}
.pm-cell{display:flex;flex-direction:column;min-width:6.2em}
.pm-lab{font-size:.78em;font-weight:600;color:var(--soft);white-space:nowrap}
.pm-val{font-size:1.55em;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap;line-height:1.1}
.pm-step{font-size:.82em;font-weight:600;color:var(--soft);white-space:nowrap}
.pm-msg{margin-left:auto;margin-right:.4em;font-weight:700;font-size:1.15em}
.pm-msg:empty{display:none}
.pm-msg.hit,.pm-msg.miss{padding:.35em .8em;border:2px solid var(--ink);border-radius:.6em}
.pm-msg.hit{background:var(--green);color:#fff;font-size:1.4em}
.pm-msg.miss{background:var(--red-tint);color:#a62610}

/* touch-action has no effect on shapes inside an SVG, so the whole picture takes the finger (to drag the launcher) */
#pic{touch-action:none}
#pic .pm-grid{fill:none;stroke:var(--grid);stroke-width:1}
#pic .pm-grid.major{stroke:var(--grid-strong);stroke-width:1.3}
#pic .pm-ground{fill:var(--green-tint)}
#pic .pm-axis{stroke:var(--ink);stroke-width:2;fill:none}
#pic .pm-axis.ground{stroke-width:3.5}
#pic text{font-family:Lexend,Arial,sans-serif;font-weight:700}
#pic .pm-ax{font-size:.85em;fill:var(--ink);paint-order:stroke;stroke:#fff;stroke-width:3px;stroke-linejoin:round}
#pic .pm-title{font-size:.72em;font-weight:600;fill:var(--soft)}
#pic .pm-preview{fill:none;stroke:var(--soft);stroke-dasharray:0 .55em;stroke-linecap:round;opacity:.85}
#pic .pm-path{fill:none;stroke-linecap:round;stroke-linejoin:round}
#pic .pm-mark{stroke:var(--ink);stroke-width:1.5}
#pic .pm-platform rect{stroke:var(--ink);stroke-width:2.5;stroke-linejoin:round}
#pic .pm-plat{font-size:.85em;fill:var(--ink)}
#pic .pm-gun>*,#pic .pm-gun rect{stroke:var(--ink);stroke-width:2.5;stroke-linejoin:round}
#pic .pm-ref{fill:none;stroke:var(--soft);stroke-width:1.5;stroke-dasharray:4 4}
#pic .pm-arc{fill:none;stroke:var(--blue)}
#pic .pm-angle{font-size:1.2em;fill:var(--blue-ink);paint-order:stroke;stroke:#fff;stroke-width:4px;stroke-linejoin:round}
#pic .pm-flag{font-size:1em;fill:var(--ink);paint-order:stroke;stroke:#fff;stroke-width:4px;stroke-linejoin:round}
#pic .pm-vec{font-size:.8em;fill:var(--ink);paint-order:stroke;stroke:#fff;stroke-width:3.5px;stroke-linejoin:round}
#pic .pm-vec.h{fill:var(--blue-ink)}
#pic .pm-vec.v{fill:#a62610}
#pic .pm-tag circle{stroke:var(--ink);stroke-width:2}
#pic .pm-tagnum{font-size:.95em;fill:#fff}
#pic .pm-aim{cursor:grab;outline:none}
#pic .pm-aim.grab{cursor:grabbing}
#pic .pm-aim:focus-visible{stroke:var(--blue);stroke-width:3;stroke-dasharray:6 5}

/* side panel */
#side{width:22.5em;gap:.65em}
.pm-group{display:flex;flex-wrap:wrap;align-items:center;gap:.45em}
#side .seg .btn{padding:0 .62em}
.pm-planet{display:flex;flex-direction:column;align-items:center;gap:.12em;line-height:1}
.pm-planet small{font-size:.7em;font-weight:600;opacity:.85;font-variant-numeric:tabular-nums}
.pm-runs{display:flex;flex-direction:column;gap:.35em;min-height:0}
.pm-runs-head{display:flex;align-items:center;gap:.45em}
.pm-h{font-weight:700;font-size:1.05em}
.pm-scroll{overflow:auto;min-height:0}
.pm-table{width:100%;border-collapse:collapse;font-size:.8em;font-variant-numeric:tabular-nums;text-align:right}
.pm-table th{position:sticky;top:0;background:#fff;font-weight:600;color:var(--soft);line-height:1.1;padding:.2em .3em .3em;box-shadow:inset 0 -2px 0 var(--ink);vertical-align:bottom;white-space:nowrap}
.pm-table th small{display:block;font-size:.85em;font-weight:500}
.pm-table td{padding:.16em .3em;border-bottom:1px solid var(--line);font-weight:600;white-space:nowrap}
.pm-table th:first-child,.pm-table td:first-child{text-align:center;padding-left:0}
.pm-table .pm-res{font-weight:700}
.pm-table .pm-empty td{text-align:left;color:var(--soft);font-weight:500;white-space:normal;padding:.6em .2em}
.pm-badge{display:inline-grid;place-items:center;width:1.55em;height:1.55em;border-radius:50%;background:var(--c);color:#fff;font-weight:700;border:2px solid var(--ink)}

/* narrow tool (tablet, phone): the panel goes under the picture */
@container (max-width:900px){
  .tool-body{flex-direction:column}
  .pm-main{min-height:15em}
  #side{width:auto;flex:none;max-height:42%;flex-direction:row;flex-wrap:wrap;align-items:flex-start;gap:.5em 1.2em;border-left:0;border-top:2px solid var(--ink);padding:.5em .7em}
  .pm-runs{flex-basis:100%}
}
@container (max-width:520px){
  #bar{gap:.4em .6em;padding:.45em .5em}
  #bar .slider input[type=range]{flex:1;width:auto;min-width:4em}
  #bar .pm-slide{flex:1 1 100%;flex-wrap:nowrap}
  #bar .pm-slide .ctl-label{width:3.6em}
  #bar .pm-slide .slider{flex:1}
  #bar .spacer{display:none}
  .pm-read{gap:.2em 1em;margin-left:.4em;padding:.3em .5em .1em}
  .pm-cell{min-width:0}
  .pm-val{font-size:1.3em}
  .pm-msg{margin-left:0;flex-basis:100%;font-size:1em}
  .pm-main{min-height:13em}
}
