/* Duello web: estetica della sezione Duello (navy, bordeaux, oro), adattata dal controllo a pulsante dell'app 3.1.0 */
.appduel{border:1px solid #bfa27275;border-radius:18px;padding:20px;background:radial-gradient(ellipse at 50% 45%,#392b5779,transparent 68%),linear-gradient(165deg,#121c34,#0a1228);color:#f9ecd9;isolation:isolate;overflow:hidden}
.appduel-top{display:grid;grid-template-columns:1fr minmax(170px,230px);gap:22px;align-items:start}
.appduel-top h3{font-size:1.6rem;color:#f4d8a1;margin:6px 0 8px}.appduel-top p{font-size:.87rem;max-width:65ch}
.appduel-select{display:grid;color:#e9c687;font-weight:700;font-size:.84rem}.appduel-select select{margin-top:8px;background:#11172f;color:#eee7dc;padding:11px;border:1px solid #bda27077;border-radius:9px;width:100%}
.appduel-match{position:relative;border:1px solid #7382a255;border-radius:16px;overflow:hidden;background:#091226}
.appduel-stats{position:relative;z-index:2;display:grid;grid-template-columns:1fr 105px 1fr;gap:12px;align-items:start;background:linear-gradient(180deg,#0a1125f5,#152044bd);padding:14px;min-height:84px}
.appduel-hpbox{display:grid;grid-template-columns:1fr auto;gap:5px 8px;font-size:.77rem;color:#e9c687}.appduel-hpbox strong{color:#f5e9dc;font-variant-numeric:tabular-nums}.appduel-hptrack{grid-column:1/-1;height:10px;background:#29283d;border-radius:20px;overflow:hidden;border:1px solid #9c8c9066}.appduel-hptrack div{height:100%;width:100%;background:linear-gradient(90deg,#43c89e,#c5ff91);transition:width .4s ease}.appduel-hptrack.enemy div{background:linear-gradient(90deg,#f290aa,#fc668a)}
.appduel-round{text-align:center;border:1px solid #e4c17c88;border-radius:25px;padding:6px;color:#f3d693;background:#151c3d;font:700 .74rem 'Cinzel',Georgia,serif}
.appduel-scene{height:255px;position:relative;display:grid;grid-template-columns:1fr 1fr;overflow:hidden;background:radial-gradient(ellipse at 50% 86%,#28306c,transparent 45%),radial-gradient(ellipse at 50% 45%,#57428670,transparent 60%),linear-gradient(180deg,#132248,#070e22);}
.appduel-scene:before{content:'';position:absolute;inset:0;opacity:.45;background-image:radial-gradient(#d8bdf044 1px,transparent 1px);background-size:33px 27px;mask-image:linear-gradient(180deg,#000,transparent 98%)}
.appduel-scene:after{content:'';position:absolute;left:12%;right:12%;height:60px;bottom:-27px;border:2px solid #c9a87a88;border-radius:50%;box-shadow:0 0 35px #9751d677,0 0 0 25px #e3d1f10a}
.appduel-figure{position:relative;z-index:1;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:3px}.appduel-figure small{color:#d8badb;letter-spacing:.2em;font-size:.66rem}
.appduel-silhouette{font-size:5rem;color:#9b7abd66;text-shadow:0 0 36px #a788ed66;line-height:1.1}
.appduel-wand{height:110px;width:12px;transform-origin:100% 100%;border-radius:3px 3px 10px 10px;position:relative;background:linear-gradient(90deg,#b58d50,#352438 45%,#bd9456 90%);box-shadow:0 0 10px #fbd58a88;z-index:2}
.appduel-wand b{position:absolute;left:50%;top:-10px;width:15px;height:15px;transform:translateX(-50%);border-radius:50%;background:#e5c88a;box-shadow:0 0 17px #e8e1b7}
.appduel-wand.you-wand{transform:translate(50px,0) rotate(55deg)}.appduel-wand.ai-wand{transform:translate(-50px,0) rotate(-55deg)}
.appduel-beam{position:absolute;top:52%;height:8px;width:45%;opacity:0;border-radius:20px;filter:drop-shadow(0 0 16px var(--cast-color,#eccb88));z-index:3}
.appduel-beam.beam-you{left:4%;transform-origin:left center;transform:rotate(-10deg) scaleX(0);background:linear-gradient(90deg,#5aa9ff,var(--cast-color,#fefbe3))}
.appduel-beam.beam-ai{right:4%;transform-origin:right center;transform:rotate(10deg) scaleX(0);background:linear-gradient(90deg,var(--cast-color,#eabbf9),#f3b8ee)}
.appduel-collision{position:absolute;top:40%;left:50%;transform:translate(-50%,-50%) scale(.2);opacity:0;z-index:4;color:#fce6ad;font-size:5rem;text-shadow:0 0 25px var(--cast-color,#ffe8bb)}
.appduel-scene.hit-you .beam-you,.appduel-scene.hit-ai .beam-ai{animation:appduel-beam .95s ease both;opacity:1}
.appduel-scene.hit-you .appduel-collision,.appduel-scene.hit-ai .appduel-collision{animation:appduel-impact .95s ease both}
@keyframes appduel-beam{0%{opacity:0;transform:rotate(-10deg) scaleX(0)}55%{opacity:1;transform:rotate(-10deg) scaleX(1)}100%{opacity:0;transform:rotate(-10deg) scaleX(1)}}
@keyframes appduel-impact{0%,25%{opacity:0;transform:translate(-50%,-50%) scale(.2)}55%{opacity:1;transform:translate(-50%,-50%) scale(1.3)}100%{opacity:0;transform:translate(-50%,-50%) scale(1.7)}}
.appduel-information{text-align:center;padding:17px 12px 5px;min-height:88px}.appduel-information>span{color:#f2d288;font:700 .95rem 'Cinzel',serif}.appduel-information p{max-width:800px;margin:7px auto;font-size:.91rem}
.appduel-counts{display:flex;justify-content:center;gap:30px;color:#d5c4e1;font-weight:700;font-variant-numeric:tabular-nums;font-size:.85rem}
.appduel-control{display:flex;justify-content:center;padding:12px 0 15px}
.appduel-button{--duel-fill:#6e263f;--hold-progress:0%;width:174px;height:174px;border:4px solid #e5c383;border-radius:50%;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:8px;color:#fff3dc;background:radial-gradient(circle at 32% 26%,#ffffff25,transparent 40%),var(--duel-fill);box-shadow:0 0 0 9px #b68f4322,0 0 40px #c181dc33,inset 0 3px 14px #0007;touch-action:none;user-select:none;-webkit-user-select:none;position:relative;overflow:hidden;transition:background .18s,transform .15s}
.appduel-button:not(:disabled).down{transform:scale(.96);box-shadow:0 0 0 8px #e1c57c55,0 0 38px #f6c68a88}
.appduel-button:disabled{background:#343853;color:#9da5bd;opacity:.75;cursor:default}
.appduel-button strong{position:relative;z-index:2;font-size:1.5rem;font-weight:800;letter-spacing:.07em;text-shadow:0 1px 3px #091125}
.appduel-button small{position:relative;z-index:2;font-size:.69rem;font-weight:700;text-align:center;max-width:120px}
.appduel-progress-ring{position:absolute;inset:1px;border-radius:50%;background:conic-gradient(#fff7ba var(--hold-progress),transparent var(--hold-progress));mask:radial-gradient(transparent 58%,black 60%);z-index:1;pointer-events:none}
.appduel-help{text-align:center;color:#d4c0d5;font-size:.81rem;padding:0 0 15px}.appduel-help b{color:#e8d18e}
.appduel-actions{display:flex;justify-content:center;gap:9px;flex-wrap:wrap}
.appduel-rulebook{background:#101a32;border:1px solid #af927155;border-radius:12px;margin-top:16px;padding:9px 15px}.appduel-rulebook summary{cursor:pointer;color:#e9c687;font-weight:700}.appduel-rulebook p{font-size:.85rem;margin:10px 0}
.mini-duel-modes{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:17px}.mini-duel-modes .mini-btn{white-space:normal;min-height:55px}.mini-mode-active{background:#e5bd7b!important;color:#191a32!important;border-color:#f8daa5!important}
/* Laboratory: animated automaton in an enchanted tiled game world */
.mini-robot-layout{gap:20px;grid-template-columns:minmax(300px,1.1fr) minmax(250px,.9fr)}
.mini-robot-board{position:relative;background:radial-gradient(circle at 50% 0%,#5479a14a,transparent 60%),linear-gradient(145deg,#111d36,#090d25);padding:14px;gap:5px;border:2px ridge #d4b17b;border-radius:16px;box-shadow:inset 0 0 40px #3564a13c,0 15px 40px #0005}
.mini-robot-board:before{content:'✦  THE FORGE OF LOGIC  ✦';pointer-events:none;position:absolute;bottom:7px;right:15px;font-size:.55rem;color:#f4d99b88;letter-spacing:.18em}
.mini-robot-cell{background:linear-gradient(145deg,#293c61,#152b4c);border:1px solid #8397ae55;border-radius:6px;box-shadow:inset 0 1px 4px #ffffff19,inset 0 -4px 5px #02061588;min-width:0;min-height:0}
.mini-robot-cell:nth-child(even){background:linear-gradient(145deg,#354767,#1a3053)}
.mini-robot-cell.blocked{background:radial-gradient(circle at 50%,#735a77,#333955);box-shadow:inset 0 0 10px #0008}
.mini-robot-cell.current{box-shadow:inset 0 0 0 2px #eac87b,0 0 25px #b987ee88}
.mini-robot-avatar{display:grid;place-items:center;width:min(83%,64px);height:min(83%,64px);filter:drop-shadow(0 3px 8px #000b) drop-shadow(0 0 11px #71eff6aa);transform:rotate(var(--robot-rotation,0deg));transition:transform .25s ease}
.mini-robot-avatar svg{width:100%;height:100%;overflow:visible}
.robot-shadow{fill:#121a38;stroke:#d3ab65;stroke-width:2}.robot-shoulder{fill:#8b65d4;stroke:#e9cf91;stroke-width:3}.robot-core{fill:#283c6b;stroke:#b7eafa;stroke-width:2}.robot-eye{fill:#86f4f8;filter:drop-shadow(0 0 5px #64ecff)}.robot-spark{fill:#ffcf86}.robot-antenna{stroke:#f1daaa;stroke-width:4;fill:none;stroke-linecap:round}
.mini-robot-goal{font-size:clamp(1.2rem,3.1vw,2.5rem);color:#ffe6a6;animation:mbw-goal-glow 2s ease-in-out infinite}
.mini-robot-rock{font-size:clamp(1.2rem,3vw,2.1rem);color:#d4a4bf;text-shadow:0 0 10px #c675ddbb}
@keyframes mbw-goal-glow{50%{transform:scale(1.15);text-shadow:0 0 24px #f2d592}}
.mini-robot-console{border:1px solid #e3c68238;background:#111a32;border-radius:15px;padding:18px;box-shadow:inset 0 0 25px #775ab012}
.mini-command-chip{border-color:#c9a67e66;background:#25294a;color:#f4dfbb}
.mini-robot-controls{grid-template-columns:repeat(3,minmax(0,1fr))}
@media(max-width:800px){.mini-robot-layout{grid-template-columns:1fr}}
@media(max-width:600px){.appduel{padding:11px}.appduel-top{grid-template-columns:1fr}.appduel-stats{grid-template-columns:1fr 75px 1fr;padding:10px 6px;gap:5px}.appduel-hpbox{font-size:.63rem}.appduel-hpbox strong{font-size:.66rem}.appduel-round{font-size:.65rem}.appduel-scene{height:190px}.appduel-wand{height:80px}.appduel-button{width:150px;height:150px}.appduel-information p{font-size:.78rem}.mini-duel-modes{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){.appduel *, .mini-robot-goal{animation:none!important;transition:none!important}}
/* Laboratori raggruppati per famiglie di apprendimento */
.mini-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-items:stretch;gap:10px;padding:14px;overflow:visible;background:linear-gradient(180deg,#10162c,#0d1325)}
.mini-tab-group{min-width:0;display:flex;flex-direction:column;gap:7px;padding:12px 11px;background:linear-gradient(160deg,#1c2340,#12192f);border:1px solid #ceb6853e;border-radius:12px}
.mini-tab-group-name{font-size:.68rem;font-weight:800;letter-spacing:.065em;color:#dfc98c;min-height:26px}
.mini-tab{width:100%;white-space:normal;text-align:left;line-height:1.3;min-height:45px;padding:9px 11px;font-size:.76rem;border:1px solid #c4b6da27;background:#11172b}
.mini-tab[aria-selected="true"]{border-color:#eac88a;box-shadow:inset 0 0 18px #fbd89a17}
@media(max-width:960px){.mini-tabs{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:490px){.mini-tabs{grid-template-columns:1fr 1fr;gap:6px;padding:7px}.mini-tab-group{padding:8px 6px}.mini-tab-group-name{font-size:.58rem}.mini-tab{padding:9px 6px;font-size:.69rem}.mini-tab.is-done:after{margin-left:3px}}
