/* La gamificación, lo grande (F7-62, bloque B, t101): las tarjetas de nivel,
 * rango, logro, hito de racha y reclamo, el resumen desplegable del indicador
 * y la página «Progress». Se pide sólo cuando hace falta (`gam.js` →
 * `gam-fx.js`; «Progress» la enlaza en su cabecera). Sólo tokens; lo que se
 * mueve, dentro de `prefers-reduced-motion: no-preference`; con movimiento
 * reducido, fundidos cortos y el emblema ya hecho. */

/* ======================================================================
   Velo y tarjetas
   ====================================================================== */
.gam-veil { position: fixed; inset: 0; z-index: 96; display: grid; place-items: center; padding: 16px;
  background: rgba(4, 6, 10, .55); }
:root[data-theme="light"] .gam-veil { background: rgba(15, 23, 42, .3); }
.gam-veil.out { opacity: 0; transition: opacity .22s ease; }
.gam-card { --rk: var(--accent); --ra: var(--accent); position: relative; width: 360px; max-width: 100%; text-align: center; overflow: hidden;
  background: var(--bg-elevated); border: 1px solid var(--line-strong); border-radius: 18px; box-shadow: var(--shadow), 0 0 0 1px color-mix(in srgb, var(--rk) 25%, transparent);
  padding: 28px 22px 20px; color: var(--text); isolation: isolate; }
.gam-card::before { content: ""; position: absolute; inset: -45% -45% auto; height: 300px; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--rk) 34%, transparent), transparent); }
.gam-card canvas.fxc { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
.gam-card .k { font-size: var(--size-2xs); text-transform: uppercase; letter-spacing: .16em; color: var(--rk); font-weight: 750; margin-top: 14px; }
.gam-card h3 { margin: 4px 0 2px; font-size: 34px; letter-spacing: -.02em; line-height: 1.1; }
.gam-card .big { font-size: 64px; font-weight: 800; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--rk);
  text-shadow: 0 0 24px color-mix(in srgb, var(--rk) 45%, transparent); }
.gam-card p { margin: 4px 0 0; color: var(--text-muted); font-size: var(--size-sm); }
.gam-card .perk { margin: 14px 0 0; font-size: var(--size-xs); color: var(--text); background: var(--surface); border: 1px solid color-mix(in srgb, var(--rk) 35%, var(--line));
  border-radius: var(--radius-sm); padding: 8px 10px; text-align: left; display: flex; gap: 8px; align-items: flex-start; }
