/* Thermometer */
/* touch-action on a shape inside an SVG has no effect in Chrome; it must be on the <svg> */
#pic{touch-action:none}
#pic text{font-family:Lexend,Arial,sans-serif;font-weight:700;fill:var(--ink)}
#pic .ex-name{font-weight:600;fill:#39424e}
#pic .mk-text{fill:#fff}
#pic .hit{cursor:ns-resize;outline:none}
#pic[data-side="1"] .hit{cursor:ew-resize}
#pic .hit:focus-visible{stroke:var(--gold);stroke-width:4px}
#pic .mk{cursor:grab}
#pic.dragging,#pic.dragging *{cursor:grabbing}
#pic .th-call,#pic .th-ex,#pic .th-lens,#pic .th-rf>:not(.mk){pointer-events:none}
#pic .th-call,#pic .th-ex,#pic .th-lens,#pic .th-rf{transition:opacity .25s}

#side{width:21em;gap:.6em}
#side::before,#side::after{content:"";margin:auto}
.th-panel{display:flex;flex-direction:column;gap:.6em}
.th-panel[hidden]{display:none}
.th-grid{display:grid;grid-template-columns:1fr 1fr;gap:.5em .5em;align-items:end}
.th-grid>.btn{width:100%}
.th-cell .ctl{flex-direction:column;align-items:flex-start;gap:.2em}
.th-ico{width:1em;height:1em;flex:none}
.th-start .ctl-label{color:var(--blue)}
.th-end .ctl-label{color:var(--red)}
.th-start .stepper{box-shadow:0 0 0 3px var(--blue-tint);border-color:var(--blue)}
.th-end .stepper{box-shadow:0 0 0 3px var(--red-tint);border-color:var(--red)}
/* while the answer is hidden, the temperature box shows "?" */
.th-mask.on input::placeholder{color:var(--soft);opacity:1}

.th-ans{display:flex;flex-direction:column;gap:.4em;padding:.5em .65em .6em;border:2px solid var(--ink);border-radius:.8em;background:#fff}
.th-top{display:flex;flex-wrap:wrap;gap:.45em}
.th-out{display:flex;flex-direction:column;align-items:center;gap:.15em;text-align:center}
.th-out p{margin:0}
.th-big{font-weight:700;font-size:2.7em;line-height:1.05;font-variant-numeric:tabular-nums;white-space:nowrap}
.th-q{color:var(--soft)}
.th-w1{font:700 1.1em/1.3 var(--font-head)}
.th-w2{font:400 .95em/1.3 var(--font-body);color:#39424e}
.th-chg{font-size:1.25em}
.th-sent{font-weight:700;font-size:1.9em;line-height:1.15;font-variant-numeric:tabular-nums;white-space:nowrap}
.th-split{margin:.15em 0 0;padding:.35em 0 0;list-style:none;border-top:2px dashed var(--line);font:500 .92em/1.4 var(--font-head);width:100%}
.th-split li:last-child{font-weight:700;font-size:1.1em}

/* a tall frame (Full screen, board) has room for a larger answer */
@container (min-height:700px) and (orientation:landscape){
  .th-big{font-size:3.4em}
  .th-sent{font-size:2.3em}
}
/* narrow or portrait tool (phone, tablet): the panel goes under the stage, so that "Turn sideways" has the full width.
   Its height is fixed, so the stage does not move under a finger when the answer changes. */
@container (max-width:680px) or (orientation:portrait){
  .tool-body{flex-direction:column}
  #side{width:auto;height:14.5em;flex:none;border-left:0;border-top:2px solid var(--ink);padding:.45em .6em;gap:.4em}
  #side::before,#side::after{content:none}
  .th-panel{flex-direction:row;align-items:stretch}
  .th-grid{flex:none;width:21em;align-content:start}
  .th-ans{flex:1}
}
@container (max-width:680px){
  #side{height:18.5em;padding:.45em .5em}
  .th-panel{flex-direction:column}
  .th-grid{width:auto}
  .th-ans{flex:none}
  .tool-bar .ctl-label{display:none}
  .tool-bar .spacer{display:none}
  .tool-bar .o1{order:1}.tool-bar .o2{order:2}.tool-bar .o3{order:3}.tool-bar .o4{order:4}.tool-bar .o5{order:5}.tool-bar .o6{order:6}
  .th-long{display:none}
  .th-short{text-transform:capitalize}
  .th-panel{gap:.4em}
  .th-grid{gap:.35em .4em}
  .th-cell .ctl{gap:.1em}
  .th-ans{padding:.35em .5em;gap:.25em;position:relative}
  .th-top{gap:.4em}
  .th-out{gap:.05em}
  /* Read: the readout sits beside the "Show answer" toggle */
  [data-mode=read] .th-top{position:absolute;left:.5em;top:.35em}
  [data-mode=read] .th-out>:first-child{margin-left:45%;width:55%;min-height:42px;display:flex;align-items:center;justify-content:center}
  .th-big{font-size:2em}
  .th-chg{font-size:1.05em}
  .th-sent{font-size:1.45em}
  .th-split{border-top:0;padding:0}
  .th-split li:not(:last-child){display:none}
}
@container (max-width:480px){
  .tool-bar{gap:.4em;padding:.45em .5em}
  .tool-bar .btn{padding:0 .55em}
}
