/* Level the Towers */
.mn-level{min-width:5.4em;font-size:1.05em}
.mn-chev{width:.95em;height:.95em;fill:none;stroke:currentColor;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;margin-right:-.2em}
.mn-optbtn,.mn-done{display:none}

/* the + and − buttons under the towers (Build) sit over the stage, at places that the layout gives */
.mn-stage .mn-keys{position:absolute;inset:0;pointer-events:none}
.mn-keys .mn-pm{position:absolute;pointer-events:auto;padding:0;min-height:0;font-size:1.4em;border-radius:.45em;box-shadow:0 .12em 0 rgba(20,26,34,.18)}

/* the stage */
#pic .mn-num,#pic .mn-pnum,#pic .mn-word{font-family:Lexend,Arial,sans-serif;font-weight:700}
#pic .mn-word{font-weight:600;fill:#465060}
#pic .mn-hit{fill:transparent;stroke:none;outline:none}
#pic .mn-hit:focus-visible{stroke:var(--blue);stroke-width:3;stroke-dasharray:7 5}
#pic .mn-drop{fill:var(--gold-tint);fill-opacity:.85;stroke:var(--gold);stroke-width:2.5;stroke-dasharray:8 6}
#pic .mn-newtag{fill:var(--sun);stroke:var(--ink);stroke-width:2}
#pic .mn-seltag{fill:#fff;stroke:var(--blue);stroke-width:3}
#pic .mn-newtag.sel{stroke:var(--blue);stroke-width:3.5}
#pic .mn-block.held,#pic .mn-block.picked{filter:drop-shadow(0 5px 5px rgba(20,26,34,.32))}
#pic .mn-halo{stroke:#fff;stroke-width:5.5;stroke-linecap:round;opacity:.8}
#pic .mn-mean .mn-stroke{stroke:var(--ink);stroke-width:3.5;stroke-dasharray:13 8;stroke-linecap:round}
#pic .mn-old .mn-stroke{stroke:#7b8694;stroke-width:3;stroke-dasharray:5 7;stroke-linecap:round}
#pic .mn-guess .mn-stroke{stroke:var(--red);stroke-width:3.5;stroke-linecap:round}
#pic .mn-pill rect{fill:#fff;stroke:var(--ink);stroke-width:2.5}
#pic .mn-pill-old rect{stroke:#7b8694}
#pic .mn-pill-old .mn-pnum{fill:#5b6573}
#pic .mn-pill-guess{cursor:ns-resize;outline:none}
#pic .mn-pill-guess rect{fill:var(--red);stroke:var(--ink)}
#pic .mn-pill-guess .mn-word{fill:#fff}
#pic .mn-pill-guess:focus-visible rect{stroke:var(--blue);stroke-width:4}
#pic .mn-pill-guess path{stroke:#fff}