.gam-card .perk b { color: var(--rk); }
.gam-card .row { display: flex; justify-content: center; gap: 8px; margin-top: 18px; position: relative; z-index: 3; }
.gam-btn { border: 1px solid var(--line-strong); background: var(--surface-hover); color: var(--text); border-radius: var(--radius-sm);
  padding: 7px 14px; font: inherit; font-size: var(--size-sm); cursor: pointer; min-height: 34px; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.gam-btn:hover { text-decoration: none; filter: brightness(1.08); }
.gam-btn.pri { background: var(--rk); border-color: transparent; color: var(--bg); font-weight: 650; }
:root[data-theme="light"] .gam-btn.pri { color: #fff; }
.gam-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.gam-x { position: absolute; top: 8px; right: 8px; z-index: 4; width: 30px; height: 30px; border-radius: 8px; border: 0; background: none; color: var(--text-faint);
  cursor: pointer; font-size: 18px; line-height: 1; }
.gam-x:hover { background: var(--surface-hover); color: var(--text); }

/* El escenario del emblema: anillo, bloques que encajan, emblema nuevo. */
.gam-stage { position: relative; width: 176px; height: 176px; margin: 0 auto; }
.gam-stage > * { position: absolute; }
.gam-stage .ring { inset: 0; width: 176px; height: 176px; transform: rotate(-90deg); overflow: visible; }
.gam-stage .ring circle { fill: none; stroke-width: 4; }
.gam-stage .ring .bg { stroke: var(--line-strong); }
.gam-stage .ring .pr { stroke: var(--rk); stroke-linecap: round; filter: drop-shadow(0 0 6px color-mix(in srgb, var(--rk) 70%, transparent)); }
.gam-stage .em-new, .gam-stage .em-old { inset: 26px; display: grid; place-items: center; }
.gam-stage .em-new svg, .gam-stage .em-old svg { width: 124px; height: 124px; }
.gam-stage .shard { inset: 26px; }
.gam-stage .shard svg { width: 124px; height: 124px; }
.gam-stage .blk { left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; color: var(--rk); opacity: 0;
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--rk) 70%, transparent)); }
.gam-stage .blk svg { width: 100%; height: 100%; display: block; overflow: visible; }
.gam-stage .wave { inset: 20px; border-radius: 50%; border: 3px solid var(--rk); opacity: 0; }
.gam-stage .rays { inset: -60px; border-radius: 50%; opacity: 0; z-index: -1;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--rk) 34%, transparent) 0 6deg, transparent 6deg 22deg);
  -webkit-mask: radial-gradient(closest-side, #000 30%, transparent 100%); mask: radial-gradient(closest-side, #000 30%, transparent 100%); }

@media (prefers-reduced-motion: no-preference) {
  .gam-veil { animation: gfx-fade .25s ease; }
  .gam-card.c { animation: gfx-card .5s cubic-bezier(.2,.9,.3,1.3); }
  .gam-stage .ring .pr { animation: gfx-ring 1.2s cubic-bezier(.5,0,.2,1) .25s both; }
  .gam-card.lv .blk { animation: gfx-blk .75s cubic-bezier(.3,.9,.3,1.25) both; animation-delay: var(--d); }
  .gam-card.lv .em-new { animation: gfx-forge .6s cubic-bezier(.2,.9,.3,1.4) .95s both; }
  .gam-card.lv .wave { animation: gfx-wave .9s ease-out 1s both; }
  .gam-card.lv .rays { animation: gfx-rays 6s linear .9s both; }
  .gam-card.lv .k, .gam-card.lv h3, .gam-card.lv p { animation: gfx-up .45s ease 1.05s both; }
  .gam-card.rk .em-old { animation: gfx-shake .5s ease .15s both; }
  .gam-card.rk .shard { animation: gfx-shard .8s cubic-bezier(.3,0,.6,1) .62s both; }
  .gam-card.rk .em-new { animation: gfx-forge 1s cubic-bezier(.2,.9,.3,1.3) 1.45s both; }
  .gam-card.rk .em-new .frame { stroke-dasharray: 200; animation: gfx-frame 1.3s ease 1.45s both; }
  .gam-card.rk .wave { animation: gfx-wave 1.1s ease-out 1.55s both; }
  .gam-card.rk .wave.w2 { animation-delay: 1.8s; }
  .gam-card.rk .rays { animation: gfx-rays 8s linear 1.45s both; }
  .gam-card.rk .blk { animation: gfx-blk .8s cubic-bezier(.3,.9,.3,1.25) both; animation-delay: calc(var(--d) + .75s); }
  .gam-card.rk .k, .gam-card.rk h3, .gam-card.rk p, .gam-card.rk .perk { animation: gfx-up .5s ease 1.9s both; }
  .gam-card.rk h3 { animation: gfx-name .8s cubic-bezier(.2,.9,.3,1.3) 1.75s both; }
  .gam-card .big { animation: gfx-pop .6s cubic-bezier(.2,.9,.3,1.5) .2s both; }
}
@media (prefers-reduced-motion: reduce) {
  .gam-veil, .gam-card, .gam-ach, .gam-pop-w { animation: gfx-fade .15s ease; }
  .gam-stage .blk, .gam-stage .em-old, .gam-stage .shard, .gam-stage .wave, .gam-stage .rays { display: none; }
}
@keyframes gfx-fade { from { opacity: 0; } }
@keyframes gfx-card { from { transform: scale(.82) translateY(14px); opacity: 0; } }
@keyframes gfx-ring { from { stroke-dashoffset: var(--len); } }
@keyframes gfx-blk { 0% { transform: translate(var(--x), var(--y)) rotate(200deg) scale(.4); opacity: 0; } 25% { opacity: 1; }
  80% { transform: translate(var(--tx), var(--ty)) rotate(0) scale(1.25); opacity: 1; } 100% { transform: translate(var(--tx), var(--ty)) scale(.2); opacity: 0; } }
@keyframes gfx-forge { 0% { transform: scale(.4); opacity: 0; filter: brightness(2.4) blur(2px); } 60% { transform: scale(1.12); opacity: 1; filter: brightness(1.6); } 100% { transform: scale(1); filter: none; } }
@keyframes gfx-wave { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(1.9); opacity: 0; } }
@keyframes gfx-rays { 0% { opacity: 0; transform: rotate(0); } 10% { opacity: 1; } 100% { opacity: .55; transform: rotate(120deg); } }
@keyframes gfx-up { from { transform: translateY(8px); opacity: 0; } }
@keyframes gfx-pop { from { transform: scale(.3); opacity: 0; } }
@keyframes gfx-shake { 0%, 100% { transform: none; } 20% { transform: translate(-3px, 1px) rotate(-3deg); } 40% { transform: translate(3px, -1px) rotate(3deg); }
  60% { transform: translate(-2px, 0) rotate(-2deg); filter: brightness(1.6); } 80% { transform: translate(2px, 1px) rotate(2deg); } 99% { opacity: 1; } 100% { opacity: 0; } }
