/* Simulatore di matematica - stessa grafica dei simulatori di elettronica e meccatronica (21/10/2026) */
.mt { --bg:#fbfcfe; --pn:#ffffff; --panel:#f6f8fb; --field:#ffffff; --bd:#d3dbe6; --tx:#1f2937; --mu:#64748b; --ac:#2563eb; --ac2:#e8f0fe; --ok:#15803d; --okbg:#dcfce7; --bad:#dc2626; --warn:#b45309; --cv:#fbfcfe; --wire:#9aa7b8; --hov:rgba(15,23,42,.05); --shadow:0 14px 40px rgba(15,23,42,.22); --menu:#ffffff;
  --gr:#15803d; --tl:#0d9488; --vi:#7c3aed; --an:#2563eb; --water:#4f9cf7; --dot:rgba(15,23,42,.17); --ink:#1f2933;
  --c1:#2563eb; --c2:#16a34a; --c3:#d97706; --c4:#9333ea; --c5:#dc2626; --c6:#0891b2; --c7:#be185d; --c8:#65a30d;
  font-family:inherit; color:var(--tx); position:relative; text-align:left; font-size:.92rem; container-type:inline-size; display:block; width:100%; }
.mt[data-tema="scuro"] { --bg:#0b0d11; --pn:#14181f; --panel:rgba(255,255,255,.035); --field:rgba(255,255,255,.08); --bd:rgba(255,255,255,.14); --tx:#e8edf4; --mu:#9fb0c4; --ac:#4f8dfd; --ac2:#172033; --ok:#4ade80; --okbg:#0f3a2c; --bad:#f87171; --warn:#fbbf24; --cv:#0b0e13; --wire:#5d6a7d; --hov:rgba(255,255,255,.07); --shadow:0 14px 40px rgba(0,0,0,.55); --menu:#0f1217;
  --gr:#4ade80; --tl:#2dd4bf; --vi:#a78bfa; --an:#6aa8ff; --water:#3b82f6; --dot:rgba(255,255,255,.16); --ink:#e8edf4;
  --c1:#60a5fa; --c2:#34d399; --c3:#fbbf24; --c4:#c084fc; --c5:#f87171; --c6:#22d3ee; --c7:#f472b6; --c8:#a3e635; }
.mt *, .mt *::before, .mt *::after { box-sizing:border-box; }
.mt svg { flex:none; } .mt button { font:inherit; color:inherit; } .mt [hidden] { display:none !important; }
.mtMu { color:var(--mu); font-size:.84rem; line-height:1.45; }
/* barra strumenti */
.mtTb { display:flex; flex-wrap:wrap; align-items:center; gap:4px; padding:0 0 6px; margin-bottom:6px; border:0; border-radius:0; background:none; }
.mtBtn { display:inline-flex; align-items:center; justify-content:center; height:36px; min-width:36px; padding:0 8px; border:1px solid transparent; border-radius:9px; background:transparent; color:var(--tx); cursor:pointer; transition:background .12s,border-color .12s; }
.mtBtn svg { width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; }
.mtBtn:hover:not(:disabled) { background:var(--hov); }
.mtBtn:disabled { opacity:.35; cursor:default; }
.mtBtn:focus-visible, .mtSpeed:focus-visible, .mtPalI:focus-visible, .mtPT:focus-visible { outline:2px solid var(--ac); outline-offset:2px; }
.mtBtn[aria-pressed="true"] { background:color-mix(in srgb, var(--ac) 20%, transparent); border-color:var(--ac); color:var(--ac); }
.mtBtn.mtPlay { width:44px; background:#16a34a; color:#fff; border-color:#15803d; }
.mtBtn.mtPlay:hover:not(:disabled) { background:#15803d; }
.mtBtn.mtPlay.on { background:#dc2626; border-color:#b91c1c; } .mtBtn.mtPlay.on:hover { background:#b91c1c; }
.mtSpeed, .mt select, .mt input[type=text], .mt input[type=search], .mt input[type=number] { height:34px; padding:0 9px; font:inherit; font-size:.86rem; border:1px solid var(--bd); border-radius:8px; background:var(--field); color:inherit; outline:none; }
.mtSpeed { height:36px; width:auto; min-width:70px; }
.mt input:focus, .mt select:focus { border-color:var(--ac); box-shadow:0 0 0 3px color-mix(in srgb, var(--ac) 25%, transparent); }
.mt option { color:#111; background:#fff; }
.mtSep { width:1px; height:24px; background:var(--bd); margin:0 5px; }
.mtSp { flex:1; }
.mtStat { display:inline-flex; align-items:center; gap:7px; font-size:.82rem; color:var(--mu); padding:0 8px; }
.mtLed { width:9px; height:9px; border-radius:50%; background:var(--bd); display:inline-block; }
.mtStat.on .mtLed { background:var(--ok); box-shadow:0 0 8px var(--ok); } .mtStat.on { color:var(--ok); }
.mtSt { font-weight:700; font-variant-numeric:tabular-nums; }
.mtB { display:inline-flex; align-items:center; gap:6px; height:34px; padding:0 12px; font-size:.86rem; border:1px solid var(--bd); border-radius:9px; background:var(--field); color:var(--tx); cursor:pointer; }
.mtB:hover:not(:disabled) { border-color:var(--ac); }
.mtB.primary { background:var(--ac); border-color:var(--ac); color:#fff; font-weight:600; }
.mtB.del { color:var(--bad); } .mtB.del:hover { border-color:var(--bad); }
/* corpo */
.mtBody { display:grid; gap:10px; align-items:stretch; }
.mtPal, .mtProp { display:flex; flex-direction:column; min-height:0; border:1px solid var(--bd); border-radius:12px; background:var(--panel); overflow:hidden; }
.mtPalH { padding:10px 10px 0; }
.mtSearch { position:relative; display:block; } .mtSearch svg { position:absolute; left:10px; top:50%; width:16px; height:16px; transform:translateY(-50%); fill:none; stroke:var(--mu); stroke-width:2; stroke-linecap:round; pointer-events:none; }
.mt .mtSearch input { width:100%; height:36px; padding:0 10px 0 33px; border-radius:999px; }
.mtPalT { display:grid; grid-template-columns:repeat(6,1fr); gap:3px; padding:8px; border-bottom:1px solid var(--bd); }
.mtPT { min-width:0; height:30px; box-sizing:border-box; padding:0; border-radius:9px; border:1px solid transparent; background:transparent; color:var(--mu); display:grid; place-items:center; cursor:pointer; }
.mtPT .mtMini { width:18px; height:18px; color:inherit; } .mtPT .mtMini svg { width:18px; height:18px; }
.mtPT:hover { background:var(--hov); }
.mtPT.on { background:color-mix(in srgb, var(--ac) 14%, transparent); color:var(--ac); border-color:color-mix(in srgb, var(--ac) 45%, transparent); }
.mtPalL { flex:1; overflow:auto; padding:6px 8px 12px; }
.mtPalS { display:flex; align-items:baseline; justify-content:space-between; gap:6px; padding:6px 4px 8px; font-size:.92rem; font-weight:700; line-height:1.25; color:var(--tx); } .mtPalS small { color:var(--mu); font-weight:400; }
.mtPalI { min-width:0; display:flex; align-items:center; gap:8px; padding:4px 8px 4px 4px; margin-bottom:4px; border-radius:10px; border:1px solid transparent; background:transparent; cursor:grab; user-select:none; touch-action:none; font-size:.8rem; line-height:1.2; color:var(--tx); }
.mtPalI:hover { background:var(--hov); border-color:var(--bd); }
.mtMini { flex:none; width:52px; height:34px; display:flex; align-items:center; justify-content:center; color:var(--ink); } .mtMini svg { width:100%; height:100%; display:block; }
.mtPalI .mtMini { box-sizing:border-box; background:var(--field); border:1px solid var(--bd); border-radius:8px; padding:2px; }
.mtPalTip { font-size:.74rem; color:var(--mu); padding:8px 12px 10px; line-height:1.4; border-top:1px solid var(--bd); }
/* lavagna */
.mtBoard { position:relative; min-width:0; border:1px solid var(--bd); border-radius:12px; overflow:hidden; background:var(--cv); touch-action:none; }
.mtCv { display:block; width:100%; height:100%; user-select:none; -webkit-user-select:none; cursor:default; outline:none; touch-action:none; }
.mtCv.pan { cursor:grabbing; }
.mtExT { position:absolute; left:10px; top:10px; z-index:5; max-width:70%; padding:6px 12px; border-radius:999px; background:var(--menu); border:1px solid var(--bd); font-size:.82rem; box-shadow:0 4px 14px rgba(0,0,0,.18); pointer-events:none; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; } .mtExT:empty { display:none; }
.mtZl { position:absolute; right:10px; bottom:10px; z-index:5; padding:3px 10px; border-radius:999px; background:var(--menu); border:1px solid var(--bd); font-size:.76rem; color:var(--mu); pointer-events:none; font-variant-numeric:tabular-nums; }
/* pannello proprieta' */
.mtProp { padding:12px; overflow:auto; gap:12px; }
.mtPrj { display:grid; gap:8px; padding-bottom:12px; border-bottom:1px solid var(--bd); }
.mtPrj label { display:grid; gap:6px; color:var(--mu); font-size:.84rem; } .mtPrj input { width:100%; }
.mtPSt { font-size:.78rem; color:var(--mu); display:flex; align-items:center; gap:6px; } .mtPSt i { width:8px; height:8px; border-radius:50%; background:var(--mu); display:inline-block; } .mtPSt.ok i { background:var(--ok); } .mtPSt.wait i { background:var(--warn); } .mtPSt.err i { background:var(--bad); }
.mtInsp { display:grid; gap:10px; align-content:start; font-size:.86rem; }
/* blocchi */
/* scope */
/* finestre e menu */
.mtModal { position:absolute; inset:0; z-index:80; display:flex; align-items:flex-start; justify-content:center; padding:70px 14px 14px; background:rgba(5,8,14,.55); }
.mtMBox { width:min(480px,100%); max-height:80vh; overflow:auto; border:1px solid var(--bd); border-radius:14px; background:var(--menu); box-shadow:var(--shadow); }
.mtMH { display:flex; align-items:center; justify-content:space-between; padding:10px 10px 10px 16px; border-bottom:1px solid var(--bd); }
.mtMX { font:inherit; font-size:1.3rem; line-height:1; border:0; background:none; color:var(--mu); cursor:pointer; padding:0 6px; }
.mtMB { padding:14px 16px; font-size:.9rem; line-height:1.5; } .mtMB p { margin:0; }
.mtMF { display:flex; justify-content:flex-end; gap:8px; padding:10px 16px 14px; }
.mtList { list-style:none; margin:0; padding:0; display:grid; gap:6px; } .mtList li { display:flex; gap:6px; }
.mtOpenI { flex:1; display:flex; flex-direction:column; align-items:flex-start; gap:2px; padding:9px 12px; border:1px solid var(--bd); border-radius:9px; background:var(--field); cursor:pointer; text-align:left; } .mtOpenI:hover { border-color:var(--ac); } .mtOpenI small { color:var(--mu); }
.mtFlash { position:absolute; left:50%; bottom:54px; transform:translate(-50%,10px); background:var(--tx); color:var(--pn); padding:9px 16px; border-radius:10px; font-size:.84rem; opacity:0; pointer-events:none; transition:.2s; z-index:90; max-width:90%; }
.mtFlash.on { opacity:1; transform:translate(-50%,0); }
.mtPop { position:absolute; z-index:60; width:300px; max-height:75%; overflow:auto; background:var(--menu); border:1px solid var(--bd); border-radius:12px; box-shadow:var(--shadow); padding:6px; }
.mtPop button { display:flex; flex-direction:column; align-items:flex-start; gap:2px; width:100%; text-align:left; background:none; border:0; border-radius:8px; padding:8px 10px; color:var(--tx); cursor:pointer; }
.mtPop button:hover { background:var(--hov); }
.mtPop b { display:block; font-size:.86rem; } .mtPop small { color:var(--mu); font-size:.78rem; line-height:1.3; display:block; }
.mtPop button.cur b::after { content:" ✓"; color:var(--ac); }

.mtPop button i { width:7px; height:7px; border-radius:50%; flex:none; margin-top:6px; } .mtPop button span { display:block; min-width:0; }
.mtPop button { flex-direction:row; align-items:flex-start; gap:10px; }
.mtPopW { width:auto; max-width:1160px; display:grid; grid-template-columns:repeat(auto-fit,minmax(172px,1fr)); gap:4px 14px; padding:14px 16px 16px; border-radius:16px; background:#0a0b0e; border-color:rgba(255,255,255,.1); color:#eceff4; box-shadow:0 30px 90px rgba(0,0,0,.7); }
.mt:not([data-tema="scuro"]) .mtPopW { background:#fff; color:#1f2937; border-color:var(--bd); box-shadow:0 20px 60px rgba(15,23,42,.25); }
.mtPopW .mtPopG h4 { margin:2px 8px 8px; font-size:.68rem; letter-spacing:.14em; text-transform:uppercase; color:var(--mu); font-weight:700; }
.mtPopW button { color:inherit; } .mtPopW button b { color:inherit; } .mtPopW button:hover, .mtPopW button:focus-visible { background:rgba(255,255,255,.07); outline:none; }
.mt:not([data-tema="scuro"]) .mtPopW button:hover { background:rgba(15,23,42,.06); }

/* ---- layout fisica ---- */
.mtBody { grid-template-columns:208px minmax(0,1fr) 282px; grid-template-rows:clamp(560px,84vh,1000px); grid-template-areas:"pal board prop"; }
.mtPal { grid-area:pal; } .mtBoard { grid-area:board; display:flex; flex-direction:column; } .mtProp { grid-area:prop; }
.mtSc { position:relative; flex:1 1 auto; min-height:0; background:var(--cv); background-image:radial-gradient(var(--dot) 1.1px, transparent 1.2px); background-size:20px 20px; }
.mtCv { position:absolute; inset:0; width:100%; height:100%; }
.mtTx { font-family:inherit; font-variant-numeric:tabular-nums; user-select:none; pointer-events:none; }
.mtGr { flex:none; height:206px; display:grid; grid-template-columns:1fr 1fr; border-top:1px solid var(--bd); background:var(--pn); }
.mtGp { position:relative; min-width:0; min-height:0; } .mtGp + .mtGp { border-left:1px solid var(--bd); }
.mtGs { position:absolute; inset:0; width:100%; height:100%; display:block; }
.mtMini svg { fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.mtPalI .mtMini { width:38px; height:38px; padding:5px; } .mtPalI { cursor:pointer; }
.mtPalI > span:last-child { min-width:0; } .mtPalI b { display:block; font-size:.86rem; font-weight:600; } .mtPalI small { display:block; color:var(--mu); font-size:.73rem; line-height:1.25; }
.mtPalI.cur { background:color-mix(in srgb, var(--ac) 12%, transparent); border-color:color-mix(in srgb, var(--ac) 45%, transparent); }
.mtVecB { gap:7px; } .mtVecB span { font-size:.84rem; }
.mtBtn.mtVecB[aria-pressed="true"] { background:color-mix(in srgb, var(--ac) 20%, transparent); }
/* pannello */
.mtProp { gap:0; padding:14px; }
.mtPH2 { display:grid; gap:2px; padding:12px 0 4px; } .mtPH2 b { font-size:1rem; } .mtPH2 small { color:var(--mu); font-size:.8rem; line-height:1.35; }
.mtH { margin:14px 0 8px; font-size:.68rem; letter-spacing:.14em; text-transform:uppercase; color:var(--mu); font-weight:700; }
.mtPar { display:grid; gap:4px; margin-bottom:9px; } .mtPar.lk { opacity:.6; }
.mtPR { display:flex; align-items:center; justify-content:space-between; gap:8px; } .mtPR label { color:var(--tx); font-size:.84rem; } .mtPR > span { display:inline-flex; align-items:baseline; gap:4px; }
.mtPR input[type=number] { width:74px; height:28px; padding:0 6px; text-align:right; font-weight:700; font-variant-numeric:tabular-nums; border-color:transparent; background:transparent; }
.mtPR input[type=number]:hover { border-color:var(--bd); } .mtPR small { color:var(--mu); font-size:.78rem; min-width:1.2em; }
.mtPar input[type=range] { width:100%; accent-color:var(--ac); height:18px; margin:0; padding:0; }
.mtPar select { width:100%; }
.mtLk { display:inline-flex; vertical-align:-3px; color:var(--warn); } .mtLk svg { width:14px; height:14px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.mtRes { display:grid; grid-template-columns:1fr 1fr; gap:7px; }
.mtTile { display:grid; gap:2px; padding:8px 10px; border:1px solid var(--bd); border-radius:10px; background:var(--field); min-width:0; }
.mtTile small { color:var(--mu); font-size:.74rem; line-height:1.2; } .mtTile b { font-size:1rem; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; } .mtTile b i { font-style:normal; font-weight:500; color:var(--mu); font-size:.78rem; }
.mtTile.lv { border-color:color-mix(in srgb, var(--ok) 40%, var(--bd)); }
.mtFm { margin-top:2px; padding:10px 12px; border:1px solid color-mix(in srgb, var(--ac) 40%, var(--bd)); border-radius:10px; background:color-mix(in srgb, var(--ac) 9%, transparent); font-family:Georgia,'Times New Roman',serif; font-style:italic; line-height:1.75; font-size:.9rem; overflow-wrap:anywhere; }
.mtFm b { font-style:normal; } .mtFm.sm { font-size:.84rem; margin-top:8px; }
.mtNote { margin-top:10px; padding:8px 10px; border-radius:10px; border:1px solid color-mix(in srgb, var(--warn) 55%, transparent); background:color-mix(in srgb, var(--warn) 10%, transparent); font-size:.8rem; line-height:1.4; }
.mtEx { margin:12px 0 0; padding:10px 12px; border:1px solid color-mix(in srgb, var(--warn) 55%, var(--bd)); border-radius:12px; background:color-mix(in srgb, var(--warn) 8%, transparent); }
.mtEx.ok { border-color:var(--ok); background:color-mix(in srgb, var(--ok) 11%, transparent); }
.mtExH { display:flex; align-items:center; justify-content:space-between; gap:8px; } .mtExH b { font-size:.92rem; }
.mtEx p { margin:6px 0 8px; font-size:.86rem; line-height:1.45; } .mtExV { font-size:.82rem; color:var(--mu); margin-bottom:6px; } .mtExV b { color:var(--tx); }
.mtExS { display:flex; align-items:center; gap:6px; font-size:.82rem; font-weight:600; color:var(--mu); } .mtEx.ok .mtExS { color:var(--ok); } .mtExS svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:2.4; stroke-linecap:round; stroke-linejoin:round; }
.mtExB { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; } .mtExB .mtB { height:30px; font-size:.8rem; }
@container (max-width:1020px) { .mtBody { grid-template-columns:196px minmax(0,1fr); grid-template-rows:clamp(520px,76vh,900px) auto; grid-template-areas:"pal board" "prop prop"; } }
@container (max-width:700px) { .mtBody { grid-template-columns:1fr; grid-template-rows:auto clamp(560px,80vh,760px) auto; grid-template-areas:"pal" "board" "prop"; } .mtPalL { max-height:230px; } .mtGr { height:auto; grid-template-columns:1fr; } .mtGp { height:200px; } .mtGp + .mtGp { border-left:0; border-top:1px solid var(--bd); } }
@media (prefers-reduced-motion:reduce) { .mtFlash { transition:none; } }

/* ---- Barra standard dei simulatori (23/10/2026): stesse misure in Circuiti, Fisica e Meccatronica ---- */
.mtTb .mtBtn { box-sizing: border-box; width: 36px; min-width: 36px; height: 36px; padding: 0; }
.mtTb .mtBtn.mtPlay { width: 44px; min-width: 44px; }
.mtTb .mtBtn.mtVecB { width: auto; padding: 0 12px; }
.mtTb .mtBtn svg { width: 19px !important; height: 19px !important; flex: none; }
.mtTb .mtSpeed { box-sizing: border-box; height: 36px; }
.mtTb .mtSpeed { width: 80px; max-width: 80px; }

/* 23/10/2026: telefono (contenitore <= 700px): barra su una riga con menu ⋮ e palette a sole icone */
.mt.xMob .mtTb { flex-wrap: nowrap; overflow: hidden; position: relative; }
.mt.xMob .mtTb > * { flex: none; }
.mt.xMob .mtTb .xMore { margin-left: auto; }
.mt.xMob .mtTb .xMore svg { fill: currentColor; stroke: none; }
.mt.xMob .mtSp, .mt.xMob .mtStat { display: none; }
.mt .xMore[hidden], .mt .xPop[hidden] { display: none; }
.mt .xPop { position: fixed; z-index: 2000; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; justify-content: flex-end; width: max-content; max-width: calc(100vw - 16px); padding: 8px; border: 1px solid var(--bd); border-radius: 12px; background: var(--menu); box-shadow: 0 10px 30px rgba(0,0,0,.28); }
.mt .xPop [class*="Sep"] { display: none; }
.mt.xMob .mtPal { position: relative; overflow: visible; height: auto; }
.mt.xMob .mtPalT { border-bottom: 0; }
.mt.xMob .xPalOv { display: none; }
.mt.xMob.xPalOpen .xPalOv { display: flex; flex-direction: column; position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 60; max-height: min(62vh, 440px); border: 1px solid var(--bd); border-radius: 12px; background: var(--menu); box-shadow: 0 12px 32px rgba(0,0,0,.3); overflow: hidden; }
.mt.xMob .xPalOv .mtPalL { flex: 1; min-height: 0; max-height: none; overflow: auto; }
.mt.xMob .mtPalI { touch-action: pan-y; }
/* 23/10/2026: schermo intero (Fullscreen API; su iPhone il simulatore copre tutta la finestra) */
html.xFsLock { overflow: hidden !important; }
.mt.xFs { box-sizing: border-box; padding: 8px 10px; overflow: auto; background: #0b0d11; }
.mt.xFs[data-tema="chiaro"] { background: #f4f6fa; }
.mt.xFs:not(:fullscreen) { position: fixed; inset: 0; z-index: 2147483000; width: auto; }
.mt .xFullB { background: #2563eb; color: #fff; border-color: #2563eb; box-shadow: 0 1px 6px rgba(37,99,235,.45); } .mt .xFullB:hover { background: #1d4ed8; border-color: #1d4ed8; color: #fff; } .mt .xFullB[aria-pressed="true"] { background: #1e40af; border-color: #1e40af; color: #fff; }
@container (min-width: 1021px) { .mt.xFs .mtBody { grid-template-rows: calc(100vh - 72px); } }
@container (max-width: 1020px) { .mt.xFs .mtBody { grid-template-rows: calc(100vh - 80px) auto; } }
@container (max-width: 700px) { .mt.xFs .mtBody { grid-template-rows: auto calc(100vh - 150px) auto; } .mt.xFs.xMob .mtBody { grid-template-rows: auto calc(100vh - 150px) auto; } }

/* ==== 23/10/2026 menu componenti stile B (desktop): senza contenitore, ricerca a pillola, categorie tonde, griglia di icone ==== */
.mt:not(.xMob) .mtPal { border: 0; background: transparent; border-radius: 0; overflow: visible; }
.mt:not(.xMob) .mtPalH { padding: 2px 4px 8px; border-bottom: 0; }
.mt:not(.xMob) .mtSearch input { border: 0; background: var(--field); box-shadow: 0 1px 5px rgba(20,30,50,.16); border-radius: 999px; }
.mt:not(.xMob) .mtPalT { display: flex; flex-wrap: wrap; gap: 2px; padding: 0 2px 8px; border-bottom: 0; justify-content: flex-start; }
.mt:not(.xMob) .mtPT { width: 26px; height: 28px; flex: none; border-radius: 999px; border: 0; background: transparent; padding: 0; display: grid; place-items: center; }
.mt:not(.xMob) .mtPT:hover { background: var(--hov); }
.mt:not(.xMob) .mtPT.on { background: var(--ac); color: #fff; border: 0; }
.mt:not(.xMob) .mtPT.on svg { stroke: #fff; }
.mt:not(.xMob) .mtPalL { padding: 2px 2px 14px; }
.mt:not(.xMob) .mtPalL { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; align-content: start; } .mt:not(.xMob) .mtPalS { grid-column: 1 / -1; padding: 8px 4px 4px; } .mt:not(.xMob) .mtPalTip { border-top: 0; }

.mt:not(.xMob) .mtPalI { flex-direction: column; align-items: center; justify-content: flex-start; gap: 3px; text-align: center; padding: 8px 2px 6px; margin: 0; border: 0; border-radius: 12px; min-width: 0; background: transparent; }
.mt:not(.xMob) .mtPalI .mtMini { width: 100%; height: 34px; padding: 0; border: 0; background: transparent; border-radius: 0; box-sizing: border-box; }
.mt:not(.xMob) .mtPalI .mtMini svg { max-height: 34px; }
.mt:not(.xMob) .mtPalI > span:last-child b { font-size: .66rem; line-height: 1.15; color: var(--mu); text-align: center; overflow-wrap: anywhere; hyphens: auto; max-width: 100%; }
.mt:not(.xMob) .mtPalI:hover { background: var(--field); box-shadow: 0 2px 9px rgba(20,30,50,.18); border: 0; }
.mt:not(.xMob) .mtPalI:hover .mtPalI > span:last-child b, .mt:not(.xMob) .mtPalI:hover b { color: var(--tx); }
.mt:not(.xMob) .mtPalI > span:last-child small { display: none; } .mt:not(.xMob) .mtPalI .mtMini { width: 100%; height: 38px; padding: 4px; } .mt:not(.xMob) .mtPalI b { font-size: .68rem; font-weight: 600; line-height: 1.15; color: var(--tx); } .mt:not(.xMob) .mtPalI.cur { background: color-mix(in srgb, var(--ac) 14%, transparent); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--ac) 55%, transparent); }
@container (min-width: 1021px) { .mtBody { grid-template-columns: 236px minmax(0, 1fr) 282px; } }

/* 23/10/2026: Mostra/nascondi libreria - la tavola si espande (come Meccatronica) */
.mt.palOff .mtBody { grid-template-columns: minmax(0, 1fr) 282px; grid-template-areas: "board prop"; }
@container (max-width: 1020px) { .mt.palOff .mtBody { grid-template-columns: minmax(0, 1fr); grid-template-areas: "board" "prop"; } }

/* 02/11/2026: pulsante Avvia/Ferma con icona + scritta (come in Circuiti); su telefono / menu mobile solo icona */
.mt .mtTb .mtBtn.mtPlay { width:auto; min-width:44px; padding:0 14px 0 11px; gap:7px; }
.mt .mtBtn.mtPlay .mtPlayTx { font-size:.86rem; font-weight:700; line-height:1; white-space:nowrap; }
@media (max-width:720px) { .mt .mtTb .mtBtn.mtPlay { width:44px; padding:0; } .mt .mtBtn.mtPlay .mtPlayTx { display:none; } }
.mt.xMob .mtTb .mtBtn.mtPlay { width:44px; padding:0; } .mt.xMob .mtBtn.mtPlay .mtPlayTx { display:none; }

/* ---- 03/11/2026: Esempi e Apri con icona + scritta ---- */
.mt .mtTb .mtBtn.mtBtnL { width:auto; min-width:44px; padding:0 12px 0 10px; gap:6px; }
.mt .mtBtn.mtBtnL .mtBtnLTx { font-size:.84rem; font-weight:600; line-height:1; white-space:nowrap; }
@media (max-width:900px) { .mt .mtTb .mtBtn.mtBtnL { width:44px; padding:0; } .mt .mtBtn.mtBtnL .mtBtnLTx { display:none; } }
.mt.xMob .mtTb .mtBtn.mtBtnL { width:44px; padding:0; } .mt.xMob .mtBtn.mtBtnL .mtBtnLTx { display:none; }

/* ---- 03/11/2026: il simulatore si adatta all'altezza del monitor (--aOff = spazio occupato sopra e sotto dalla pagina); sotto il minimo scorre la pagina ---- */
.mt { --aOff:96px; }
.mt:not(.xMob):not(.xFs) { display:flex; flex-direction:column; height:max(540px, calc(100vh - var(--aOff))); height:max(540px, calc(100dvh - var(--aOff))); }
.mt:not(.xMob):not(.xFs) > .mtBody { flex:1 1 0; min-height:0; overflow:auto; }
@container (min-width:1021px) { .mt:not(.xMob):not(.xFs) > .mtBody { grid-template-rows:minmax(0,1fr); } }

/* ---- 03/11/2026: barre di scorrimento in CSS, nei colori del tema ---- */
.mt, .mt * { scrollbar-width:thin; scrollbar-color:color-mix(in srgb, var(--mu) 50%, transparent) transparent; }
.mt ::-webkit-scrollbar { width:10px; height:10px; }
.mt ::-webkit-scrollbar-track, .mt ::-webkit-scrollbar-corner { background:transparent; }
.mt ::-webkit-scrollbar-thumb { background:color-mix(in srgb, var(--mu) 45%, transparent); border:2px solid transparent; border-radius:8px; background-clip:content-box; min-height:36px; }
.mt ::-webkit-scrollbar-thumb:hover { background:color-mix(in srgb, var(--mu) 75%, transparent); background-clip:content-box; }

/* ---- 03/11/2026: «Chiedi all'IA» e «Relazione» sempre per intero; Esempi e Apri si riducono a icona quando la barra e' stretta ---- */
.mt .mtTb .mtBtn.mtBtnL.aisBtn { width:auto; padding:0 12px 0 10px; }
.mt .mtTb .mtBtn.mtBtnL.aisBtn .mtBtnLTx { display:inline; }
/* 03/11/2026: Esempi e Apri sempre solo icona in tutti i simulatori (restano visibili per intero «Chiedi all'IA» e «Relazione») */
.mt .mtTb .mtBtn.mtBtnL:not(.aisBtn) { width:44px; padding:0; } .mt .mtTb .mtBtn.mtBtnL:not(.aisBtn) .mtBtnLTx { display:none; }

/* 03/11/2026: pulsante "Reset ai valori predefiniti" giallo in tutti i simulatori */
.mtBtn[data-act="reset"] { color:#eab308; }
.mtBtn[data-act="reset"]:hover:not(:disabled) { color:#facc15; }
