/* WaterHero · «Tris di Poteri» (sito e playable ad) */
.tris { container-type: inline-size; --wht-accent: #5aa7ff; --wht-display: "Archivo WH", "Archivo", "Arial Black", system-ui, sans-serif; position: relative; overflow: hidden; display: block; width: 100%; max-width: 560px; height: calc(100vh - 124px); height: calc(100svh - 124px); min-height: 480px; max-height: 760px; margin-inline: auto; border-radius: 28px; background: #04112a; color: #fff; font-family: "Inter WH", "Inter", -apple-system, system-ui, "Segoe UI", Roboto, sans-serif; touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; outline: none; isolation: isolate; }
@media (min-width: 992px) { .tris { height: min(760px, calc(100vh - 140px)); } }
.tris[data-mode="ad"] { position: fixed; inset: 0; width: auto; height: auto; max-width: none; max-height: none; min-height: 0; margin: 0; border-radius: 0; }
.tris:focus-visible { box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .55); }
.wht-canvas { position: absolute; inset: 0; display: block; touch-action: none; }
.wht-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* pausa e suono */
.wht-ctrl { position: absolute; z-index: 2; top: 10px; right: 10px; display: flex; gap: 6px; }
.wht-ctrl[hidden] { display: none; }
.wht-icon { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid rgba(255, 255, 255, .16); border-radius: 50%; background: rgba(4, 20, 50, .6); color: #fff; cursor: pointer; }
.wht-icon svg, .wht-chip svg { width: 20px; height: 20px; fill: currentColor; }
.tris svg .off { display: none; }
.tris.is-muted svg .on { display: none; }
.tris.is-muted svg .off { display: inline; }

/* schermate */
.wht-screen { position: absolute; inset: 0; z-index: 3; display: grid; place-items: safe center; padding: 18px 16px; overflow-y: auto; touch-action: pan-y; background: radial-gradient(130% 80% at 50% 0%, rgba(24, 90, 190, .5), rgba(2, 8, 24, .9) 70%); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); user-select: text; -webkit-user-select: text; }
.wht-screen[hidden] { display: none; }
.wht-card { position: relative; width: min(100%, 440px); display: grid; gap: 12px; justify-items: center; text-align: center; animation: wht-in .5s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes wht-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.wht-top { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 10px; }
.wht-logo { display: block; color: #fff; }
.wht-logo svg { display: block; width: auto; height: 24px; }
.wht-brandline { margin: -4px 0 0; font-family: var(--wht-display); font-weight: 800; font-size: 18px; letter-spacing: -.01em; }
.wht-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border: 1px solid rgba(255, 255, 255, .28); border-radius: 999px; background: rgba(255, 255, 255, .06); color: #e6eef8; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.wht-kicker { margin: 0; color: var(--wht-accent); font-size: 14px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.wht-title { margin: 0; font-family: var(--wht-display); font-weight: 800; font-size: clamp(34px, 9vw, 54px); line-height: .95; letter-spacing: -.035em; outline: none; text-wrap: balance; }
.wht-text { margin: 0; color: #d6e2f0; font-size: 15px; line-height: 1.45; }
.wht-small { color: #b9c7d9; font-size: 14px; }

/* percorso dei 5 livelli */
.wht-path { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); width: 100%; margin: 4px 0 2px; padding: 0; list-style: none; }
.wht-path::before { content: ""; position: absolute; left: 10%; right: 10%; top: 17px; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .18); }
.wht-path li { position: relative; display: grid; justify-items: center; align-content: start; gap: 6px; color: #b9c7d9; font-size: 14px; line-height: 1.12; hyphens: auto; overflow-wrap: anywhere; }
.wht-path b { position: relative; z-index: 1; display: grid; place-items: center; width: 36px; height: 36px; border: 2px solid rgba(255, 255, 255, .32); border-radius: 50%; background: #0c2550; color: #fff; font-family: var(--wht-display); font-size: 16px; font-weight: 800; }
.wht-path .is-done b { border-color: var(--wht-accent); background: var(--wht-accent); color: #07101f; }
.wht-path .is-done { color: #fff; }
.wht-path .is-now b { box-shadow: 0 0 0 5px rgba(255, 255, 255, .16); }
.wht-path .is-prize b { border-color: #f5c518; }
.wht-path span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@container (min-width: 430px) { .wht-path span { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; } }
.wht-path .wht-ingot { position: absolute; z-index: 2; top: -9px; left: calc(50% + 6px); width: 24px; height: 13px; background: linear-gradient(135deg, #fff6b8, #f5c518 50%, #a87400); }

/* legenda, regole, obiettivi */
.wht-specials, .wht-goals { display: grid; gap: 8px; width: 100%; margin: 0; padding: 12px 14px; border-radius: 18px; background: rgba(255, 255, 255, .07); list-style: none; text-align: left; font-size: 14px; line-height: 1.3; }
.wht-specials li, .wht-goals li { display: flex; align-items: center; gap: 10px; }
.wht-specials canvas, .wht-goals canvas { flex: none; }
.wht-specials b { font-family: var(--wht-display); font-weight: 800; }
.wht-goals { font-size: 15px; }
.wht-rules { margin: 0; padding: 10px 14px; border: 1px solid rgba(245, 197, 24, .5); border-radius: 14px; background: rgba(245, 197, 24, .09); color: #fff3c4; font-size: 14px; line-height: 1.45; text-align: left; }
.wht-rules strong { color: #f5c518; }
.wht-moves { margin: -2px 0 0; color: #d6e2f0; font-size: 15px; }
.wht-moves b { font-family: var(--wht-display); font-size: 40px; font-weight: 800; letter-spacing: -.03em; color: #fff; vertical-align: -6px; margin-right: 4px; }
.wht-booster { display: flex; align-items: center; gap: 10px; margin: 0; padding: 8px 14px 8px 8px; border-radius: 999px; background: rgba(127, 219, 255, .14); color: #e9f8ff; font-size: 14px; line-height: 1.3; text-align: left; }
.wht-booster span { flex: none; display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 6px; border-radius: 999px; background: #7fdbff; color: #04112a; font-family: var(--wht-display); font-weight: 800; font-size: 15px; }

/* pulsanti */
.wht-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 0 28px; border: 0; border-radius: 999px; background: #fff; color: #050b18; font: inherit; font-size: 16px; font-weight: 800; text-decoration: none; cursor: pointer; transition: transform .15s; }
.wht-btn:hover { transform: scale(1.03); }
.wht-play { min-width: min(100%, 300px); min-height: 58px; background: var(--wht-accent); color: #07101f; font-size: 17px; box-shadow: 0 12px 30px -12px var(--wht-accent); animation: wht-ping 2s infinite; }
@keyframes wht-ping { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .45); } 70% { box-shadow: 0 0 0 16px rgba(255, 255, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); } }
.wht-link { min-height: 44px; padding: 0 8px; border: 0; background: none; color: #d6e2f0; font: inherit; font-size: 15px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.wht-btn:focus-visible, .wht-link:focus-visible, .wht-chip:focus-visible, .wht-icon:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.wht-meta { margin: 0; color: #a9b8cc; font-size: 14px; line-height: 1.45; }

/* risultato */
.wht-score { margin: 0; color: #d6e2f0; font-size: 15px; font-weight: 600; }
.wht-score b { display: block; color: #fff; font-family: var(--wht-display); font-size: clamp(44px, 12vw, 64px); font-weight: 800; line-height: 1; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.wht-record { margin: -4px 0 0; color: #a9b8cc; font-size: 14px; font-weight: 600; }
.wht-record.is-new { padding: 4px 12px; border-radius: 999px; background: var(--wht-accent); color: #07101f; font-weight: 800; }
.wht-ingot { display: inline-block; width: 30px; height: 16px; background: rgba(255, 255, 255, .18); clip-path: polygon(18% 0, 82% 0, 100% 100%, 0 100%); }
.wht-ingot.on { background: linear-gradient(135deg, #fff6b8, #f5c518 50%, #a87400); animation: wht-coin .5s cubic-bezier(.2, 1.6, .4, 1) both; }
.wht-ingots { display: flex; gap: 8px; }
.wht-ingots .on:nth-child(2) { animation-delay: .1s; } .wht-ingots .on:nth-child(3) { animation-delay: .2s; } .wht-ingots .on:nth-child(4) { animation-delay: .3s; } .wht-ingots .on:nth-child(5) { animation-delay: .4s; }
@keyframes wht-coin { from { transform: scale(0) rotate(-25deg); } }
.wht-gold { margin: 0; color: #f5c518; font-family: var(--wht-display); font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.wht-code { display: grid; gap: 4px; justify-items: center; width: 100%; padding: 14px 16px; border: 1px dashed rgba(255, 255, 255, .45); border-radius: 18px; background: rgba(255, 255, 255, .07); }
.wht-code span { color: #b9c7d9; font-size: 14px; font-weight: 600; }
.wht-code strong { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: clamp(24px, 7.4vw, 32px); letter-spacing: .05em; user-select: all; -webkit-user-select: all; }
.wht-code small { color: #b9c7d9; font-size: 14px; line-height: 1.4; }
.wht-result .wht-logo svg { height: 28px; }
.wht-claim { margin: 2px 0 0; font-family: var(--wht-display); font-size: 20px; font-weight: 800; letter-spacing: -.01em; color: #fff; }

@media (max-height: 640px) {
  .wht-card { gap: 9px; }
  .wht-title { font-size: clamp(30px, 8vw, 40px); }
  .wht-specials { padding: 8px 12px; gap: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  .wht-card, .wht-ingot.on { animation: none; }
  .wht-play { animation: none; }
  .wht-btn { transition: none; }
}