@keyframes gfx-shard { 0% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translate(var(--sx), var(--sy)) rotate(var(--sr)) scale(.6); filter: blur(1px); } }
@keyframes gfx-frame { from { stroke-dashoffset: 200; } to { stroke-dashoffset: 0; } }
@keyframes gfx-name { 0% { transform: scale(1.8); opacity: 0; letter-spacing: .3em; filter: blur(4px); } 100% { transform: none; opacity: 1; } }

/* Los fragmentos del emblema viejo: seis cuñas del hexágono. */
.gam-stage .shard { opacity: 0; }

/* --- Logro: tarjeta lateral con el color y el brillo de su rareza --------- */
.gam-ach { --ra: var(--ra-common); position: fixed; right: 20px; bottom: 20px; z-index: 96; width: 380px; max-width: calc(100vw - 32px);
  display: grid; grid-template-columns: 60px minmax(0, 1fr); gap: 14px; align-items: center; padding: 16px 16px 14px; overflow: hidden; isolation: isolate;
  background: var(--bg-elevated); border: 1px solid color-mix(in srgb, var(--ra) 55%, var(--line-strong)); border-radius: 16px; color: var(--text);
  box-shadow: var(--shadow), 0 0 calc(var(--glow, 0) * 34px) color-mix(in srgb, var(--ra) 45%, transparent); }
.gam-ach::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(120deg, color-mix(in srgb, var(--ra) 14%, transparent), transparent 60%); }
.gam-ach canvas.fxc { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; }
.gam-ach .disc { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; color: var(--ra); position: relative;
  background: color-mix(in srgb, var(--ra) 16%, var(--surface)); border: 2px solid color-mix(in srgb, var(--ra) 75%, transparent); }
.gam-ach .disc svg { width: 30px; height: 30px; }
.gam-ach .disc::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid transparent;
  border-top-color: color-mix(in srgb, var(--ra) 80%, transparent); opacity: 0; }
