/* Un Micio sul Trasimeno — stile del gioco */
@font-face { font-family: "Fredoka"; src: url("../assets/fonts/fredoka.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("../assets/fonts/nunito.woff2") format("woff2"); font-weight: 200 1000; font-display: swap; }

:root {
  --bg: #04343d; --bg2: #073f49; --cream: #fff9ec; --coral: #ef5a43; --coral-d: #c63f2b; --yellow: #f6c63e; --aqua: #2ebbc3;
  --ink: #073f49; --ink2: #4d6c72; --line: #b9d5d8; --card: #fffaf0;
  --display: "Fredoka", "Trebuchet MS", system-ui, sans-serif; --sans: "Nunito", system-ui, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
}
* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100dvh; background: radial-gradient(120% 80% at 50% 0, #0a5561, var(--bg) 60%); color: var(--cream); font: 500 1rem/1.5 var(--sans); overscroll-behavior: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.ic { flex: none; vertical-align: middle; }
img { max-width: 100%; }

/* ---- intestazione ---- */
.gh { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px max(14px, env(safe-area-inset-left)); background: rgb(4 52 61 / .82); backdrop-filter: blur(10px); border-bottom: 1px solid rgb(255 255 255 / .1); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--cream); text-decoration: none; min-width: 0; }
.brand img { border-radius: 50%; background: #fff; flex: none; }
.brand span { display: grid; line-height: 1.1; min-width: 0; }
.brand strong { font: 600 1.05rem var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand small { font-size: .72rem; opacity: .75; }
.gh nav { display: flex; gap: 4px; }
.gh nav button { position: relative; display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 12px; border: 0; border-radius: 14px; background: transparent; font: 600 .95rem var(--display); transition: background-color .2s; }
.gh nav button:hover { background: rgb(255 255 255 / .12); }
.gh nav .support { background: var(--coral); }
.gh nav .support:hover { background: var(--coral-d); }
.dot { position: absolute; top: 6px; right: 6px; width: 11px; height: 11px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 3px var(--bg); animation: pulse 1.6s infinite; }
@media (max-width: 760px) { .gh nav button span { display: none; } .gh nav button { padding: 0 10px; } .brand small { display: none; } }

/* ---- gioco ---- */
.shell { width: min(1120px, 100%); margin: 0 auto; padding: 14px max(12px, env(safe-area-inset-left)) 32px; }
.frame { position: relative; overflow: hidden; height: clamp(400px, calc(100dvh - 190px), 680px); border: 3px solid rgb(255 249 236 / .92); border-radius: 26px; background: #0b4e59; box-shadow: 0 18px 50px rgb(0 0 0 / .4); touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.bg { position: absolute; inset: 0; overflow: hidden; }
.bg img { position: absolute; left: 0; top: 0; max-width: none; opacity: 0; transition: opacity .9s ease; will-change: transform; pointer-events: none; }
.bg img.show { opacity: 1; }
.tint { position: absolute; inset: 0; mix-blend-mode: multiply; background: rgb(255 255 255); transition: background-color 1.2s linear; pointer-events: none; }
#canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.vignette { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(120% 100% at 50% 40%, transparent 55%, rgb(2 24 29 / .35)); }

/* HUD */
.hud { position: absolute; inset: 10px 10px auto; display: grid; gap: 8px; pointer-events: none; }
.hud-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-right: 54px; }
.chip { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 13px; border-radius: 999px; background: rgb(4 52 61 / .78); backdrop-filter: blur(6px); font: 600 1rem var(--display); box-shadow: 0 2px 8px rgb(0 0 0 / .25); }
.chip small { color: #ffe58a; font-weight: 600; }
.chip.hearts svg { color: rgb(255 255 255 / .28); }
.chip.hearts svg.alive { color: var(--coral); filter: drop-shadow(0 0 5px rgb(239 90 67 / .6)); }
.chip.hearts { gap: 3px; padding: 0 10px; }
.chip.score span { font-size: .72rem; opacity: .75; }
.chip.combo { background: linear-gradient(135deg, #f6c63e, #ef5a43); color: #2a1200; animation: pop .25s var(--ease); }
.paw-coin { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--yellow); color: var(--bg2); }
.hud-level { display: grid; justify-items: start; line-height: 1.15; width: max-content; padding: 6px 14px; border-radius: 16px; background: rgb(4 52 61 / .6); backdrop-filter: blur(6px); }
.hud-level span { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; opacity: .8; }
.hud-level strong { font: 600 1.05rem var(--display); }
.hud-level small { opacity: .75; }
.pause-btn { position: absolute; right: 0; top: 0; pointer-events: auto; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgb(4 52 61 / .78); display: grid; place-items: center; }
.powers { position: absolute; left: 10px; top: 128px; display: grid; gap: 6px; pointer-events: none; }
.powers div { display: flex; align-items: center; gap: 8px; padding: 5px 12px 5px 6px; border-radius: 999px; background: rgb(4 52 61 / .78); font: 600 .82rem var(--display); }
.powers img { width: 30px; height: 30px; object-fit: contain; }
.powers span { display: grid; line-height: 1.1; }
.powers strong { color: #ffe58a; }
.mini-ic { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font: 700 .85rem var(--display); flex: none; }
.mini-ic.gold { background: var(--yellow); color: #6a3d00; }
.mini-ic.fire { background: #ef5a43; color: #fff; font-size: 1rem; }
.mini-ic.blue { background: var(--aqua); color: var(--bg); }
.mini-ic.paw { background: var(--yellow); color: var(--bg2); }

.banner { position: absolute; left: 50%; top: 38%; translate: -50% 0; max-width: calc(100% - 28px); padding: 12px 24px; border-radius: 20px; background: rgb(4 50 58 / .88); border: 2px solid rgb(255 249 236 / .9); font: 700 clamp(1.05rem, 1rem + 1.4vw, 1.6rem) var(--display); text-align: center; opacity: 0; transform: translateY(8px); transition: opacity .35s, transform .35s var(--ease); pointer-events: none; }
.banner.on { opacity: 1; transform: none; }
.toast { position: absolute; left: 50%; top: 126px; translate: -50% -14px; display: flex; align-items: center; gap: 10px; width: max-content; max-width: calc(100% - 24px); padding: 8px 18px 8px 10px; border-radius: 999px; background: var(--cream); color: var(--ink); font: 700 .92rem var(--display); box-shadow: 0 8px 22px rgb(0 0 0 / .35); opacity: 0; transition: opacity .22s, translate .3s var(--ease); pointer-events: none; z-index: 5; }
.toast img { width: 34px; height: 34px; object-fit: contain; }
.toast.on { opacity: 1; translate: -50% 0; }
.toast.gold { background: linear-gradient(135deg, #ffe58a, #f6c63e); box-shadow: 0 8px 26px rgb(246 198 62 / .55); }

.secret-btn { position: absolute; left: 50%; bottom: 74px; translate: -50% 0; display: grid; justify-items: center; gap: 0; padding: 10px 22px; border: 3px solid var(--cream); border-radius: 22px; background: var(--coral); color: var(--cream); animation: pulse 1.4s infinite; z-index: 4; }
.secret-btn strong { font: 700 1rem var(--display); }
.secret-btn small { opacity: .85; font-size: .75rem; }
.slide-btn { position: absolute; left: 14px; bottom: 16px; width: 84px; height: 84px; border-radius: 50%; border: 3px solid rgb(255 249 236 / .85); background: rgb(4 52 61 / .6); backdrop-filter: blur(6px); display: grid; place-content: center; justify-items: center; gap: 0; font: 700 .72rem var(--display); z-index: 4; touch-action: none; }
.slide-btn:active { background: var(--aqua); color: var(--bg); }

/* ---- schermate sopra il gioco ---- */
.overlay { position: absolute; inset: 0; display: flex; padding: 12px; overflow-y: auto; z-index: 6; }
.overlay > * { margin: auto; }
.overlay.in { animation: fade .35s ease both; }
.start { background: linear-gradient(180deg, rgb(4 52 61 / .25), rgb(4 52 61 / .55)); }
.start-card { width: min(780px, 100%); display: grid; gap: 14px; padding: clamp(16px, 3vw, 28px); border-radius: 26px; background: rgb(255 250 240 / .96); color: var(--ink); box-shadow: 0 20px 60px rgb(0 0 0 / .4); }
.start-card h1 { margin: 0; font: 600 clamp(2rem, 1.4rem + 3vw, 3.2rem)/1 var(--display); letter-spacing: -.01em; }
.start-card h1 em { color: var(--coral); font-style: normal; }
.start-card p { margin: 0; color: var(--ink2); }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; margin: 0; font: 700 .78rem var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--coral); }
.controls-hint { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.controls-hint span { padding: 6px 12px; border-radius: 999px; background: #e3f2f2; font: 700 .82rem var(--display); }
.start-form { display: grid; gap: 10px; }
.start-form label { font: 700 .78rem var(--display); letter-spacing: .1em; text-transform: uppercase; }
.start-form input { min-height: 52px; padding: 0 16px; border: 2px solid var(--line); border-radius: 14px; background: #fff; color: var(--ink); font-size: 1.05rem; }
.char-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.char-pick button { display: grid; justify-items: center; gap: 2px; padding: 6px 4px; border: 2px solid var(--line); border-radius: 16px; background: #eff7f7; color: var(--ink); font: 700 .85rem var(--display); }
.char-pick button[aria-pressed="true"] { border-color: var(--coral); background: #ffeedd; }
.char-pick img { height: 54px; object-fit: contain; }
.char-pick span { text-transform: capitalize; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border: 0; border-radius: 16px; background: var(--coral); color: var(--cream); font: 600 1.02rem var(--display); text-decoration: none; box-shadow: 0 4px 0 var(--coral-d); transition: transform .15s var(--ease), box-shadow .15s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--coral-d); }
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--coral-d); }
.btn.ghost { background: transparent; color: inherit; border: 2px solid currentColor; box-shadow: none; }
.btn.mini { min-height: 38px; padding: 0 14px; font-size: .9rem; border-radius: 12px; box-shadow: 0 3px 0 var(--coral-d); }
.btn.mini.ghost { box-shadow: none; }
.btn[data-poor] { background: #9aa9ad; box-shadow: 0 3px 0 #758487; }
.btn.play { min-height: 56px; font-size: 1.2rem; }
.link { background: none; border: 0; padding: 4px 6px; color: inherit; font: 700 .9rem var(--display); text-decoration: underline; text-underline-offset: 3px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.pills span { padding: 6px 14px; border-radius: 999px; background: var(--ink); color: var(--cream); font: 600 .8rem var(--display); }
@media (min-width: 720px) { .start-card { grid-template-columns: 1.1fr 1fr; align-items: center; } .start-card .pills { grid-column: 1 / -1; } }
@media (max-height: 640px) { .start-card h1 { font-size: 1.7rem; } .start-card p { font-size: .9rem; } .char-pick img { height: 40px; } }

.place { background: radial-gradient(90% 90% at 50% 50%, color-mix(in srgb, var(--c, #19b7c5) 45%, #02181d) 0, rgb(2 24 29 / .9) 100%); opacity: 0; transition: opacity .5s; pointer-events: auto; }
.place.on { opacity: 1; }
.place-card { display: grid; gap: 12px; justify-items: center; max-width: 520px; text-align: center; padding: 16px; }
.place-card .eyebrow { color: #ffe58a; }
.place-card h2 { margin: 0; font: 600 clamp(2.2rem, 1.6rem + 3vw, 3.6rem)/1 var(--display); }
.place-card .fact { margin: 0; font-size: 1.1rem; }
.tip { padding: 10px 16px; border-radius: 16px; background: rgb(255 255 255 / .12); font-size: .95rem; }
.tip b { color: #ffe58a; font-family: var(--display); }
.loader { width: min(260px, 70%); height: 8px; border-radius: 99px; background: rgb(255 255 255 / .2); overflow: hidden; }
.loader i { display: block; height: 100%; border-radius: inherit; background: var(--yellow); animation: load 2.6s linear both; }

.card { background: rgb(2 24 29 / .6); backdrop-filter: blur(3px); }
.card-body { width: min(480px, 100%); display: grid; gap: 10px; justify-items: center; text-align: center; padding: clamp(18px, 3vw, 28px); border-radius: 26px; background: var(--card); color: var(--ink); box-shadow: 0 20px 60px rgb(0 0 0 / .45); animation: pop .4s var(--ease) both; }
.card-body h2 { margin: 0; font: 600 clamp(1.7rem, 1.3rem + 2vw, 2.4rem)/1.05 var(--display); }
.card-body p { margin: 0; }
.result-ic { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--yellow); color: var(--bg2); }
.big-score { font: 700 clamp(2.4rem, 2rem + 3vw, 3.6rem)/1 var(--display); color: var(--coral); }
.big-score small { font-size: 1rem; color: var(--ink2); }
.stat-row { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; color: var(--ink2); font: 600 .9rem var(--display); }
.stat-row b { color: var(--ink); }
.spotlight { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 12px 8px 8px; border-radius: 18px; background: #eaf5f5; text-align: left; }
.spotlight img { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; }
.spotlight div { display: grid; line-height: 1.2; }
.spotlight small { color: var(--ink2); }
.spotlight strong { font: 600 1.2rem var(--display); }
.spotlight span { font-size: .85rem; color: var(--ink2); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 4px; }
.actions.small { margin-top: 0; }
.actions.center { margin-top: 16px; }
.card-body .btn.ghost { color: var(--ink); }
.friend-card { gap: 8px; }
.friend-card .story { font-size: .92rem; line-height: 1.35; }
.friend-card h2 { font-size: 1.7rem; }
.friend-photo { position: relative; width: min(230px, 100%); }
.friend-photo img { width: 100%; aspect-ratio: 16 / 11; object-fit: cover; border-radius: 20px; border: 3px solid var(--yellow); }
.badge { display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--ink); color: var(--cream); font: 600 .78rem var(--display); }
.friend-photo .badge { position: absolute; left: 10px; bottom: 10px; }
.tagline { font: 600 1.05rem var(--display); color: var(--coral); }
.story { color: var(--ink2); line-height: 1.45; white-space: pre-line; }
.pause { background: rgb(2 24 29 / .55); }
.pause-card { display: grid; gap: 14px; justify-items: center; padding: 26px 40px; border-radius: 24px; background: var(--card); color: var(--ink); }
.pause-card h2 { margin: 0; font: 600 2rem var(--display); }

/* ---- sotto il gioco ---- */
.levels { display: flex; gap: 8px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.levels div { display: flex; align-items: center; gap: 8px; flex: none; min-height: 42px; padding: 0 14px 0 8px; border-radius: 999px; background: rgb(255 255 255 / .08); border: 1px solid rgb(255 255 255 / .12); font: 600 .9rem var(--display); transition: background-color .3s; }
.levels span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: rgb(255 255 255 / .16); font-size: .8rem; }
.levels div.active { background: var(--cream); color: var(--ink); }
.levels div.active span { background: var(--coral); color: var(--cream); }
.levels .endless { display: grid; gap: 0; padding: 4px 16px; border-style: dashed; line-height: 1.1; }
.levels .endless small { opacity: .7; }
.below { display: grid; gap: 14px; margin-top: 18px; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.info-card { display: grid; align-content: start; gap: 10px; padding: 16px 18px; border-radius: 22px; background: rgb(255 255 255 / .08); border: 1px solid rgb(255 255 255 / .12); }
.info-card header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.info-card h3 { display: flex; align-items: center; gap: 8px; margin: 0; font: 600 1.1rem var(--display); }
.info-card p { margin: 0; opacity: .85; }
.info-card.cta { background: linear-gradient(135deg, rgb(239 90 67 / .35), rgb(246 198 62 / .18)); }
.mini-missions { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mini-missions li { display: grid; gap: 4px; font-size: .92rem; }
.mini-missions li.done span::after { content: " · da riscattare"; color: #ffe58a; }
.mini-missions li.claimed { opacity: .6; text-decoration: line-through; }
.faces { display: flex; flex-wrap: wrap; gap: 6px; }
.faces img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid var(--yellow); }
.faces img.locked { filter: brightness(0) opacity(.5); border-color: rgb(255 255 255 / .3); }
.gfoot { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; justify-content: space-between; margin-top: 24px; font-size: .9rem; opacity: .85; }
.gfoot a { color: inherit; }
.gfoot button { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid rgb(255 255 255 / .25); border-radius: 999px; background: transparent; }
.bar { height: 8px; border-radius: 99px; background: rgb(255 255 255 / .18); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--aqua), var(--yellow)); transition: width .4s var(--ease); }

/* ---- finestre ---- */
#panel { width: min(580px, calc(100% - 20px)); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 26px; background: var(--card); color: var(--ink); box-shadow: 0 24px 70px rgb(0 0 0 / .5); overflow: hidden; }
#panel[open] { display: flex; flex-direction: column; animation: pop .3s var(--ease); }
#panel::backdrop { background: rgb(2 24 29 / .7); backdrop-filter: blur(3px); }
.panel-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; padding: 18px 20px 8px; }
.panel-head h2 { margin: 0; font: 600 1.6rem/1.1 var(--display); }
.panel-head p { margin: 4px 0 0; color: var(--ink2); font-size: .92rem; }
.close { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border: 0; border-radius: 50%; background: #e3f2f2; color: var(--ink); }
#panel [data-body] { display: flex; flex-direction: column; min-height: 0; }
.panel-scroll { overflow-y: auto; padding: 8px 20px 22px; max-height: calc(100dvh - 190px); overscroll-behavior: contain; }
.panel-note { margin: 4px 0 12px; color: var(--ink2); font-size: .92rem; }
.tabs { display: flex; gap: 6px; padding: 6px 20px 0; overflow-x: auto; scrollbar-width: none; }
.tabs button { flex: none; min-height: 40px; padding: 0 16px; border: 2px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink); font: 600 .95rem var(--display); }
.tabs button[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 4px; border-radius: 99px; background: var(--coral); color: #fff; font-size: .72rem; }
.goal-list { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 10px; }
.goal { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 18px; background: #eaf5f5; border: 2px solid transparent; }
.goal.done { background: #fff3cf; border-color: var(--yellow); }
.goal.claimed { opacity: .65; }
.goal-main { display: grid; gap: 4px; flex: 1; min-width: 0; }
.goal-main strong { font: 600 1rem var(--display); }
.goal-main small { color: var(--ink2); }
.goal .bar { background: #cfe3e3; }
.goal .num { font: 600 .78rem var(--display); }
.reward, .tag { display: inline-flex; align-items: center; gap: 5px; flex: none; font: 700 .85rem var(--display); color: var(--ink2); }
.tag { color: #2d8a4e; }
.tag.lockedtag { color: var(--ink2); font-size: .72rem; max-width: 130px; text-align: right; }
.streak, .bonus { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; background: linear-gradient(135deg, #ffe9c9, #ffd9c2); }
.streak > div, .bonus > div { display: grid; flex: 1; line-height: 1.2; }
.streak small, .bonus small { color: var(--ink2); }
.streak .ic { color: var(--coral); }
.bonus { margin-top: 10px; background: #eaf5f5; }
.bonus.ready { background: linear-gradient(135deg, #fff3cf, #ffe08a); animation: glow 1.8s infinite; }
.friend-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.friend { position: relative; display: grid; gap: 2px; justify-items: center; padding: 8px; border: 2px solid var(--line); border-radius: 18px; background: #fff; color: var(--ink); text-align: center; }
.friend.got { border-color: var(--yellow); }
.friend img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; }
.friend.locked img { filter: brightness(0) opacity(.28); }
.friend .q { position: absolute; top: 38%; color: var(--ink2); }
.friend strong { font: 600 .95rem var(--display); }
.friend small { color: var(--ink2); }
.friend-detail { display: grid; gap: 14px; }
.friend-detail img { width: 100%; max-height: 300px; object-fit: cover; border-radius: 20px; }
.friend-detail h3 { margin: 6px 0 0; font: 600 1.7rem var(--display); }
.friend-detail .actions { justify-content: flex-start; }
.friend-detail .btn.ghost, .panel-scroll .btn.ghost { color: var(--ink); }
.back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 10px; padding: 6px 12px; border: 0; border-radius: 999px; background: #e3f2f2; font: 600 .88rem var(--display); }
.back .rot { rotate: 90deg; }
.wallet { display: flex; align-items: center; gap: 8px; margin: 0 20px; padding: 6px 14px; width: max-content; border-radius: 999px; background: var(--ink); color: var(--cream); font: 600 1rem var(--display); }
.wallet svg { color: var(--yellow); }
.slot-title { margin: 14px 0 8px; font: 600 1rem var(--display); color: var(--ink2); text-transform: uppercase; letter-spacing: .08em; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 10px; }
.shop-item { display: grid; gap: 6px; padding: 8px; border: 2px solid var(--line); border-radius: 18px; background: #fff; justify-items: center; text-align: center; }
.shop-item.worn { border-color: var(--coral); background: #fff1e8; }
.shop-item canvas { width: 100%; aspect-ratio: 180 / 130; background: linear-gradient(180deg, #d8ecee, #eaf5f5); border-radius: 12px; }
.si-main { display: grid; line-height: 1.15; }
.si-main strong { font: 600 .95rem var(--display); }
.si-main small { color: var(--ink2); font-size: .78rem; }
.char-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 10px; }
.char { display: grid; justify-items: center; gap: 2px; padding: 10px; border: 2px solid var(--line); border-radius: 20px; background: #fff; color: var(--ink); }
.char[aria-pressed="true"] { border-color: var(--coral); background: #fff1e8; }
.char img { width: 100%; height: 90px; object-fit: contain; }
.char strong { font: 600 1rem var(--display); }
.char small { color: var(--ink2); }
.up-list { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 10px; }
.up { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 18px; background: #eaf5f5; }
.up-main { display: grid; gap: 4px; }
.up-main strong { font: 600 1rem var(--display); }
.up-main small { color: var(--ink2); }
.pips { display: flex; gap: 5px; }
.pips i { width: 22px; height: 8px; border-radius: 99px; background: #c4dada; }
.pips i.on { background: var(--coral); }
.live { display: flex; align-items: center; gap: 8px; margin: 6px 0 10px; font: 700 .78rem var(--display); letter-spacing: .1em; color: var(--ink2); }
.live span { width: 9px; height: 9px; border-radius: 50%; background: #2fbf6a; animation: pulse 1.4s infinite; }
.board { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.board li { display: flex; align-items: center; gap: 12px; padding: 9px 14px; border-radius: 14px; background: #eaf5f5; }
.board li.mine { background: #fff3cf; border: 2px solid var(--yellow); }
.board strong { flex: 1; font: 600 1rem var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board strong em { color: var(--coral); font-style: normal; }
.board b { font: 700 1rem var(--display); }
.rank { width: 30px; text-align: center; font: 700 1rem var(--display); color: var(--ink2); }
.medal { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: #fff; font-style: normal; font-size: .9rem; }
.m1 { background: #e5a82a; } .m2 { background: #9aa6ad; } .m3 { background: #c8803f; }
.empty { padding: 24px; text-align: center; color: var(--ink2); }
.support-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.support-brand img { border-radius: 50%; }
.support-brand div { display: grid; line-height: 1.2; }
.support-brand strong { font: 600 1.15rem var(--display); }
.support-brand small { color: var(--ink2); }
.pay { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 0; padding: 12px 14px; border-radius: 16px; background: #eaf5f5; }
.pay div { display: grid; min-width: 0; line-height: 1.25; }
.pay small { color: var(--ink2); }
.pay strong { font: 600 .98rem var(--display); overflow-wrap: anywhere; }
.icon-btn { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 12px; background: var(--ink); color: var(--cream); }
.socials { display: flex; flex-wrap: wrap; gap: 14px; margin: 14px 0; }
.socials a { color: var(--coral-d); font: 600 .95rem var(--display); }
.share { margin-top: 4px; }
.fine { margin: 14px 0 0; color: var(--ink2); font-size: .8rem; }
#panel .actions { justify-content: flex-start; margin: 12px 0; }

/* ---- animazioni ---- */
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.94) translateY(8px); } }
@keyframes load { from { width: 0; } to { width: 100%; } }
@keyframes pulse { 50% { transform: scale(1.06); } }
@keyframes glow { 50% { box-shadow: 0 0 0 5px rgb(246 198 62 / .45); } }
.dot, .secret-btn { animation-name: pulse; }
.secret-btn { animation: spulse 1.4s infinite; }
@keyframes spulse { 50% { scale: 1.06; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition-duration: .01ms !important; } }

/* ---- telefoni piccoli ---- */
@media (max-width: 719px) and (max-height: 780px) {
  .start-card { gap: 10px; padding: 14px; }
  .start-card h1 { font-size: 1.85rem; }
  .start-intro p, .controls-hint { display: none; }
  .char-pick img { height: 44px; }
  .start-form { gap: 8px; }
  .start-form input { min-height: 46px; }
  .btn.play { min-height: 52px; }
  .pills { display: none; }
}
@media (max-width: 470px) { .brand span { display: none; } }
