/* Keep the two alloys comparable on narrow screens without shrinking inputs. */
@media (max-width:639px), (max-width:860px) and (orientation:portrait) {
  body.av-new .av-workspace{padding:20px 10px 30px!important}
  body.av-new .av-heading{margin-bottom:12px;padding-bottom:12px}
  body.av-new .av-heading h1{font-size:32px}
  body.av-new .av-direction-note{margin-bottom:14px;font-size:11px}
  body.av-new .av-layout{grid-template-columns:minmax(0,1fr) 44px minmax(0,1fr);max-width:none;align-items:start}
  body.av-new .av-panel{padding:14px 8px;min-width:0}
  body.av-new .av-panel-heading{min-height:44px;margin-bottom:12px;align-items:flex-start}
  body.av-new .av-panel-heading h2{font-size:clamp(20px,4vw,26px);line-height:1.1;overflow-wrap:normal}
  body.av-new .av-main-fields{grid-template-columns:minmax(0,1fr);gap:8px}
  body.av-new .av-field-label,body.av-new .av-node .av-field-label{font-size:11px;line-height:1.4}
  body.av-new .av-input-wrap input,body.av-new .av-node .av-input-wrap input,body.av-new .av-second-split .av-input-wrap input{font-size:18px;min-height:44px;letter-spacing:-.02em}
  body.av-new .av-main-fields .av-input-wrap input{font-size:21px}
  body.av-new .av-input-wrap>span,body.av-new .av-second-split .av-input-wrap>span{font-size:11px}
  body.av-new .av-options{font-size:11px}
  body.av-new .av-options summary{min-height:36px;line-height:1.4}
  body.av-new .av-presets{gap:4px}
  body.av-new .av-presets button{font-size:11px;min-height:36px;padding:4px 7px}
  body.av-new .av-mass-mode,body.av-new .av-workspace:not(.av-reverse) #av-source-mode{height:44px;min-height:44px;margin:7px 0 1px;font-size:11px;line-height:1.4;align-content:center;gap:2px}
  body.av-new .av-mass-mode button{font-size:11px;line-height:1.4;text-align:left}
  body.av-new .av-ingot-block{padding:7px 0 16px}
  body.av-new .av-ingot-caption{display:none}
  body.av-new .av-ingot{height:68px}
  body.av-new .av-ingot-top{height:22px}
  body.av-new .av-ingot-face{height:43px}
  body.av-new .av-ingot-au{top:11px;font-size:16px}
  body.av-new .av-ingot-base{display:none}
  body.av-new .av-ingot-legend{display:grid;grid-template-columns:1fr;gap:5px;font-size:11px;margin-top:10px}
  body.av-new .av-ingot-legend>span{gap:4px;flex-wrap:wrap}
  body.av-new .av-ingot-legend b{margin-left:auto;white-space:nowrap}
  body.av-new .av-first-split,body.av-new .av-second-split{grid-template-columns:minmax(0,1fr);gap:12px}
  body.av-new .av-base-branch{display:block;min-width:0}
  body.av-new .av-tree{padding-top:15px}
  body.av-new .av-tree:before{left:-4px;width:calc(50% + 4px);height:0;border-left:0;border-top:1px solid #536a79}
  body.av-new .av-first-split:before{display:none}
  body.av-new .av-gold-node:before,body.av-new .av-base-node:before{content:'';position:absolute;left:-5px;top:20px;width:4px;border-top:1px solid #536a79}
  body.av-new .av-gold-node:after{content:'';position:absolute;left:-5px;top:-16px;bottom:-13px;border-left:1px solid #536a79}
  body.av-new .av-base-node:after{content:'';position:absolute;left:-5px;top:-1px;height:21px;border-left:1px solid #536a79}
  body.av-new .av-second-split{padding:15px 0 0 7px;border-left:1px solid #536a79;margin-left:5px}
  body.av-new .av-second-split:before,body.av-new .av-second-split:after{display:none}
  body.av-new .av-second-split .av-node:before{content:'';position:absolute;top:20px;left:-8px;width:7px;border-top:1px solid #536a79}
  body.av-new .av-node,body.av-new .av-second-split .av-node{padding:10px 6px}
  body.av-new .av-node h3,body.av-new .av-second-split h3{font-size:12px;line-height:1.4;margin-bottom:7px;gap:4px}
  body.av-new .av-node h3>span{display:none}
  body.av-new .av-small-number{margin-top:7px}
  body.av-new .av-small-number .av-input-wrap input,body.av-new .av-second-split .av-small-number .av-input-wrap input{font-size:16px}
  body.av-new .av-between{padding:390px 0 0;transform:none}
  body.av-new .av-between button{width:44px;min-width:44px;min-height:44px;padding:8px;gap:0;justify-content:center}
  body.av-new .av-between button>span{display:none}
  body.av-new .av-between button svg{transform:none}
  body.av-new .av-between button.av-reversed svg{transform:rotate(180deg)}
}