.gam-ach > div { padding-right: 18px; min-width: 0; }
.gam-ach .k { font-size: var(--size-2xs); text-transform: uppercase; letter-spacing: .12em; color: var(--ra); font-weight: 750; }
.gam-ach .n { font-weight: 750; font-size: var(--size-md); line-height: 1.2; margin-top: 1px; }
.gam-ach .c { font-size: var(--size-xs); color: var(--text-muted); margin-top: 2px; }
.gam-ach .r { font-size: var(--size-2xs); color: var(--text-faint); margin-top: 6px; font-variant-numeric: tabular-nums; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.gam-ach .r a { color: var(--accent); font-weight: 600; font-size: var(--size-xs); }
.gam-ach .sheen { position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0;
  background: linear-gradient(105deg, transparent 35%, color-mix(in srgb, #fff 32%, transparent) 50%, transparent 65%); transform: translateX(-100%); }
.gam-ach[data-ra="uncommon"] { --glow: .35; } .gam-ach[data-ra="rare"] { --glow: .7; } .gam-ach[data-ra="epic"] { --glow: 1; }
.gam-ach[data-ra="legendary"] { --glow: 1.4; border-width: 2px; }
.gam-ach .gold-rays { position: absolute; left: 30px; top: 50%; width: 520px; height: 520px; margin: -260px 0 0 -260px; z-index: -1; pointer-events: none; opacity: 0;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--ra) 30%, transparent) 0 5deg, transparent 5deg 18deg);
  -webkit-mask: radial-gradient(closest-side, #000 20%, transparent 75%); mask: radial-gradient(closest-side, #000 20%, transparent 75%); }
@media (prefers-reduced-motion: no-preference) {
  .gam-ach { animation: gfx-ach .55s cubic-bezier(.2,.9,.3,1.25); }
  .gam-ach .disc { animation: gfx-disc .7s cubic-bezier(.2,.9,.3,1.6) .2s both; }
  .gam-ach[data-ra="rare"] .sheen, .gam-ach[data-ra="epic"] .sheen, .gam-ach[data-ra="legendary"] .sheen { animation: gfx-sheen 1.3s ease .6s both; }
  .gam-ach[data-ra="epic"] .disc::after, .gam-ach[data-ra="legendary"] .disc::after { opacity: 1; animation: em-spin 1.4s linear infinite; }
  .gam-ach[data-ra="legendary"] .gold-rays { animation: gfx-rays 7s linear .3s both; }
  .gam-ach[data-ra="legendary"] .n { background: linear-gradient(90deg, var(--text), var(--ra), var(--rk-8b), var(--text)); background-size: 300% 100%;
    -webkit-background-clip: text; background-clip: text; color: transparent; animation: gfx-gold 2.4s linear infinite; }
  .gam-ach.out { animation: gfx-achout .3s ease forwards; }
}
.gam-ach.out { opacity: 0; transition: opacity .2s; }
@keyframes gfx-ach { from { transform: translateX(60px) scale(.94); opacity: 0; } }
@keyframes gfx-achout { to { transform: translateX(40px); opacity: 0; } }
@keyframes gfx-disc { 0% { transform: scale(0) rotate(-90deg); } 70% { transform: scale(1.18) rotate(8deg); } 100% { transform: none; } }
@keyframes gfx-sheen { 0% { transform: translateX(-100%); opacity: 1; } 100% { transform: translateX(100%); opacity: 1; } }
@keyframes gfx-gold { to { background-position: 300% 0; } }
@media (max-width: 860px) { .gam-ach { right: 16px; left: 16px; bottom: 16px; width: auto; } }

/* --- Hito de racha: la llama --------------------------------------------- */
.gam-card.ms { --rk: var(--flame); }
.gam-card.ms.blue { --rk: var(--freeze); }
.gam-card.ms.gold { --rk: var(--rk-8); }
.gam-flame { width: 150px; height: 170px; margin: -6px auto 0; position: relative; }
.gam-flame svg { width: 100%; height: 100%; overflow: visible; }
.gam-flame .f1 { fill: var(--rk); } .gam-flame .f2 { fill: color-mix(in srgb, var(--rk) 55%, var(--flame-hot)); } .gam-flame .f3 { fill: var(--flame-hot); }
.gam-card.ms.blue .f3 { fill: #e0f2fe; } .gam-card.ms.gold .f3 { fill: var(--rk-8b); }
.gam-flame .glow { position: absolute; inset: 20% 10% 0; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--rk) 55%, transparent), transparent); filter: blur(6px); }
.gam-flame .days { position: absolute; left: 0; right: 0; bottom: 18px; font-size: 40px; font-weight: 850; color: var(--bg-elevated); font-variant-numeric: tabular-nums;
  text-shadow: none; }
@media (prefers-reduced-motion: no-preference) {
  .gam-flame svg { animation: gfx-flame-in .9s cubic-bezier(.2,.9,.3,1.3) both; transform-origin: 50% 95%; }
  .gam-flame .f1 { animation: gfx-flick 1.1s ease-in-out infinite; transform-origin: 50% 95%; transform-box: fill-box; }
  .gam-flame .f2 { animation: gfx-flick 0.8s ease-in-out .1s infinite reverse; transform-origin: 50% 95%; transform-box: fill-box; }
  .gam-flame .f3 { animation: gfx-flick 0.6s ease-in-out .2s infinite; transform-origin: 50% 95%; transform-box: fill-box; }
  .gam-flame .glow { animation: gfx-glow 1.6s ease-in-out infinite; }
}
@keyframes gfx-flame-in { 0% { transform: scale(.1); opacity: 0; } 60% { transform: scale(1.15); opacity: 1; } 100% { transform: none; } }
@keyframes gfx-flick { 0%, 100% { transform: scale(1, 1); } 30% { transform: scale(.94, 1.08) skewX(2deg); } 60% { transform: scale(1.05, .95) skewX(-2deg); } }
@keyframes gfx-glow { 50% { transform: scale(1.12); opacity: .75; } }

/* ======================================================================
   El resumen desplegable del indicador
   ====================================================================== */
.gam-pop-w { --rk: var(--rk-1); position: fixed; z-index: 92; width: 330px; max-width: calc(100vw - 32px); max-height: calc(100vh - 32px); overflow: auto;
  background: var(--bg-elevated); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; color: var(--text); }
@media (prefers-reduced-motion: no-preference) { .gam-pop-w { animation: gfx-popin .22s cubic-bezier(.2,.9,.3,1.2); transform-origin: top left; } }
@keyframes gfx-popin { from { transform: translateY(-6px) scale(.97); opacity: 0; } }
.gam-pop-w h2 { font-size: var(--size-md); margin: 0; line-height: 1.2; }
.gam-pop-w .hd { display: flex; gap: 12px; align-items: center; }
.gam-pop-w .hd .em { width: 46px; height: 46px; flex: 0 0 auto; }
.gam-pop-w .sub { font-size: var(--size-xs); color: var(--text-muted); }
.gam-pop-w .sec { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; }
.gam-pop-w .ey { font-size: var(--size-2xs); text-transform: uppercase; letter-spacing: .1em; color: var(--accent); font-weight: 650; margin-bottom: 6px; display: flex; justify-content: space-between; }
.gam-pop-w .ey span { color: var(--text-faint); letter-spacing: 0; text-transform: none; font-weight: 500; }
.gam-bar { position: relative; height: 8px; background: var(--surface-sunken); border-radius: 99px; overflow: hidden; border: 1px solid var(--line); }
.gam-bar i { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 99px; background: var(--rk); }
.gam-bar i.today { background: color-mix(in srgb, var(--rk) 45%, transparent); }
@media (prefers-reduced-motion: no-preference) { .gam-bar i { transition: width .6s cubic-bezier(.2,.8,.2,1); } }
.gam-row { display: flex; justify-content: space-between; gap: 10px; font-size: var(--size-xs); color: var(--text-muted); margin-top: 6px; font-variant-numeric: tabular-nums; flex-wrap: wrap; }
.gam-mis { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 5px 0; font-size: var(--size-sm); }
.gam-mis .ck { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; }
.gam-mis.done .ck { background: var(--accent); border-color: transparent; color: var(--accent-ink); }
.gam-mis.done .t { color: var(--text-muted); text-decoration: line-through; text-decoration-color: var(--text-faint); }
.gam-mis .v { font-size: var(--size-2xs); color: var(--text-faint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.gam-mis .bar2 { grid-column: 2 / 4; height: 4px; border-radius: 4px; background: var(--surface-sunken); overflow: hidden; margin-top: -2px; }
.gam-mis .bar2 i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
/* Misión con enlace (t138): la fila entera lleva adonde se cumple. */
a.gam-mis.go { color: inherit; text-decoration: none; margin: 0 -6px; padding: 5px 6px; border-radius: 6px; }
a.gam-mis.go:hover { background: var(--surface-hover); text-decoration: none; }
a.gam-mis.go:hover .t, a.gam-mis.go:focus-visible .t { color: var(--accent); }
a.gam-mis.go:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.gam-tg { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: var(--size-sm); padding: 4px 0; }
.gam-tg small { display: block; color: var(--text-faint); font-size: var(--size-2xs); }
.gam-sw { position: relative; width: 38px; height: 22px; flex: 0 0 auto; border-radius: 11px; background: var(--line-strong); border: 0; cursor: pointer; padding: 0; }
.gam-sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.3); transition: transform .15s; }
.gam-sw[aria-checked="true"] { background: var(--accent); }
.gam-sw[aria-checked="true"]::after { transform: translateX(16px); }
.gam-sw:disabled { opacity: .45; cursor: not-allowed; }
.gam-sw:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.gam-pop-w .foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; gap: 8px; flex-wrap: wrap; }
.gam-pop-w .foot a { font-weight: 600; font-size: var(--size-sm); }
.gam-pop-w .gam-stk { justify-content: flex-start; }
.gam-pop-w .gam-stk .gam-fl svg { width: 22px; height: 22px; }
.gam-pop-w .cta { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.gam-pop-w .note { font-size: var(--size-2xs); color: var(--text-faint); margin-top: 8px; }

/* ======================================================================
   «Progress»
   ====================================================================== */
.gp { --rk: var(--rk-1); }
.gp .grid2 { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--s3); }
.gp .grid2 + .grid2, .gp .sec-gap { margin-top: var(--s3); }
.gp .card { min-width: 0; }
.gp-hero { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: var(--s6); align-items: center; padding: var(--s5); position: relative; overflow: hidden; }
.gp-hero::before { content: ""; position: absolute; left: -80px; top: -80px; width: 360px; height: 360px; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--rk) 18%, transparent), transparent); }
.gp-hero .emw { display: grid; justify-items: center; position: relative; }
.gp-hero .emw svg.em { width: 168px; height: 168px; }
.gp-pips { display: flex; gap: 5px; justify-content: center; margin-top: 8px; }
.gp-pips i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
.gp-pips i.on { background: var(--rk); box-shadow: 0 0 0 2px color-mix(in srgb, var(--rk) 25%, transparent); }
.gp-hero .rk { font-size: var(--size-2xl); font-weight: 750; letter-spacing: -.02em; line-height: 1.1; margin: 2px 0 0; }
.gp-hero .lv { color: var(--text-muted); font-size: var(--size-md); margin-top: 4px; }
.gp-hero .gam-bar { height: 10px; margin: var(--s4) 0 var(--s2); }
.gp-hero .gam-row { font-size: var(--size-sm); }
.gp-ladder { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; margin-top: var(--s5); }
.gp-ladder > div { border: 1px solid transparent; border-radius: var(--radius-sm); padding: 6px 2px; display: grid; justify-items: center; gap: 2px; min-width: 0; }
.gp-ladder > div.cur { border-color: color-mix(in srgb, var(--rk) 55%, transparent); background: color-mix(in srgb, var(--rk) 8%, transparent); }
.gp-ladder > div.locked svg { filter: grayscale(1); opacity: .38; }
.gp-ladder svg.em { width: 40px; height: 40px; }
.gp-ladder .nm { font-size: var(--size-2xs); font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.gp-ladder .rg { font-size: 10px; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.gp-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: var(--s3); }
.gp-warn { margin-top: var(--s3); font-size: var(--size-xs); color: var(--text); background: color-mix(in srgb, var(--warn) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent);
  border-radius: var(--radius-sm); padding: 8px 10px; display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }

.gp-streak .top { display: flex; align-items: center; gap: var(--s4); }
.gp-streak .top svg { width: 44px; height: 44px; color: var(--flame); }
.gp-streak .top.cold svg { color: var(--text-faint); }
.gp-streak .n { font-size: var(--size-2xl); font-weight: 750; line-height: 1; font-variant-numeric: tabular-nums; }
.gp-mult { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 3px; margin: var(--s4) 0 var(--s2); }
.gp-mult div { text-align: center; font-size: var(--size-2xs); padding: 5px 0 4px; border-radius: 5px; background: var(--surface-sunken); color: var(--text-faint); border: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.gp-mult div small { display: block; font-size: 9.5px; opacity: .8; }
.gp-mult div.past { color: var(--text-muted); }
.gp-mult div.cur { background: color-mix(in srgb, var(--flame) 18%, var(--surface)); color: var(--text); border-color: color-mix(in srgb, var(--flame) 60%, transparent); font-weight: 700; }
.gp-mult div.land { outline: 1.5px dashed color-mix(in srgb, var(--freeze) 70%, transparent); outline-offset: 1px; }
.gp-days { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 3px; margin-top: var(--s3); }
.gp-days i { aspect-ratio: 1; border-radius: 4px; background: var(--surface-sunken); border: 1px solid var(--line); display: grid; place-items: center; font-style: normal; }
.gp-days i.q { background: color-mix(in srgb, var(--flame) 70%, transparent); border-color: transparent; }
.gp-days i.f { background: color-mix(in srgb, var(--freeze) 35%, transparent); border-color: color-mix(in srgb, var(--freeze) 60%, transparent); }
.gp-days i.today { outline: 1.5px solid var(--text-muted); outline-offset: 1px; }
.gp-days i svg { width: 9px; height: 9px; color: var(--freeze); }
.gp-frz { display: inline-flex; gap: 4px; align-items: center; vertical-align: middle; color: var(--freeze); }
.gp-frz svg { width: 16px; height: 16px; } .gp-frz .off { opacity: .25; }
.gp-mini { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); font-size: var(--size-sm); margin-top: var(--s3); flex-wrap: wrap; }
.gp-mini .gam-bar { flex: 1 1 120px; height: 6px; }

.gp-today { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: var(--s4); align-items: center; }
.gp-today svg.big { display: block; width: 116px; height: 116px; transform: rotate(-90deg); }
.gp-today svg.big circle { fill: none; stroke-width: 9; }
.gp-today svg.big .bg { stroke: var(--surface-sunken); } .gp-today svg.big .pr { stroke: var(--rk); stroke-linecap: round; }
/* t108: el SVG en bloque (en línea dejaba el hueco de la línea base debajo y
   la cifra caía por debajo del centro del anillo) y la caja, tan alta como el
   anillo. */
.gp-today .ringw { position: relative; width: max-content; margin: 0 auto; line-height: 0; }
.gp-today .ringw b { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; font-size: var(--size-lg); font-variant-numeric: tabular-nums; line-height: 1.1; }
.gp-today .ringw b small { display: block; font-size: var(--size-2xs); color: var(--text-faint); font-weight: 500; }
.gp-list { list-style: none; margin: 0; padding: 0; font-size: var(--size-sm); }
.gp-list li { display: flex; justify-content: space-between; gap: var(--s2); padding: 5px 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.gp-list li:last-child { border-bottom: 0; }

.gp-sec { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); margin: var(--s6) 0 var(--s3); flex-wrap: wrap; }
.gp-sec h2 { margin: 0; font-size: var(--size-lg); letter-spacing: -.01em; }
.gp-sec .meta { font-size: var(--size-sm); color: var(--text-faint); }
.gp-m { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: var(--s3); align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.gp-m:last-child { border-bottom: 0; }
.gp-m .ck { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; }
.gp-m.done .ck { background: var(--accent); border-color: transparent; color: var(--accent-ink); }
.gp-m .t { font-size: var(--size-sm); font-weight: 600; }
/* El título de una misión con enlace (t138). */
.gp-m a.t.go { display: inline-flex; align-items: baseline; gap: 6px; color: var(--text); text-decoration: none; border-radius: 4px; }
.gp-m a.t.go .ar { color: var(--text-faint); font-weight: 400; }
.gp-m a.t.go:hover, .gp-m a.t.go:focus-visible { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.gp-m a.t.go:hover .ar, .gp-m a.t.go:focus-visible .ar { color: var(--accent); }
@media (prefers-reduced-motion: no-preference) { .gp-m a.t.go .ar { transition: transform .15s ease; } .gp-m a.t.go:hover .ar { transform: translateX(2px); } }
.gp-m .gp-hint { font-size: var(--size-xs); color: var(--text-faint); margin-top: 2px; }
.gp-m .gam-bar { margin-top: 6px; height: 6px; } .gp-m .gam-bar i { background: var(--accent); }
.gp-m .rw { font-size: var(--size-xs); color: var(--text-muted); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.gp-swap { background: none; border: 0; color: var(--accent); font: inherit; font-size: var(--size-2xs); cursor: pointer; padding: 4px 0 0; min-height: 24px; }
.gp-swap:disabled { color: var(--text-faint); cursor: default; }

.gp-filters { display: flex; gap: 4px; flex-wrap: wrap; }
.gp-filters button { border: 1px solid var(--line-strong); background: none; color: var(--text-muted); border-radius: var(--radius-pill); padding: 3px 11px; font: inherit; font-size: var(--size-xs); cursor: pointer; min-height: 30px; }
.gp-filters button[aria-pressed="true"] { background: var(--surface-hover); color: var(--text); border-color: var(--text-faint); }
.gp-ach { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--s3); }
.gp-a { --ra: var(--ra-common); display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: var(--s3); padding: var(--s3); align-items: start; position: relative; }
.gp-a .disc { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: var(--ra); background: color-mix(in srgb, var(--ra) 14%, var(--surface));
  border: 1.5px solid color-mix(in srgb, var(--ra) 60%, transparent); }
.gp-a .disc svg { width: 23px; height: 23px; }
.gp-a.on[data-ra="epic"] .disc, .gp-a.on[data-ra="legendary"] .disc { box-shadow: 0 0 14px color-mix(in srgb, var(--ra) 45%, transparent); }
.gp-a.locked .disc { filter: grayscale(1); opacity: .5; }
.gp-a .n { font-weight: 650; font-size: var(--size-sm); line-height: 1.25; }
.gp-a .c { font-size: var(--size-xs); color: var(--text-muted); line-height: 1.35; margin-top: 2px; }
.gp-a .r { display: flex; gap: 8px; align-items: center; margin-top: 6px; flex-wrap: wrap; font-size: 10.5px; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.gp-a .rar { font-weight: 750; color: var(--ra); text-transform: uppercase; letter-spacing: .06em; font-size: 10px; }
.gp-a .gam-bar { margin-top: 7px; height: 5px; } .gp-a .gam-bar i { background: var(--ra); }
.gp-a.secret .n { letter-spacing: .2em; }

/* t239 (punto 17): el historial no alarga la página. En dos columnas mide
   lo que «Settings» (la lista pide alto 0 y crece hasta llenar la fila de la
   rejilla, que la marca Settings); en una columna, un alto fijo. Scroll
   dentro de la caja y «Load more» al final de la lista, dentro también. */
.gp-hcard { display: flex; flex-direction: column; min-height: 0; }
.gp-hbox { flex: 1 1 0; height: 0; min-height: 14rem; overflow-y: auto; overscroll-behavior: contain; margin-right: calc(-1 * var(--s2)); padding-right: var(--s2); scrollbar-gutter: stable; }
.gp-hbox:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-sm); }
.gp-hbox .gp-more { display: block; width: 100%; margin: var(--s2) 0 var(--s1); }
@media (max-width: 1100px) { .gp-hbox { flex: none; height: auto; min-height: 0; max-height: min(26rem, 65vh); } }
.gp-hist { list-style: none; padding: 0; margin: 0; font-size: var(--size-sm); }
.gp-hist li { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; gap: var(--s3); padding: 8px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.gp-hist li:last-child { border-bottom: 0; }
.gp-hist .amt { font-weight: 700; font-variant-numeric: tabular-nums; }
.gp-hist .amt.neg { color: var(--text-muted); }
.gp-hist .when { color: var(--text-faint); font-size: var(--size-xs); white-space: nowrap; }
.gp-hist .held { color: var(--text-faint); font-size: var(--size-2xs); border: 1px dashed var(--line-strong); border-radius: 4px; padding: 0 4px; margin-left: 4px; }
.gp-set .gam-tg { padding: 10px 0; border-bottom: 1px solid var(--line); }
.gp-set .gam-tg:last-of-type { border-bottom: 0; }
.gp-set .gam-tg b { font-weight: 600; display: block; }
.gp-social { display: flex; align-items: center; gap: var(--s3); padding: var(--s3); border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-sunken); flex-wrap: wrap; }
.gp-social .who { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; font-size: var(--size-sm); }
.gp-social .who svg.em { width: 20px; height: 20px; }
.gp-social .lvtag { font-size: var(--size-2xs); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.gp-empty { color: var(--text-muted); font-size: var(--size-sm); padding: var(--s3) 0; }
.gp-intro { max-width: 640px; }
.gp-intro ol { margin: var(--s3) 0 0; padding-left: 1.2em; color: var(--text-muted); font-size: var(--size-sm); display: grid; gap: 6px; }

@media (max-width: 1100px) { .gp .grid2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) {
  .gp-hero { grid-template-columns: minmax(0, 1fr); gap: var(--s3); text-align: center; padding: var(--s4); }
  .gp-hero .gam-row { flex-direction: column; align-items: center; gap: 2px; }
  .gp-ladder { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .gp-hero .emw svg.em { width: 132px; height: 132px; }
  .gp-today { grid-template-columns: 96px minmax(0, 1fr); }
  .gp-today svg.big { width: 96px; height: 96px; }
  .gp-hist li { grid-template-columns: 64px minmax(0, 1fr); }
  .gp-hist .when { grid-column: 2; }
}

/* «Send me a new link» (t108): el aviso verde al mandarlo y la cuenta atrás. */
.gam-vr-msg { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 9px 12px; border-radius: var(--radius-sm);
  font-size: 13.5px; font-weight: 600; line-height: 1.35; }
.gam-vr-msg.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); border: 1px solid color-mix(in srgb, var(--ok) 55%, transparent); }
.gam-vr-msg.warn { color: var(--text); background: color-mix(in srgb, var(--warn, #d97706) 12%, transparent); border: 1px solid color-mix(in srgb, var(--warn, #d97706) 45%, transparent); }
.gam-vr-msg svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.gam-vr-cd { font-variant-numeric: tabular-nums; opacity: .85; margin-left: 4px; }
form[data-vr] button[disabled] { cursor: not-allowed; opacity: .7; }

/* t277 (2026-11-23): el aviso de cookies ya no hace esperar a las
   celebraciones; convive con ellas. El velo y el logro se quedan por encima
   de la barra (`--onb-cb`, que pone `onboard.js` en `<html>.onb-consent`),
   así el aviso sigue a la vista y se puede contestar. */
.onb-consent .gam-veil { bottom: var(--onb-cb, 0px); }
.onb-consent .gam-ach { bottom: var(--onb-cb, 20px); margin-bottom: 0; }

/* --- Compartir el nivel nuevo (t277) -------------------------------------- */
.gam-share { position: relative; z-index: 3; display: flex; justify-content: center; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 14px;
  padding-top: 12px; border-top: 1px solid color-mix(in srgb, var(--rk) 22%, var(--line)); }
.gam-share .lb { font-size: var(--size-2xs); text-transform: uppercase; letter-spacing: .14em; color: var(--text-faint); font-weight: 700; margin-right: 2px; }
.gam-sh { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--rk) 35%, var(--line-strong));
  background: var(--surface); color: var(--text); cursor: pointer; padding: 0; text-decoration: none; }
.gam-sh svg { width: 17px; height: 17px; }
.gam-sh:hover { color: var(--rk); border-color: var(--rk); background: color-mix(in srgb, var(--rk) 10%, var(--surface)); text-decoration: none; }
.gam-sh:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.gam-sh-ok { flex-basis: 100%; min-height: 0; font-size: var(--size-2xs); color: var(--text-muted); text-align: center; }
.gam-sh-ok:empty { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .gam-sh { transition: transform .15s ease, color .15s ease, border-color .15s ease; }
  .gam-sh:hover { transform: translateY(-2px); }
}
@media (max-width: 860px) and (pointer: coarse), (max-width: 720px) { .gam-sh { width: 40px; height: 40px; } }
