.duel-practice{width:min(100%,760px);margin:auto;font:inherit;color:#3e3744;box-sizing:border-box;padding:8px 0 18px}
#panel.minigame-panel:has(.duel-practice) #panel-body{justify-content:flex-start;display:block;min-height:auto;padding:0 max(12px,4vw)}
.minigame-panel:has(.duel-practice)>h2{text-align:center;margin:.35em 0}
.duel-ticket,.duel-controls{background:#fffaf0;border:2px solid #daa995;border-radius:18px;padding:clamp(12px,2.5vw,24px)}
.duel-ticket{max-width:460px;margin:4vh auto;box-shadow:0 6px 0 #ead3be}
.duel-ticket label{display:grid;gap:6px;font-weight:700}
.duel-practice button,.duel-practice select{min-height:44px}
.duel-round,.duel-field{display:flex;justify-content:space-between;gap:12px}
.duel-round{padding:7px 14px;background:#4c4358;color:white;border-radius:16px 16px 0 0}
.duel-field{background:linear-gradient(0deg,#e2eee3ea,#fff5da9c),url('/assets/atlas/orchard.webp') center 48%/cover;padding:12px clamp(10px,4vw,46px);border-radius:0 0 18px 18px;margin-bottom:8px}
.duel-field article{display:flex;flex-direction:column;align-items:center;min-width:0;flex:1;text-align:center}
.duel-field h3{margin:2px;overflow-wrap:anywhere}.duel-field meter{width:min(100%,180px);height:15px}
.duel-field img,.duel-emblem{width:min(100%,150px);height:clamp(48px,16vh,142px);object-fit:contain;margin-top:4px}.duel-emblem{font-size:40px}
.duel-controls p{margin:0 0 6px}
.duel-actions{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin:10px 0}
.duel-actions button{height:auto;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;text-align:left}
.duel-actions span,.duel-field span{font-size:12px}.duel-actions [aria-pressed=true]{outline:3px solid #77548b;outline-offset:-2px;background:#f2e2fc}
.duel-controls details{margin-top:12px}.duel-controls details li{margin-bottom:4px}
@media(max-width:560px){.duel-actions{grid-template-columns:1fr 1fr}.duel-field{gap:8px}.duel-field img{height:76px}}

/* Island arcade battle: upper-left opponent plate / lower-right player plate. */
.duel-practice{width:min(100%,1120px);--ink:#182633;--sky:#00afcc;--paper:#fff7e6;--hot:#d91477;color:var(--ink)}
.duel-round{border-radius:10px 10px 0 0;background:var(--ink);color:white;font-weight:800}
.duel-field{position:relative;display:block;height:clamp(220px,45vh,475px);overflow:hidden;isolation:isolate;padding:0;border:2px solid var(--ink);border-top:0;margin:0;background:#91d08a url('/assets/battle/meadow.webp') center 59%/cover}
.duel-field article{position:absolute;z-index:2;box-sizing:border-box;width:clamp(142px,30%,290px);padding:7px 13px;text-align:left;align-items:stretch;background:var(--paper);border:2px solid var(--ink);border-left:7px solid var(--sky);border-radius:7px 18px 7px 7px;box-shadow:0 3px 0 #193749;line-height:1.15}
.duel-field article:first-of-type{right:3%;bottom:6%}.duel-field article:nth-of-type(2){left:3%;top:6%}
.duel-field article h3{font-size:clamp(15px,2.1vw,23px);margin:1px 0}.duel-field article small{font-weight:700;font-size:11px}
.duel-field article meter{width:100%;height:12px}.duel-field article span{font-size:11px}.duel-field article img{position:absolute;height:46px;width:46px;object-fit:contain;right:5px;top:0}
.duel-practice.pet-ready article:first-of-type img,.duel-practice.coach-ready article:nth-of-type(2) img{display:none}
.battle-actor{position:absolute;z-index:1;pointer-events:none;aspect-ratio:1;display:grid;place-items:center}
.battle-actor.near{height:88%;max-width:55%;bottom:-10%;left:3%}.battle-actor.far{height:53%;max-width:40%;top:8%;right:10%}
.battle-actor canvas{width:100%;height:100%;object-fit:contain}
.duel-controls{display:grid;grid-template-columns:minmax(0,1fr) minmax(280px,1.35fr);gap:5px 18px;align-items:center;padding:12px 16px;border:2px solid var(--ink);background:var(--paper);border-radius:12px;margin-top:8px;box-shadow:0 3px 0 var(--ink)}
.duel-controls p{grid-column:1;grid-row:1;margin:0;font-weight:700}.duel-controls>small{grid-column:1;grid-row:2}.duel-controls .duel-actions{grid-column:2;grid-row:1/4;display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:0}
.duel-actions button{box-sizing:border-box;background:#c9f7ff;color:#152d39;border:2px solid #1589a2;border-radius:8px;padding:6px 10px;box-shadow:0 2px 0 #163340}
.duel-actions button strong{font-weight:900;font-style:italic;font-size:16px}.duel-actions button span{font-size:11px;line-height:1.15}
.duel-actions button[aria-pressed=true]{background:#b71265;color:white;border-color:#ffe44a;outline:2px solid #182633}.duel-actions button:disabled{background:#e3e3df;color:#636365;box-shadow:none;border-color:#afaead}
.duel-controls>.primary{grid-column:1;max-width:300px}.duel-controls details{grid-column:1/-1}.duel-practice button:focus-visible{outline:3px solid #1c51ad;outline-offset:2px}
@media(max-width:600px){.duel-controls{display:flex;flex-direction:column;align-items:stretch;gap:7px;padding:10px}.duel-controls>.primary{max-width:none}.duel-field{height:clamp(220px,36vh,320px)}.duel-field article{width:44%;padding:4px 6px}.battle-actor.near{left:0;height:69%;bottom:-2%}.battle-actor.far{right:0;height:47%;top:15%}}
.duel-practice.pet-ready .duel-emblem{display:none}
.duel-practice .duel-controls .duel-actions button[aria-pressed=true]{background:#b51265;color:white;border-color:#ffe64b}
.duel-field{background-position:center center}
.duel-practice .duel-field{height:clamp(235px,51vh,490px)}
.duel-practice .battle-actor.near{height:78%;bottom:-5%;left:6%}
#panel .duel-practice .duel-actions button[aria-pressed="true"]{background:#aa0d5e;color:#fff;border-color:#ffdc42;transition:none}
@media(max-width:600px){.duel-practice .duel-field{height:clamp(250px,38vh,335px)}.duel-practice .battle-actor.near{height:61%;bottom:0;left:0}}
