/* Teléfonos en vivo: la app del aficionado en HTML, animada y en la piel de cada club.
   Todo cuelga de .m-phone y usa el prefijo m- para no chocar con las clases de la base.
   El tamaño sale de --pw (ancho del teléfono); el texto escala con él. */

.m-phone {
  --pw: 300px;
  position: relative;
  width: var(--pw);
  aspect-ratio: 320 / 680;
  padding: calc(var(--pw) * .034);
  border-radius: calc(var(--pw) * .17);
  background: linear-gradient(150deg, #343834 0%, #121412 35%, #0A0B0A 70%, #2A2D2A 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), inset 0 0 0 3px #050605, 0 40px 80px -30px rgba(0, 0, 0, .85);
  font-size: calc(var(--pw) * .05);
}
.m-screen {
  position: relative; height: 100%; overflow: hidden;
  display: flex; flex-direction: column;
  border-radius: calc(var(--pw) * .135);
  background: var(--p-bg); color: var(--p-text);
  font-family: var(--inter); font-size: .75em; line-height: 1.35;
}
.m-status { display: flex; justify-content: space-between; align-items: center; flex: none; height: 3.3em; padding: .6em 2em 0; font-weight: 600; font-size: 1.05em; }
.m-island { width: 7.2em; height: 2.1em; border-radius: 2em; background: #000; }
.m-battery { position: relative; width: 1.9em; height: .95em; border: 1.5px solid currentColor; border-radius: .3em; opacity: .9; }
.m-battery::after { content: ""; position: absolute; inset: 1.5px 5px 1.5px 1.5px; background: currentColor; border-radius: 1px; }
.m-app { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: .8em; padding: .4em 1.2em 0; overflow: hidden; }
.m-top { display: flex; align-items: center; justify-content: space-between; gap: .8em; height: 2.8em; flex: none; }
.m-badge { width: 2.7em; height: 1.35em; flex: none; }
.m-avatar { display: grid; place-items: center; flex: none; width: 2.5em; height: 2.5em; margin-left: auto; border-radius: 50%; background: var(--p-raised); font-weight: 700; font-size: .85em; }
.m-club { font-weight: 700; font-size: .95em; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
.m-crest { flex: none; width: 2.1em; height: 2.75em; background: center / contain no-repeat; display: grid; place-items: center; }

.m-card { flex: none; padding: 1.1em; border-radius: 1.4em; background: var(--p-surface); border: 1px solid var(--p-border); }
.m-micro { margin: 0 0 .5em; font-size: .8em; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--p-muted); }
.m-big { margin: 0 0 .35em; font: 700 3.1em/1 var(--sg); letter-spacing: -.035em; color: var(--p-value); font-variant-numeric: tabular-nums; }
.m-big small { font: 500 .34em var(--inter); letter-spacing: 0; color: var(--p-muted); }
.m-bar { height: .5em; margin: .9em 0 .8em; border-radius: 1em; background: var(--p-track); overflow: hidden; }
.m-bar i { display: block; height: 100%; width: calc(var(--p) * 100%); border-radius: inherit; background: var(--p-progress); transition: width .9s var(--ease), background-color .7s var(--ease); }
.m-bar.is-thin { height: .33em; margin: .7em 0 0; }
.m-muted { margin: 0; color: var(--p-muted); font-size: .95em; }
.m-center { text-align: center; }
.m-h { display: flex; justify-content: space-between; align-items: center; flex: none; margin: .4em 0 -.1em; font: 700 1.3em/1.2 var(--sg); letter-spacing: -.01em; }
.m-see { font: 500 .7em var(--inter); color: var(--p-muted); }
.m-live { display: inline-flex; align-items: center; gap: .45em; font: 700 .62em var(--inter); letter-spacing: .08em; text-transform: uppercase; color: var(--p-live); }
.m-live::before { content: ""; width: .55em; height: .55em; border-radius: 50%; background: currentColor; animation: m-pulse 1.6s ease-in-out infinite; }
@keyframes m-pulse { 50% { opacity: .25; } }
.m-q { margin: 0 0 .8em; font-weight: 600; font-size: 1.15em; }
.m-picks { display: flex; gap: .45em; }
.m-picks span { flex: 1; padding: .6em 0; border-radius: .8em; text-align: center; background: var(--p-raised); font-weight: 600; font-size: .9em; transition: background-color .35s, color .35s, transform .35s var(--ease); }
.m-picks span.is-on { background: var(--p-action); color: var(--p-on-action); transform: scale(1.04); }
.m-pay { margin: .8em 0 0; font-size: .9em; color: var(--p-muted); }
.m-pay b { color: var(--p-value); }
.m-pay.is-won { color: var(--p-progress); font-weight: 600; }
.m-pay.is-won b { color: inherit; }
.m-mission { display: flex; align-items: center; gap: 1em; }
.m-mission > div { flex: 1; min-width: 0; }
.m-t { margin: 0; font-weight: 600; font-size: 1.05em; }
.m-claim { flex: none; padding: .55em 1em; border-radius: 1em; background: var(--p-raised); font-weight: 700; font-size: .9em; }
.m-claim.is-go { background: var(--p-action); color: var(--p-on-action); }
.m-rewards { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6em; flex: none; }
.m-reward { overflow: hidden; padding-bottom: .7em; border-radius: 1.1em; background: var(--p-surface); border: 1px solid var(--p-border); }
.m-reward p { margin: .6em .7em .15em; min-height: 2.5em; font-weight: 600; font-size: .85em; line-height: 1.25; }
.m-reward small { display: block; margin: 0 .85em; font-size: .8em; color: var(--p-muted); }
.m-art { display: block; height: 4.4em; background-color: var(--p-raised); }
.m-art-1 { background-image: repeating-linear-gradient(115deg, transparent 0 .9em, color-mix(in srgb, var(--p-progress) 22%, transparent) .9em 1.8em); }
.m-art-2 { background-image: radial-gradient(circle at 50% 120%, transparent 0 1.2em, color-mix(in srgb, var(--p-progress) 26%, transparent) 1.2em 1.5em, transparent 1.5em 2.4em, color-mix(in srgb, var(--p-progress) 18%, transparent) 2.4em 2.7em, transparent 2.7em 3.6em, color-mix(in srgb, var(--p-progress) 12%, transparent) 3.6em 3.9em, transparent 3.9em); }
.m-art-3 { background-image: radial-gradient(color-mix(in srgb, var(--p-progress) 35%, transparent) .18em, transparent .2em); background-size: .9em .9em; }
.m-art.is-wide { width: 100%; height: 7em; border-radius: 1em; margin-bottom: 1em; }

.m-tabbar { display: flex; justify-content: space-around; flex: none; padding: .7em .4em 1.9em; border-top: 1px solid var(--p-border); background: var(--p-bg); }
.m-tabbar > span { display: flex; flex-direction: column; align-items: center; gap: .25em; font-size: .78em; font-weight: 500; color: var(--p-muted); transition: color .4s; }
.m-tabbar > span.is-on { color: var(--p-tab-on); }
.m-tabbar svg { width: 1.9em; height: 1.9em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.m-toast {
  position: absolute; top: 3.6em; left: 1em; right: 1em; z-index: 3;
  display: flex; align-items: center; gap: .8em; padding: .9em 1.1em; border-radius: 1.3em;
  background: var(--p-toast-bg); color: var(--p-toast-fg); font-weight: 500;
  box-shadow: 0 1.2em 2.4em -1em rgba(0, 0, 0, .7);
  opacity: 0; transform: translateY(-130%) scale(.96);
  transition: opacity .5s var(--ease), transform .7s var(--ease);
}
.m-toast.is-on { opacity: 1; transform: none; }
.m-toast svg { width: 1.8em; height: 1.8em; flex: none; padding: .3em; border-radius: 50%; background: var(--p-progress); color: var(--p-on-action); fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.m-push {
  position: absolute; top: .6em; left: .8em; right: .8em; z-index: 2;
  display: flex; align-items: center; gap: .8em; padding: .8em .9em; border-radius: 1.3em;
  background: rgba(245, 247, 242, .94); color: var(--black); font-size: .92em;
  box-shadow: 0 1em 2em -1em rgba(0, 0, 0, .6);
  opacity: 0; transform: translateY(-140%);
  transition: opacity .5s var(--ease), transform .8s var(--ease);
}
.m-push.is-on { opacity: 1; transform: none; }
.m-push .m-badge { width: 2.6em; height: 2.6em; padding: .65em .35em; border-radius: .6em; background: var(--black); }
.m-push div { display: flex; flex-direction: column; }
.m-options { display: grid; gap: .45em; }
.m-options > span { position: relative; overflow: hidden; display: flex; justify-content: space-between; padding: .8em 1em; border-radius: .9em; background: var(--p-raised); font-weight: 600; }
.m-options > span::before { content: ""; position: absolute; inset: 0 auto 0 0; width: calc(var(--v, 0) * 1%); background: color-mix(in srgb, var(--p-progress) 16%, transparent); transition: width 1.2s var(--ease); }
.m-options > span > * { position: relative; }
.m-options .is-picked { background: var(--p-action); color: var(--p-on-action); }
.m-options .is-picked::before { background: rgba(0, 0, 0, .12); }
.m-redeem { display: flex; flex-direction: column; align-items: center; text-align: center; }
.m-qr { width: 9.5em; height: 9.5em; margin: 1.1em 0 .8em; padding: .6em; border-radius: .8em; background: #fff; }
.m-qr svg { width: 100%; height: 100%; }
.m-code { margin: .2em 0 .3em; font: 700 1.5em var(--sg); letter-spacing: .12em; }
.m-powered { display: flex; align-items: center; justify-content: center; gap: .5em; margin: auto 0 0; padding: .4em 0 .9em; font-size: .72em; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--p-muted); }
.m-powered .m-badge { width: 2.2em; height: 1.1em; margin-left: .4em; }
.m-powered b { font: 700 1.45em var(--sg); letter-spacing: -.01em; text-transform: none; color: var(--p-text); }

/* Pieles: la misma app en los colores de cada club (clubes de demo ficticios) */
.m-skin-hl {
  --p-bg: #0B0D0C; --p-surface: #181B19; --p-raised: #262A27; --p-border: rgba(245, 247, 242, .06);
  --p-text: #F5F7F2; --p-muted: #8D938D; --p-value: #F5F7F2; --p-progress: #B7FF3C; --p-track: #262A27;
  --p-live: #B7FF3C; --p-action: #B7FF3C; --p-on-action: #0B0D0C; --p-tab-on: #B7FF3C;
  --p-toast-bg: #F5F7F2; --p-toast-fg: #0B0D0C;
}
.m-skin-altamar {
  --p-bg: #070B16; --p-surface: #0E1524; --p-raised: #162034; --p-border: #1B2740;
  --p-text: #F2F7FF; --p-muted: #8EA0BF; --p-value: #FFC53D; --p-progress: #4FE3FF; --p-track: #162034;
  --p-live: #4FE3FF; --p-action: #1A5FEB; --p-on-action: #F2F7FF; --p-tab-on: #4FE3FF;
  --p-toast-bg: #F2F7FF; --p-toast-fg: #061428;
}
.m-skin-norte {
  --p-bg: #0F0A0B; --p-surface: #1B1113; --p-raised: #2A1A1D; --p-border: #33201F;
  --p-text: #FFF5F3; --p-muted: #B39A9D; --p-value: #FFFFFF; --p-progress: #FF4D6D; --p-track: #2A1A1D;
  --p-live: #FF4D6D; --p-action: #C81E3A; --p-on-action: #FFFFFF; --p-tab-on: #FF4D6D;
  --p-toast-bg: #FFF5F3; --p-toast-fg: #1B1113;
}
.m-skin-altamar .m-crest { background-image: url("../images/club-altamar-crest.svg"); }
.m-skin-norte .m-crest { width: 2.5em; height: 2.5em; border-radius: 50%; background: #C81E3A; box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 4px #C81E3A; }
.m-skin-norte .m-crest::before { content: "NFC"; color: #fff; font: 700 .62em/1 var(--sg); letter-spacing: .02em; }
.m-skin-hl .m-crest { width: 2.5em; height: 2.5em; border-radius: .55em; background-image: url("../../favicon.svg"); }

/* Cambio de piel: los colores se funden y los textos se cruzan */
[data-skin-phone] .m-screen, [data-skin-phone] .m-screen * { transition: background-color .7s var(--ease), color .7s var(--ease), border-color .7s var(--ease); }
[data-skin-phone] [data-b] { transition: opacity .22s, color .7s var(--ease); }
[data-skin-phone].is-swapping [data-b] { opacity: 0; }
[data-skin-phone] .m-bar i { transition: width .9s var(--ease), background-color .7s var(--ease); }

@media (prefers-reduced-motion: reduce) {
  .m-live::before { animation: none; }
}
