:root {
  --bg: #120c22;
  --panel: rgba(18, 14, 38, 0.86);
  --panel2: rgba(34, 26, 66, 0.92);
  --line: rgba(255, 255, 255, 0.16);
  --text: #f4f0ff;
  --muted: #b8b0d8;
  --gold: #ffd040;
  --accent: #ff5a3a;
  --good: #4ade6a;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--text);
  font-family: 'Fredoka', 'Trebuchet MS', system-ui, sans-serif; user-select: none; -webkit-user-select: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
#app { position: fixed; inset: 0; }
#gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.hidden { display: none !important; }
button { font-family: inherit; }
small { opacity: 0.8; }

/* ---------------------------------------------------------------- HUD */
#hud { position: absolute; inset: 0; pointer-events: none; }
#hud > * { pointer-events: auto; }
#zoneName { position: absolute; top: 14px; left: 16px; font-size: 22px; font-weight: 700; text-shadow: 0 2px 4px #000, 0 0 12px rgba(0,0,0,.6); pointer-events: none !important; }
#zoneName small { font-size: 14px; font-weight: 400; margin-left: 6px; }
#topInfo { position: absolute; top: 48px; left: 16px; display: flex; gap: 8px; flex-wrap: wrap; max-width: calc(100vw - 220px); }
#topInfo span { background: var(--panel); border: 1px solid var(--line); padding: 4px 10px; border-radius: 999px; font-size: 14px; font-weight: 600; }
#minimap { position: absolute; top: 12px; right: 12px; width: 170px; height: 170px; border-radius: 50%; box-shadow: 0 4px 16px rgba(0,0,0,.5); background: #000; }
#partyBar { position: absolute; left: 14px; bottom: 14px; display: flex; gap: 8px; }
.pslot { width: 62px; height: 72px; background: var(--panel); border: 2px solid var(--line); border-radius: 12px; position: relative; cursor: pointer; overflow: hidden; transition: transform .15s; }
.pslot:hover { transform: translateY(-3px); }
.pslot.lead { border-color: var(--gold); }
.pslot.ko img { filter: grayscale(1) brightness(.5); }
.pslot img { width: 62px; height: 62px; margin-top: -4px; }
.plv { position: absolute; top: 2px; left: 4px; font-size: 12px; font-weight: 700; text-shadow: 0 1px 2px #000; }
.php { position: absolute; left: 5px; right: 5px; bottom: 5px; height: 6px; background: #222; border-radius: 4px; overflow: hidden; }
.php i { display: block; height: 100%; }
#prompt { position: absolute; left: 50%; bottom: 120px; transform: translateX(-50%); background: var(--panel); border: 2px solid var(--gold); padding: 10px 18px; border-radius: 999px; font-size: 18px; white-space: nowrap; animation: pulse 1.4s infinite; pointer-events: none !important; }
#prompt b { background: var(--gold); color: #000; padding: 1px 8px; border-radius: 6px; margin-right: 6px; }
@keyframes pulse { 50% { box-shadow: 0 0 18px rgba(255, 208, 64, .55); } }
.newMark { color: #9fffa0; font-weight: 700; }
.caughtMark { color: #ff5a5a; }
#toasts { position: absolute; top: 200px; right: 14px; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none !important; }
.toast { background: var(--panel2); border-left: 4px solid #fff; padding: 10px 14px; border-radius: 10px; font-size: 15px; max-width: 320px; animation: tin .3s; transition: opacity .5s, transform .5s; }
.toast.out { opacity: 0; transform: translateX(30px); }
@keyframes tin { from { opacity: 0; transform: translateX(40px); } }
#keysHelp { position: absolute; bottom: 14px; right: 14px; font-size: 12px; color: var(--muted); background: rgba(0,0,0,.35); padding: 6px 10px; border-radius: 8px; pointer-events: none !important; }
#mobileBtns { display: none; position: absolute; right: 16px; bottom: 100px; gap: 12px; flex-direction: column; align-items: flex-end; }
.mbtnc { width: 54px; height: 54px; border-radius: 50%; border: 2px solid var(--line); background: var(--panel); color: #fff; font-size: 22px; font-weight: 700; }
.mbtnc.act { width: 74px; height: 74px; background: rgba(255, 90, 58, .85); font-size: 28px; }
#joystick { position: absolute; width: 120px; height: 120px; border-radius: 50%; border: 2px solid rgba(255,255,255,.3); background: rgba(0,0,0,.2); display: none; pointer-events: none !important; }
#joystick.on { display: block; }
#joystick .knob { position: absolute; left: 35px; top: 35px; width: 50px; height: 50px; border-radius: 50%; background: rgba(255,255,255,.5); }
@media (pointer: coarse) { #mobileBtns { display: flex; } #keysHelp { display: none; } }

#floatLayer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 5; }
.floatText { position: absolute; left: 0; top: 0; font-weight: 700; text-shadow: 0 2px 0 #000, 0 0 8px #000; white-space: nowrap; }

/* ------------------------------------------------------------- BARRE */
.bar { position: relative; height: 14px; background: rgba(0,0,0,.55); border-radius: 8px; overflow: hidden; margin-top: 6px; border: 1px solid rgba(255,255,255,.15); }
.bar i { display: block; height: 100%; transition: width .5s ease, background .5s; border-radius: 8px; }
.bar span { position: absolute; right: 8px; top: -1px; font-size: 11px; font-weight: 700; text-shadow: 0 1px 2px #000; }
.bar.xp { height: 6px; } .bar.xp i { background: #3ab8ff; }
.bar.sm { height: 9px; } .bar.sm span { font-size: 9px; top: -2px; }
.type { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.6); margin-right: 3px; }
.status { display: inline-block; padding: 0 6px; border-radius: 5px; font-size: 11px; font-weight: 700; color: #111; margin-left: 4px; }
.tag { display: inline-block; background: rgba(255,255,255,.15); padding: 1px 8px; border-radius: 6px; font-size: 11px; margin-left: 4px; }

/* -------------------------------------------------------- BATTAGLIA */
#battleUI { position: absolute; inset: 0; pointer-events: none; z-index: 6; }
#battleUI > * { pointer-events: auto; }
.monPanel { position: absolute; width: 300px; background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); padding: 10px 14px; box-shadow: 0 6px 20px rgba(0,0,0,.4); }
#enemyPanel { top: 16px; left: 16px; }
#playerPanel { right: 16px; bottom: 190px; border-color: rgba(255, 208, 64, .5); }
.pname { font-size: 19px; font-weight: 700; }
.ptypes { margin-top: 3px; }
.gems { display: flex; gap: 6px; margin-top: 7px; padding-left: 2px; }
.gems i { width: 9px; height: 9px; transform: rotate(45deg); background: linear-gradient(135deg, #bff6ff, #3ac8f0); box-shadow: 0 0 6px rgba(90,224,255,.7); }
.gems i.out { filter: grayscale(1) brightness(.4); box-shadow: none; }
#battleBottom { position: absolute; left: 0; right: 0; bottom: 0; display: flex; gap: 12px; padding: 12px; background: linear-gradient(transparent, rgba(10,6,24,.75) 30%); }
#battleLog { flex: 1; min-height: 150px; background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); padding: 16px 20px; font-size: 21px; line-height: 1.4; cursor: pointer; }
#battleLog.talk::after { content: ' ▸'; opacity: .6; }
.bmenu { width: min(560px, 55vw); display: grid; gap: 8px; }
.bmenu.main { grid-template-columns: 1fr 1fr; }
.bmenu.moves, .bmenu.items { grid-template-columns: 1fr 1fr; }
.bbtn { border: none; border-radius: 12px; font-size: 22px; font-weight: 700; color: #fff; cursor: pointer; min-height: 68px; text-shadow: 0 2px 2px rgba(0,0,0,.4); box-shadow: inset 0 -4px 0 rgba(0,0,0,.25); transition: transform .1s, filter .1s; }
.bbtn b, .mbtn > b { font-size: 12px; opacity: .7; margin-right: 4px; vertical-align: middle; background: rgba(0,0,0,.3); padding: 1px 6px; border-radius: 5px; }
.bbtn:hover, .mbtn:hover { transform: translateY(-2px); filter: brightness(1.12); }
.bbtn.fight { background: #e0482e; } .bbtn.team { background: #3aa84a; } .bbtn.bag { background: #e0a020; } .bbtn.run { background: #3a7ad8; }
.bbtn.dis, .btn.dis { opacity: .4; pointer-events: none; }
.mbtn { position: relative; text-align: left; border: 2px solid var(--tc, #888); border-left-width: 8px; border-radius: 12px; background: var(--panel2); color: #fff; padding: 8px 12px; cursor: pointer; min-height: 64px; transition: transform .1s; }
.mbtn .mname { font-size: 18px; font-weight: 700; }
.mbtn small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.mbtn em { font-style: normal; font-size: 12px; margin-left: 6px; color: var(--muted); }
.mbtn em.sup { color: #ffd040; font-weight: 700; } .mbtn em.weak { color: #9a9ab0; }
.mbtn.back { --tc: #666; text-align: center; font-size: 16px; }
.bmenu .empty { grid-column: span 2; padding: 12px; color: var(--muted); }

/* ------------------------------------------------------------ DIALOGO */
#dialog { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); width: min(820px, calc(100vw - 24px)); background: var(--panel2); border: 3px solid rgba(255,255,255,.3); border-radius: 18px; padding: 18px 24px 20px; z-index: 20; box-shadow: 0 10px 40px rgba(0,0,0,.5); cursor: pointer; animation: din .2s; }
@keyframes din { from { transform: translate(-50%, 20px); opacity: 0; } }
.dname { position: absolute; top: -16px; left: 20px; background: var(--accent); padding: 3px 14px; border-radius: 999px; font-weight: 700; font-size: 16px; }
.dtext { font-size: 20px; line-height: 1.5; min-height: 60px; }
.dnext { position: absolute; right: 18px; bottom: 8px; animation: bob 0.8s infinite; opacity: .7; }
@keyframes bob { 50% { transform: translateY(4px); } }
.dchoices { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

.btn { background: linear-gradient(#5a4ad8, #4334b0); color: #fff; border: none; border-radius: 10px; padding: 10px 16px; font-size: 16px; font-weight: 600; cursor: pointer; box-shadow: inset 0 -3px 0 rgba(0,0,0,.25); transition: transform .1s, filter .1s; }
.btn:hover { filter: brightness(1.15); transform: translateY(-1px); }
.btn b { background: rgba(0,0,0,.3); padding: 0 6px; border-radius: 5px; font-size: 12px; margin-right: 4px; }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn.danger { background: linear-gradient(#d84a3a, #a8302a); }
.btn.big { font-size: 22px; padding: 14px 34px; border-radius: 14px; }
.btn.alt { background: linear-gradient(#4a4a6a, #34344a); }

/* ------------------------------------------------------------- MODALE */
.modal { position: absolute; inset: 0; z-index: 15; display: flex; align-items: safe center; justify-content: center; background: rgba(8,4,20,.55); backdrop-filter: blur(3px); overflow-y: auto; -webkit-overflow-scrolling: touch; touch-action: pan-y; }
.modal *, .chooser * { touch-action: pan-y; }
.menu { width: min(1040px, calc(100vw - 20px)); height: min(680px, calc(100vh - 20px)); background: var(--panel2); border: 2px solid var(--line); border-radius: 18px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.tabs { display: flex; gap: 4px; padding: 10px 10px 0; background: rgba(0,0,0,.25); flex-wrap: wrap; }
.tab { background: transparent; color: var(--muted); border: none; padding: 10px 16px; font-size: 16px; font-weight: 600; border-radius: 10px 10px 0 0; cursor: pointer; }
.tab.on { background: var(--panel2); color: #fff; }
.tab.close { margin-left: auto; }
.menuBody { flex: 1; overflow: hidden; padding: 14px; display: flex; flex-direction: column; }
.split { display: flex; gap: 14px; flex: 1; min-height: 0; }
.split > .list, .split > .grid { width: 44%; overflow-y: auto; padding-right: 4px; }
.split > .right { flex: 1; overflow-y: auto; }
.row { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 12px; background: rgba(255,255,255,.05); border: 2px solid transparent; margin-bottom: 6px; cursor: pointer; }
.row:hover { background: rgba(255,255,255,.1); }
.row.on { border-color: var(--gold); }
.row.dis { opacity: .4; cursor: default; }
.row.ko img { filter: grayscale(1) brightness(.5); }
.row img { width: 52px; height: 52px; }
.row .rinfo { flex: 1; }
.row .num { background: rgba(0,0,0,.35); padding: 2px 8px; border-radius: 6px; font-size: 13px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; align-content: start; }
.cell { position: relative; background: rgba(255,255,255,.05); border: 2px solid transparent; border-radius: 12px; text-align: center; padding: 4px; cursor: pointer; }
.cell:hover { background: rgba(255,255,255,.1); }
.cell.on { border-color: var(--gold); }
.cell img { width: 72px; height: 72px; display: block; margin: 0 auto; }
.cell small { display: block; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell.unk img { filter: brightness(0) opacity(.5); }
.cell.seen img { filter: grayscale(.85) brightness(.9); }
.cell em { position: absolute; top: 3px; right: 6px; color: #ff5a5a; font-style: normal; font-size: 12px; }
.dexhead { margin-bottom: 10px; color: var(--muted); }
.detail h2 { margin: 0 0 4px; font-size: 26px; }
.detail h2 small { font-size: 16px; }
.dhead { display: flex; gap: 14px; align-items: center; }
.dhead > div { flex: 1; }
.bigp { width: 150px; height: 150px; background: radial-gradient(circle, rgba(255,255,255,.12), transparent 70%); border-radius: 50%; }
.bigp.sil { filter: brightness(0) opacity(.6); }
.stats { display: flex; gap: 10px; margin: 12px 0; }
.stats div { flex: 1; background: rgba(0,0,0,.25); padding: 8px; border-radius: 10px; text-align: center; color: var(--muted); }
.stats b { color: #fff; font-size: 18px; margin-left: 4px; }
.moves { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.mv { border-left: 6px solid; background: rgba(0,0,0,.25); border-radius: 8px; padding: 6px 10px; }
.mv b { display: block; }
.mv small { display: block; color: var(--muted); }
.hint { color: var(--muted); margin-top: 8px; font-size: 14px; }
.desc { font-size: 16px; line-height: 1.5; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.empty { color: var(--muted); padding: 20px; }
.statbars div { display: flex; align-items: center; gap: 8px; margin: 4px 0; }
.statbars span { width: 36px; color: var(--muted); font-size: 13px; }
.statbars i { display: block; height: 10px; background: linear-gradient(90deg, #5a4ad8, #ff5a8a); border-radius: 6px; }
.statbars b { font-size: 13px; }
.baglist { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.item { background: rgba(255,255,255,.05); border-radius: 12px; padding: 10px 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.item small { flex-basis: 100%; color: var(--muted); }
.item.none { opacity: .45; }
.item .cnt { color: var(--muted); }
.item .price { color: var(--gold); font-weight: 700; }
.seals { margin-top: 16px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.seals h3 { grid-column: span 3; margin: 0; }
.seal { background: rgba(0,0,0,.25); border-radius: 10px; padding: 10px; opacity: .35; filter: grayscale(1); }
.seal.on { opacity: 1; filter: none; border: 1px solid var(--gold); }
.seal small { display: block; color: var(--muted); }
.bigmap { display: flex; gap: 14px; align-items: flex-start; justify-content: center; flex: 1; min-height: 0; }
.bigmap canvas { height: 100%; max-height: 560px; aspect-ratio: 1; border-radius: 14px; border: 2px solid var(--line); }
.legend { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; border: 1px solid #000; }
.sys { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; overflow-y: auto; }
.help { color: var(--muted); line-height: 1.5; max-width: 760px; }
.help h3 { color: #fff; margin: 14px 0 4px; }
.help b { color: #fff; }

.chooser { position: absolute; inset: 0; z-index: 30; overflow-y: auto; background: rgba(8,4,20,.7); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 16px; }
.ctitle { font-size: 22px; font-weight: 700; text-align: center; max-width: 700px; line-height: 1.5; }
.clist { width: min(520px, 100%); max-height: 70vh; overflow-y: auto; background: var(--panel2); padding: 10px; border-radius: 16px; border: 2px solid var(--line); }

.shop { width: min(720px, calc(100vw - 20px)); max-height: calc(100vh - 20px); overflow-y: auto; background: var(--panel2); border-radius: 18px; padding: 20px; border: 2px solid var(--line); }
.shop h2 { margin: 0; }
.shop .gold { color: var(--gold); font-size: 20px; font-weight: 700; margin: 6px 0 12px; }
.slist { display: grid; gap: 8px; margin-bottom: 14px; }

.starter { text-align: center; padding: 16px; }
.starter h2 { font-size: 32px; text-shadow: 0 3px 6px #000; }
.cards { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.card { width: 260px; background: var(--panel2); border: 3px solid var(--line); border-radius: 20px; padding: 16px; cursor: pointer; transition: transform .2s, border-color .2s; }
.card:hover { transform: translateY(-8px) scale(1.03); border-color: var(--gold); }
.card img { width: 180px; height: 180px; }
.card h3 { margin: 4px 0; font-size: 24px; }
.card p { color: var(--muted); font-size: 14px; min-height: 60px; }

.evoModal { background: radial-gradient(circle, #3a2a7a, #0a0618 70%); }
.evo { text-align: center; }
.evotext { font-size: 26px; margin-bottom: 20px; text-shadow: 0 2px 4px #000; }
.evoimg { position: relative; width: 260px; height: 260px; margin: 0 auto 20px; }
.evoimg img { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity .08s; filter: drop-shadow(0 0 20px #fff); }
.evoimg .eb { opacity: 0; }

#fade { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; transition: opacity .45s; z-index: 40; }
#fade.on { opacity: 1; }

/* ------------------------------------------------------------- TITOLO */
#title { position: absolute; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 36px;
  background: radial-gradient(ellipse at center, rgba(30,10,50,.35), rgba(8,4,20,.85)); transition: opacity .6s; }
#title.out { opacity: 0; pointer-events: none; }
.logo { text-align: center; }
.logo .l1 { font-size: clamp(28px, 6vw, 56px); font-weight: 700; letter-spacing: .25em; color: #ffd040; text-shadow: 0 4px 0 #8a3a10, 0 8px 24px rgba(0,0,0,.6); }
.logo .l2 { font-size: clamp(54px, 13vw, 130px); font-weight: 700; line-height: .9; color: #fff;
  text-shadow: 0 6px 0 #c0281a, 0 12px 0 #6a1010, 0 16px 40px rgba(0,0,0,.7); }
.logo .l3 { margin-top: 18px; font-size: clamp(14px, 2.4vw, 20px); color: var(--muted); letter-spacing: .1em; }
.tbtns { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.tinfo { text-align: center; color: var(--muted); line-height: 1.7; }

#loading { position: absolute; inset: 0; z-index: 60; background: var(--bg); display: flex; flex-direction: column; gap: 16px; align-items: center; justify-content: center; font-size: 18px; color: var(--muted); }
.spinner { width: 54px; height: 54px; border-radius: 50%; border: 5px solid rgba(255,255,255,.15); border-top-color: var(--gold); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.noscript { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: var(--bg); z-index: 99; }

/* ------------------------------------------------------------ MOBILE */
@media (max-width: 760px) {
  .starter { padding: 8px; width: 100%; }
  .starter h2 { font-size: 22px; margin: 8px 0 12px; }
  .cards { flex-wrap: nowrap; gap: 6px; }
  .card { width: auto; flex: 1; min-width: 0; padding: 8px 4px; border-radius: 14px; }
  .card:hover { transform: none; }
  .card img { width: 100%; height: auto; max-width: 130px; }
  .card h3 { font-size: 15px; }
  .card p { display: none; }
  .card .btn { font-size: 13px; padding: 10px 4px; width: 100%; }
  .card .btn b { display: none; }
  .menu { height: calc(100vh - 12px); height: calc(100dvh - 12px); }
  .tab { padding: 8px 9px; font-size: 13px; }
  .menuBody { padding: 8px; overflow-y: auto; }
  .split { display: flex; flex-direction: column; flex: none; overflow: visible; min-height: auto; }
  .split > .right { order: -1; flex: none; overflow: visible; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
  .split > .list, .split > .grid { width: 100%; max-height: none; overflow: visible; flex: none; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }
  .cell img { width: 58px; height: 58px; }
  .dhead { flex-wrap: wrap; }
  .bigmap { flex-direction: column; align-items: center; }
  .bigmap canvas { width: 100%; height: auto; }
  .legend { flex-direction: row; flex-wrap: wrap; }
  .seals { grid-template-columns: 1fr 1fr; } .seals h3 { grid-column: span 2; }
  .shop .item .btn { flex: 1; }
  .evoimg { width: 200px; height: 200px; } .evotext { font-size: 19px; padding: 0 12px; }
  #dialog { bottom: 10px; padding: 14px 16px 16px; }
  .dchoices .btn { flex: 1 1 40%; }
}
@media (max-width: 760px) {
  #minimap { width: 110px; height: 110px; }
  #zoneName { font-size: 16px; }
  #topInfo { top: 40px; max-width: calc(100vw - 140px); } #topInfo span { font-size: 12px; padding: 3px 7px; }
  .pslot { width: 46px; height: 54px; } .pslot img { width: 46px; height: 46px; }
  #prompt { font-size: 14px; bottom: 80px; }
  .monPanel { width: calc(50% - 14px); padding: 7px 9px; } .pname { font-size: 14px; } .pname small { font-size: 11px; }
  #playerPanel { bottom: auto; top: 10px; right: 8px; } #enemyPanel { top: 10px; left: 8px; }
  .type { font-size: 10px; padding: 0 6px; }
  .mbtn { min-height: 54px; padding: 6px 8px; } .mbtn .mname { font-size: 15px; } .mbtn small { font-size: 10px; }
  #battleBottom { flex-direction: column; }
  #battleLog { min-height: 70px; font-size: 16px; padding: 10px 14px; }
  .bmenu { width: 100%; }
  .bbtn { min-height: 54px; font-size: 18px; }
  .dtext { font-size: 16px; }
  .moves, .baglist { grid-template-columns: 1fr; }
  .bigp { width: 100px; height: 100px; }
}

/* telefono in orizzontale */
@media (max-height: 500px) {
  #battleBottom { padding: 6px; gap: 6px; }
  #battleLog { min-height: 0; font-size: 15px; padding: 8px 12px; }
  .bbtn { min-height: 40px; font-size: 16px; }
  .mbtn { min-height: 42px; padding: 4px 8px; } .mbtn .mname { font-size: 14px; } .mbtn small { display: none; }
  .monPanel { width: 230px; padding: 6px 10px; } .pname { font-size: 14px; }
  #playerPanel { bottom: auto; top: 8px; right: 8px; } #enemyPanel { top: 8px; left: 8px; }
  #partyBar .pslot { width: 44px; height: 50px; } .pslot img { width: 44px; height: 44px; }
  #minimap { width: 100px; height: 100px; }
  #mobileBtns { bottom: 12px; flex-direction: row; }
  .card p { display: none; } .card img { width: 110px; height: 110px; } .starter h2 { font-size: 22px; margin: 4px 0 8px; }
  .dtext { font-size: 15px; min-height: 0; }
}