/* the results and the options */
#side{width:17.5em;gap:.45em;padding-bottom:1.5em}
.mn-read{display:flex;flex-direction:column;gap:.4em}
.mn-cards{display:grid;grid-template-columns:1fr 1fr;gap:.45em}
.mn-card{display:flex;flex-direction:column;align-items:center;text-align:center;border:2px solid var(--ink);border-radius:.8em;background:#fff;padding:.25em .4em .4em;min-width:0}
.mn-mc{background:var(--tint-yellow)}
.mn-k{font-weight:600;color:var(--soft);font-size:.85em}
.mn-big{font-size:2.4em;font-weight:700;line-height:1.12;font-variant-numeric:tabular-nums;white-space:nowrap}
.mn-big.hide{color:var(--soft)}
.mn-big.tick{animation:mn-tick .5s ease-out}
@keyframes mn-tick{0%{transform:scale(1)}35%{transform:scale(1.14)}100%{transform:scale(1)}}
@media (prefers-reduced-motion:reduce){.mn-big.tick{animation:none}}
.mn-sub{font-size:.78em;font-weight:600;color:var(--soft);line-height:1.2}
.mn-mc .mn-sub{color:#39424e}
.mn-moves{display:inline-block;margin-left:.3em;padding:0 .45em;border-radius:1em;background:var(--desk);color:#39424e;font-variant-numeric:tabular-nums}
.mn-words{display:flex;flex-direction:column;gap:.4em}
.mn-work{margin:0;padding:.3em .5em;border:2px solid var(--ink);border-radius:.6em;background:#fff;font-weight:700;font-size:.84em;line-height:1.35}
.mn-say{margin:0;min-height:4.2em;font:600 .92em/1.38 var(--font-head);color:#2b3440}
/* a stacked fraction in the text: its text is still "4 1/3" */
.mn-n{white-space:nowrap}
.mn-sp{display:inline-block;width:.14em}
.mn-fr{display:inline-flex;flex-direction:column;align-items:center;vertical-align:middle;font-size:.58em;line-height:1.02;margin:0 .04em}
.mn-fn{border-bottom:.11em solid currentColor;padding:0 .14em .05em}
.mn-fd{padding-top:.05em}
.mn-big .mn-fr{font-size:.5em;vertical-align:.12em}
.mn-opts{display:flex;flex-direction:column;gap:.5em;margin-top:auto;padding-top:.5em;border-top:2px dashed var(--line)}
.mn-optslot{display:contents}
.mn-optrow{display:flex;flex-wrap:wrap;gap:.45em}
.mn-toggles .btn{padding:0 .6em}
#side .mn-kind{flex-direction:column;align-items:flex-start;gap:.3em}

/* the examples menu */
.mn-menu{position:absolute;z-index:30;min-width:17em;display:flex;flex-direction:column;gap:.1em;padding:.4em;background:#fff;border:2px solid var(--ink);border-radius:.8em;box-shadow:0 .5em 1.4em rgba(20,26,34,.2)}
.mn-menu-head{display:none}
.mn-ex{display:flex;justify-content:space-between;align-items:baseline;gap:1.2em;min-height:max(2.3em,42px);padding:.35em .7em;border:0;border-radius:.5em;background:none;color:var(--ink);font:600 1em var(--font-head);text-align:left;cursor:pointer}
.mn-ex:hover,.mn-ex:focus-visible{background:var(--grid)}
.mn-ex span{color:var(--soft);font-variant-numeric:tabular-nums;white-space:nowrap}

/* a narrow tool (phone): the results are a strip above the stage; the options open over the stage */
@container (max-width:680px){
  .tool-bar{gap:.45em .45em;padding:.45em}
  .mn-optbtn{display:inline-flex}
  /* the bar keeps two rows: Level and the step first, then the mode, a new set and the options */
  .mn-level{order:1;min-width:4.8em}
  .mn-step,.mn-more{order:2}
  .mn-again{order:3}
  .mn-mode{order:4}
  .mn-new{order:5}
  .tool-bar .spacer{order:6}
  .mn-optbtn{order:7}
  .tool-bar .btn{padding:0 .75em}
  .tool-body{flex-direction:column;position:relative}
  #side{order:-1;width:auto;flex:none;height:5.2em;padding:.35em .45em;border-left:0;border-bottom:2px solid var(--ink);overflow:hidden;gap:0}
  .mn-read{flex-direction:row;align-items:stretch;gap:.4em;height:100%}
  .mn-cards{flex:none;gap:.35em}
  .mn-card{flex-direction:column;justify-content:center;padding:.1em .45em .15em;min-width:4.6em}
  .mn-k{font-size:.75em;line-height:1.1}
  .mn-big{font-size:1.75em;line-height:1.05}
  .mn-sub{font-size:.68em}
  /* the words beside the cards: the working (when it is on) above the sentence */
  .mn-moves{display:block;margin:0;padding:0;background:none}
  .mn-words{flex:1;min-width:0;justify-content:center;gap:.15em;overflow:hidden}
  .mn-work{padding:0;border:0;background:none;font-size:.82em;line-height:1.2;white-space:nowrap}
  .mn-wl{display:none}
  .mn-say{min-height:0;font-size:.76em;line-height:1.22;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;overflow:hidden}
  /* with the working on, the strip is one line taller (it changes only when Working is turned on or off) */
  .mn-working #side{height:6.1em}
  .mn-opts{display:none;position:absolute;inset:0;z-index:25;margin:0;padding:.7em 1em 1.6em;gap:.65em;background:#fff;border:0;overflow:auto}
  .mn-opts.open{display:flex}
  .mn-opts>*,.mn-optslot>*{align-self:flex-start}
  .mn-opts .ctl{flex-direction:column;align-items:flex-start;gap:.3em}
  .mn-opts .mn-done{display:inline-flex;align-self:flex-end}
  .mn-opts .mn-exbtn{align-self:flex-start}
  .mn-menu{inset:0;min-width:0;border-radius:0;border:0;padding:.7em 1em 1.6em;overflow:auto;box-shadow:none}
  .mn-menu-head{display:flex;align-items:center;justify-content:space-between;padding:0 .2em .4em;font-size:1.1em}
}
