@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/fonts/inter-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/fonts/inter-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Anton"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/anton-latin.woff2") format("woff2"); }

:root {
  --bg: #0d0817;
  --bg2: #150d24;
  --card: #1a1129;
  --card2: #22173a;
  --line: rgba(255, 255, 255, 0.08);
  --line2: rgba(255, 255, 255, 0.14);
  --ink: #fff;
  --ink2: rgba(255, 255, 255, 0.7);
  --ink3: rgba(255, 255, 255, 0.46);
  --pink: #ff3d8b;
  --orange: #ff9a3c;
  --gold: #ffd23d;
  --teal: #22e4d6;
  --violet: #8b5cff;
  --ok: #4be39a;
  --warn: #ffb648;
  --bad: #ff5f6d;
  --sunset: linear-gradient(135deg, #ff3d8b 0%, #ff7a52 55%, #ffc43d 100%);
  --r: 22px;
  --r-sm: 14px;
  --tabs-h: 72px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); }
body {
  font: 15px/1.45 Inter, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  overscroll-behavior: none;
  background:
    radial-gradient(120% 60% at 100% 0%, rgba(255, 61, 139, 0.16), transparent 60%),
    radial-gradient(90% 50% at 0% 10%, rgba(139, 92, 255, 0.14), transparent 60%),
    var(--bg);
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
input { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -0.02em; }
p { margin: 0; }
.i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.num { font-family: Anton, Impact, sans-serif; font-weight: 400; letter-spacing: 0.01em; font-variant-numeric: tabular-nums; }
.muted { color: var(--ink2); }
.small { font-size: 12.5px; }
.gold { color: var(--gold); }
.eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink3); }
.grad-text { background: var(--sunset); -webkit-background-clip: text; background-clip: text; color: transparent; }
.row { display: flex; gap: 10px; margin-top: 14px; }
.row > * { flex: 1; }
.spacer { height: calc(var(--tabs-h) + var(--safe-b) + 40px); }
[hidden] { display: none !important; }

/* ---------- Estructura ---------- */
#app { position: fixed; inset: 0; max-width: 520px; margin: 0 auto; }
@media (min-width: 560px) {
  #app { border-left: 1px solid var(--line); border-right: 1px solid var(--line); box-shadow: 0 0 120px rgba(0, 0, 0, 0.6); }
}
#views { position: absolute; inset: 0; }
.view {
  position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden;
  padding: calc(var(--safe-t) + 18px) 16px 0;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity 0.25s var(--ease), transform 0.35s var(--ease), visibility 0s 0.25s;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.view::-webkit-scrollbar { display: none; }
.view.on { opacity: 1; visibility: visible; transform: none; transition: opacity 0.25s var(--ease), transform 0.35s var(--ease); }
#v-mapa { padding: 0; overflow: hidden; transform: none; }

/* ---------- Barra de pestanyes ---------- */
#tabs {
  position: absolute; left: 12px; right: 12px; bottom: calc(10px + var(--safe-b));
  height: 64px; display: grid; grid-template-columns: 1fr 1fr 76px 1fr 1fr; align-items: center;
  background: rgba(22, 14, 36, 0.82); backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid var(--line2); border-radius: 24px; z-index: 50;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  transition: transform 0.4s var(--ease), opacity 0.3s;
}
#tabs button { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 600; color: var(--ink3); transition: color 0.2s; }
#tabs button .i { width: 23px; height: 23px; transition: transform 0.3s var(--spring); }
#tabs button.on { color: var(--ink); }
#tabs button.on .i { transform: translateY(-1px) scale(1.06); color: var(--pink); }
#tabs button:active .i { transform: scale(0.9); }
#tabs .fab {
  width: 62px; height: 62px; margin: -26px auto 0; border-radius: 50%; justify-content: center;
  background: var(--sunset); color: #1a0b16;
  box-shadow: 0 8px 28px rgba(255, 61, 139, 0.55), inset 0 2px 0 rgba(255, 255, 255, 0.35), 0 0 0 5px var(--bg);
  transition: transform 0.25s var(--spring);
}
#tabs .fab .i { width: 30px; height: 30px; stroke-width: 2.3; color: #1a0b16 !important; }
#tabs .fab:active { transform: scale(0.92); }
body.walking #tabs { transform: translateY(140%); opacity: 0; pointer-events: none; }

/* ---------- Capçalera ---------- */
.top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.top h1 { font-size: 30px; line-height: 1.1; }
.hello { font-size: 26px !important; }
.lvl-chip { position: relative; width: 48px; height: 48px; flex: none; display: grid; place-items: center; }
.lvl-chip svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.lvl-chip b { font-family: Anton, sans-serif; font-weight: 400; font-size: 19px; color: var(--gold); }
.icon-btn { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--card); border: 1px solid var(--line); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn.glass { background: rgba(18, 11, 30, 0.75); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-color: var(--line2); }

/* ---------- Targetes ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; margin-bottom: 14px; display: block; width: 100%; }
button.card { transition: transform 0.2s var(--ease); }
button.card:active, .hero:active { transform: scale(0.985); }
.glow { position: relative; overflow: hidden; }
.glow::before { content: ""; position: absolute; inset: -40% -20% auto; height: 70%; background: radial-gradient(closest-side, rgba(255, 61, 139, 0.22), transparent); pointer-events: none; }
.block { margin: 26px 0 8px; }
.block-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 10px; }
.block-h h2 { font-size: 19px; }
.pill { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 99px; background: var(--card2); color: var(--ink2); white-space: nowrap; }
.pill.gold { color: var(--gold); background: rgba(255, 210, 61, 0.1); }
.link { display: inline-flex; align-items: center; gap: 5px; font-size: 13.5px; font-weight: 600; color: var(--pink); }
.link .i { width: 16px; height: 16px; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.duo .card { margin-bottom: 0; min-width: 0; }

.bar { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.bar.big { height: 10px; }
.bar i { display: block; height: 100%; border-radius: inherit; background: var(--sunset); transition: width 1s var(--ease); }

/* ---------- Hero de passos ---------- */
.hero { text-align: center; padding: 24px 18px 16px; cursor: pointer; transition: transform 0.2s var(--ease); }
.ring-wrap { position: relative; width: 220px; height: 220px; margin: 0 auto; }
.ring { display: block; filter: drop-shadow(0 0 18px rgba(255, 61, 139, 0.35)); }
.ring-fg { animation: ring-in 1.4s var(--ease) both; }
@keyframes ring-in { from { stroke-dashoffset: var(--c); } }
.ring-in { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-icon .i { width: 26px; height: 26px; color: var(--pink); }
.ring-in .big { font-size: 52px; line-height: 1; margin: 4px 0 2px; }
.stars { display: flex; justify-content: center; gap: 6px; margin: 14px 0 6px; }
.stars span .i { width: 22px; height: 22px; color: rgba(255, 255, 255, 0.16); fill: rgba(255, 255, 255, 0.06); }
.stars span.on .i { color: var(--gold); fill: var(--gold); filter: drop-shadow(0 0 6px rgba(255, 210, 61, 0.6)); }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 12px; border-top: 1px solid var(--line); padding-top: 14px; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats div + div { border-left: 1px solid var(--line); }
.hero-stats b { font-size: 24px; line-height: 1.1; }
.hero-stats span { font-size: 12px; color: var(--ink3); }
.hero-edit { margin-top: 12px; font-size: 12px; color: var(--ink3); display: inline-flex; align-items: center; gap: 6px; }
.hero-edit .i { width: 14px; height: 14px; }

/* ---------- Permisos ---------- */
.perm { display: flex; gap: 14px; border-color: rgba(34, 228, 214, 0.3); background: linear-gradient(135deg, rgba(34, 228, 214, 0.1), var(--card) 60%); }
.perm-ic { width: 42px; height: 42px; border-radius: 12px; background: rgba(34, 228, 214, 0.15); color: var(--teal); display: grid; place-items: center; flex: none; }
.perm p { color: var(--ink2); font-size: 13.5px; margin-top: 3px; }
.perm .row { margin-top: 10px; }

/* ---------- Ratxa i diners ---------- */
.streak, .cashcard { padding: 16px; text-align: left; }
.streak-top { display: flex; align-items: center; gap: 8px; }
.streak-top b { font-size: 34px; line-height: 1; }
.flame .i { width: 28px; height: 28px; color: var(--ink3); }
.streak.lit .flame .i { color: var(--orange); fill: rgba(255, 154, 60, 0.25); filter: drop-shadow(0 0 8px rgba(255, 122, 82, 0.7)); animation: flick 2.2s ease-in-out infinite; }
@keyframes flick { 50% { transform: scale(1.08) rotate(-3deg); } }
.streak .muted, .cashcard .muted { font-size: 12.5px; }
.week-dots { display: flex; justify-content: space-between; margin-top: 12px; }
.week-dots i { width: 22px; height: 22px; border-radius: 50%; background: rgba(255, 255, 255, 0.06); display: grid; place-items: center; font-style: normal; }
.week-dots i em { font-style: normal; font-size: 9px; letter-spacing: -0.02em; font-weight: 700; color: var(--ink3); }
.week-dots i.on { background: var(--sunset); }
.week-dots i.on em { color: #2a0f1c; }
.week-dots i.now { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--pink); }
.cash { font-size: 34px; line-height: 1; color: var(--gold); text-shadow: 0 0 20px rgba(255, 210, 61, 0.35); }
.xp-mini { margin-top: 14px; }
.xp-mini span { display: block; font-size: 11.5px; color: var(--ink3); margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Missions ---------- */
.missions { display: grid; gap: 10px; }
.mission { display: flex; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px; transition: border-color 0.3s; }
.m-ic { width: 42px; height: 42px; border-radius: 13px; flex: none; display: grid; place-items: center; background: rgba(255, 61, 139, 0.12); color: var(--pink); }
.mission.done { border-color: rgba(75, 227, 154, 0.35); background: linear-gradient(135deg, rgba(75, 227, 154, 0.08), var(--card) 70%); }
.mission.done .m-ic { background: var(--ok); color: #0b2a1b; }
.mission.done .bar i { background: var(--ok); }
.m-body { flex: 1; min-width: 0; }
.m-t { font-weight: 650; font-size: 14.5px; line-height: 1.3; }
.m-hint { font-size: 12px; color: var(--ink3); margin-top: 2px; }
.m-body .bar { margin: 9px 0 6px; }
.m-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink3); }
.rew { color: var(--gold); font-weight: 700; }
.bonus { margin-top: 10px; font-size: 13px; color: var(--ink2); display: flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px dashed var(--line2); border-radius: 14px; }
.bonus .i { color: var(--gold); width: 18px; height: 18px; }
.bonus b { color: var(--gold); }
.bonus.done { border-style: solid; border-color: rgba(255, 210, 61, 0.4); background: rgba(255, 210, 61, 0.08); }

/* ---------- Temps ---------- */
.weather { display: grid; grid-template-columns: auto 1fr; gap: 14px 16px; margin-top: 26px; background: linear-gradient(150deg, #2a1745, var(--card) 70%); }
.w-now { display: flex; align-items: center; gap: 10px; }
.w-ic .i { width: 38px; height: 38px; color: var(--gold); }
.w-now b { font-size: 30px; line-height: 1; display: block; }
.w-now span { font-size: 12px; color: var(--ink2); }
.w-best { text-align: right; }
.w-best b { display: block; font-size: 17px; margin-top: 2px; }
.w-best span { font-size: 12.5px; color: var(--ink2); }
.w-strip { grid-column: 1 / -1; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin: 0 -6px; padding: 0 6px; }
.w-strip::-webkit-scrollbar { display: none; }
.w-strip > div { flex: 1 0 44px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 0 6px; border-radius: 12px; font-size: 11px; color: var(--ink3); position: relative; }
.w-strip > div .i { width: 18px; height: 18px; color: var(--ink2); }
.w-strip > div b { font-size: 13px; color: var(--ink); font-weight: 700; }
.w-strip > div i { display: block; width: 18px; border-radius: 3px; background: rgba(34, 228, 214, 0.6); }
.w-strip > div.best { background: rgba(255, 210, 61, 0.12); box-shadow: inset 0 0 0 1px rgba(255, 210, 61, 0.45); color: var(--gold); }

/* ---------- Rutes (carrusel) ---------- */
.carousel { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 2px 16px 6px; scrollbar-width: none; }
.carousel::-webkit-scrollbar { display: none; }
.rcard { flex: 0 0 72%; max-width: 270px; scroll-snap-align: start; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 10px 10px 14px; transition: transform 0.2s var(--ease); }
.rcard:active { transform: scale(0.97); }
.rprev { position: relative; height: 120px; border-radius: 14px; overflow: hidden; background:
  linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px) 0 0 / 18px 18px,
  linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px) 0 0 / 18px 18px,
  radial-gradient(circle at 30% 30%, #2b1a47, #150d24); }
.rprev svg { width: 100%; height: 100%; }
.rtag { position: absolute; top: 8px; left: 8px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; padding: 4px 8px; border-radius: 8px; background: rgba(0, 0, 0, 0.55); color: var(--gold); }
.rname { font-weight: 750; margin: 10px 4px 2px; }
.rmeta { font-size: 12.5px; color: var(--ink2); margin: 0 4px; }
.rmeta b { color: var(--ink); }
.rrew { margin: 6px 4px 0; font-size: 12px; font-weight: 700; color: var(--gold); }

/* ---------- Recomanacions ---------- */
.recs { display: grid; gap: 10px; }
.rec { display: flex; gap: 14px; align-items: flex-start; padding: 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); }
.rec[data-act] { cursor: pointer; }
.rec[data-act]:active { transform: scale(0.985); }
.rec b { font-size: 14.5px; }
.rec p { font-size: 13px; color: var(--ink2); margin-top: 2px; }
.rec > div:nth-child(2) { flex: 1; }
.rec-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; background: rgba(139, 92, 255, 0.15); color: #b89dff; }
.rec-ic .i { width: 20px; height: 20px; }
.rec.tone-hot .rec-ic { background: rgba(255, 61, 139, 0.15); color: var(--pink); }
.rec.tone-ok .rec-ic { background: rgba(75, 227, 154, 0.14); color: var(--ok); }
.rec.tone-warn .rec-ic { background: rgba(255, 182, 72, 0.14); color: var(--warn); }
.rec.tone-info .rec-ic { background: rgba(34, 228, 214, 0.13); color: var(--teal); }
.rec-go { align-self: center; color: var(--ink3); }
.rec-go .i { width: 18px; height: 18px; }

/* ---------- Esquelets ---------- */
.skel { position: relative; overflow: hidden; }
.skel::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.06) 50%, transparent 70%); animation: shimmer 1.4s infinite; }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.sk-line { height: 12px; border-radius: 6px; background: rgba(255, 255, 255, 0.07); margin: 10px 4px 0; }
.sk-line.short { width: 55%; }
.weather.skel { display: block; min-height: 120px; }

/* ---------- Botons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 18px; border-radius: 14px; font-weight: 700; background: var(--card2); border: 1px solid var(--line2); transition: transform 0.15s var(--ease), filter 0.2s; text-align: center; }
.btn:active { transform: scale(0.96); }
.btn.sm { height: 36px; padding: 0 14px; font-size: 13.5px; border-radius: 11px; }
.btn.sm .i { width: 16px; height: 16px; }
.btn.big { width: 100%; height: 56px; font-size: 16.5px; border-radius: 18px; margin-top: 16px; }
.btn.primary { background: var(--sunset); color: #23091a; border: 0; box-shadow: 0 8px 24px rgba(255, 61, 139, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.btn.primary .i { stroke-width: 2.3; }
.btn.ghost { background: transparent; }
.btn.danger { background: var(--bad); color: #2a0509; border: 0; }
.btn.round { width: 56px; height: 56px; padding: 0; border-radius: 50%; flex: none; }

/* ---------- Mapa ---------- */
#map { position: absolute; inset: 0; background: #130a22; }
.maplibregl-map { font: inherit; }
.maplibregl-ctrl-top-left { top: calc(var(--safe-t) + 56px); left: 4px; }
.maplibregl-ctrl-attrib.maplibregl-compact { background: rgba(18, 11, 30, 0.75) !important; color: var(--ink2); }
.maplibregl-ctrl-attrib a { color: var(--ink2) !important; }
.maplibregl-ctrl-attrib-button { filter: invert(1); }
body.walking .maplibregl-ctrl-top-left { top: calc(var(--safe-t) + 96px); }
.map-top { position: absolute; top: calc(var(--safe-t) + 12px); left: 12px; right: 12px; display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; z-index: 500; pointer-events: none; }
.map-top > * { pointer-events: auto; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 11px; background: rgba(18, 11, 30, 0.8); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--line2); font-size: 12.5px; color: var(--ink2); }
.chip .i { width: 16px; height: 16px; color: var(--pink); }
.chip b { font-size: 15px; color: var(--ink); }
.chip.gold .i, .chip.gold b { color: var(--gold); }
.map-btns { display: flex; flex-direction: column; gap: 8px; }
body.walking .map-top { display: none; }

/* El jugador */
.me { width: 44px; height: 44px; pointer-events: none; }
.me-pulse { position: absolute; inset: 0; border-radius: 50%; background: rgba(255, 61, 139, 0.35); animation: pulse 2s ease-out infinite; }
@keyframes pulse { from { transform: scale(0.35); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }
.me-arrow { position: absolute; inset: 8px; display: grid; place-items: center; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px var(--pink), 0 0 20px rgba(255, 61, 139, 0.9); transition: transform 0.4s var(--ease); }
.me-arrow svg { width: 17px; height: 17px; fill: var(--pink); }

/* Punts d'interès */
.poi { width: 30px; height: 30px; cursor: pointer; }
.poi span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; transform: rotate(45deg); background: rgba(18, 11, 30, 0.9); border: 1.5px solid currentColor; box-shadow: 0 0 12px currentColor; }
.poi span .i { width: 16px; height: 16px; transform: rotate(-45deg); }
.poi-park { color: var(--ok); }
.poi-view { color: var(--gold); }
.poi-water { color: var(--teal); }
.poi-water span { width: 20px; height: 20px; margin: 5px; border-radius: 7px; box-shadow: none; }
.poi-water span .i { width: 11px; height: 11px; }
.poi-monument { color: #c2a6ff; }
.poi-beach { color: var(--orange); }
.poi.got span { opacity: 0.45; box-shadow: none; }

/* Punts de control */
.cp { width: 36px; height: 36px; pointer-events: none; }
.cp i { position: absolute; inset: 4px; border-radius: 50%; border: 3px solid var(--gold); background: rgba(255, 210, 61, 0.18); box-shadow: 0 0 16px rgba(255, 210, 61, 0.8); }
.cp b { position: absolute; inset: 9px; display: grid; place-items: center; border-radius: 50%; background: rgba(20, 12, 0, 0.85); font-family: Anton, sans-serif; font-weight: 400; font-size: 12px; color: var(--gold); }
.cp b .i { width: 11px; height: 11px; stroke-width: 2.6; }
.cp.next i { animation: cp 1.2s ease-in-out infinite; }
@keyframes cp { 50% { transform: scale(1.25); box-shadow: 0 0 30px rgba(255, 210, 61, 1); } }
.cp.done i { border-color: var(--ok); background: rgba(75, 227, 154, 0.25); box-shadow: none; }
.cp.done b { color: var(--ok); }
.start-flag { width: 30px; height: 30px; display: grid !important; place-items: center; border-radius: 50%; background: var(--gold); color: #2a1a00; box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.5); }
.start-flag .i { width: 16px; height: 16px; stroke-width: 2.4; }

/* Panell inferior del mapa */
#panel {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 600;
  background: rgba(20, 12, 34, 0.94); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--line2); border-radius: 26px 26px 0 0;
  padding: 6px 16px calc(var(--tabs-h) + var(--safe-b) + 24px);
  max-height: 78%; overflow-y: auto; scrollbar-width: none;
  transition: transform 0.45s var(--ease);
  box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.45);
}
#panel::-webkit-scrollbar { display: none; }
#panel[data-state="peek"] { transform: translateY(calc(100% - 210px - var(--tabs-h) - var(--safe-b))); }
#panel[data-state="peek"]:has(.sel) { transform: none; }
#panel[data-state="open"] { transform: none; }
body.walking #panel { display: none; }
.grab-btn { display: block; width: 100%; padding: 6px 0 10px; }
.grab-btn i, .grab i { display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--line2); margin: 0 auto; }
.panel-h { display: flex; justify-content: space-between; align-items: center; margin: 2px 0 10px; }
.panel-h h3 { font-size: 18px; }
.plist { display: grid; gap: 8px; margin-bottom: 14px; }
.pitem { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); width: 100%; }
.pitem:active { transform: scale(0.985); }
.pthumb { width: 64px; height: 48px; border-radius: 11px; background: #150d24; display: grid; place-items: center; flex: none; overflow: hidden; }
.pthumb svg:not(.i) { width: 100%; height: 100%; }
.pthumb .i { color: var(--pink); width: 24px; height: 24px; }
.pitem.free .pthumb { background: rgba(255, 61, 139, 0.12); }
.poi-thumb { background: rgba(255, 255, 255, 0.04); }
.poi-thumb .i { color: currentColor; }
.pbody { flex: 1; min-width: 0; }
.pbody b { display: block; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pbody span { font-size: 12.5px; color: var(--ink2); }
.pxp { font-size: 12px; font-weight: 800; color: var(--gold); padding-right: 6px; white-space: nowrap; }
.pxp .i { width: 18px; height: 18px; color: var(--ok); }
.pgo { color: var(--ink3); padding-right: 4px; }
.sel { padding-bottom: 4px; }
.sel-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.sel-h h3 { font-size: 22px; margin-top: 2px; }
.sel-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 16px 0 4px; }
.sel-stats div { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 6px; text-align: center; }
.sel-stats b { display: block; font-size: 22px; line-height: 1.1; }
.sel-stats span { font-size: 11px; color: var(--ink3); }

/* ---------- HUD de passejada ---------- */
#walk-hud { position: absolute; inset: 0; z-index: 700; pointer-events: none; }
#walk-hud > * { pointer-events: auto; }
.obj {
  position: absolute; top: calc(var(--safe-t) + 14px); left: 14px; right: 70px;
  background: rgba(0, 0, 0, 0.72); border-left: 4px solid var(--pink); border-radius: 4px 14px 14px 4px;
  padding: 12px 14px; font-size: 15px; font-weight: 600; line-height: 1.35;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: slidein 0.5s var(--ease) both;
}
.obj .i { width: 16px; height: 16px; vertical-align: -3px; }
.hl-y { color: var(--gold); }
.hl-p { color: var(--pink); }
.hl-g { color: var(--ok); }
@keyframes slidein { from { transform: translateX(-30px); opacity: 0; } }
.hud-side { position: absolute; top: calc(var(--safe-t) + 14px); right: 12px; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.hud-mini { display: flex; align-items: center; gap: 4px; height: 34px; padding: 0 10px; border-radius: 11px; background: rgba(0, 0, 0, 0.7); font-size: 16px; }
.hud-mini .i { width: 15px; height: 15px; color: var(--pink); }
.hud-btn { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: rgba(0, 0, 0, 0.7); border: 1px solid var(--line2); }
.hud-panel {
  position: absolute; left: 10px; right: 10px; bottom: calc(10px + var(--safe-b));
  background: rgba(14, 8, 24, 0.9); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--line2); border-radius: 26px; padding: 14px 16px 14px;
  box-shadow: 0 -10px 50px rgba(0, 0, 0, 0.5);
  animation: up 0.5s var(--ease) both;
}
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.hud-time { font-size: 50px; line-height: 1; text-align: center; letter-spacing: 0.02em; }
#walk-hud.paused .hud-time { animation: blink 1.2s steps(2) infinite; color: var(--gold); }
@keyframes blink { 50% { opacity: 0.35; } }
.hud-grid { display: grid; grid-template-columns: repeat(4, 1fr); margin: 10px 0 12px; }
.hud-grid div { text-align: center; }
.hud-grid div + div { border-left: 1px solid var(--line); }
.hud-grid b { display: block; font-size: 23px; line-height: 1.1; }
.hud-grid span { font-size: 11px; color: var(--ink3); }
.hud-goal span { display: block; font-size: 11.5px; color: var(--ink3); text-align: center; margin-top: 6px; }
.hud-ctrl { display: flex; gap: 10px; margin-top: 12px; }
.hold { flex: 1; height: 56px; border-radius: 18px; position: relative; overflow: hidden; background: var(--card2); border: 1px solid var(--line2); font-weight: 700; touch-action: none; user-select: none; -webkit-user-select: none; }
.hold-label { position: relative; display: inline-flex; align-items: center; gap: 8px; }
.hold-label .i { width: 18px; height: 18px; fill: currentColor; }
.hold-fill { position: absolute; inset: 0; background: var(--sunset); transform-origin: left; transform: scaleX(0); transition: transform 0.2s; }
.hold.holding .hold-fill { transform: scaleX(1); transition: transform 1.1s linear; }
.hold.holding { color: #23091a; }
.float-rew { position: absolute; top: 42%; z-index: 800; font-family: Anton, sans-serif; font-size: 22px; color: var(--gold); text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8); pointer-events: none; animation: floatup 1.3s var(--ease) forwards; transform: translateX(-50%); }
@keyframes floatup { from { opacity: 0; transform: translate(-50%, 10px) scale(0.8); } 20% { opacity: 1; transform: translate(-50%, 0) scale(1.1); } to { opacity: 0; transform: translate(-50%, -60px) scale(1); } }

/* ---------- Rètol central ---------- */
.banner { position: fixed; left: 0; right: 0; top: 34%; z-index: 2000; text-align: center; pointer-events: none; opacity: 0; transition: opacity 0.35s; }
.banner b { display: block; font-family: Anton, sans-serif; font-weight: 400; font-size: 40px; line-height: 1; text-transform: uppercase; letter-spacing: 0.02em; background: var(--sunset); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.8)) drop-shadow(0 0 22px rgba(255, 61, 139, 0.5)); transform: scale(1.4); transition: transform 0.5s var(--spring); }
.banner span { display: inline-block; margin-top: 8px; padding: 6px 14px; border-radius: 8px; background: rgba(0, 0, 0, 0.75); font-weight: 700; font-size: 14px; }
.banner.on { opacity: 1; }
.banner.on b { transform: none; }

/* ---------- Avisos ---------- */
#notifs { position: fixed; top: calc(var(--safe-t) + 12px); left: 12px; right: 12px; max-width: 420px; z-index: 3000; display: grid; gap: 8px; pointer-events: none; }
.notif { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px; background: rgba(10, 6, 18, 0.92); border: 1px solid var(--line2); border-left: 4px solid var(--gold); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); transform: translateX(-110%); transition: transform 0.45s var(--ease); }
.notif.on { transform: none; }
.n-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none; background: rgba(255, 210, 61, 0.14); color: var(--gold); }
.notif b { display: block; font-size: 14.5px; }
.notif span { font-size: 12.5px; color: var(--ink2); }
#toasts { position: fixed; left: 0; right: 0; bottom: calc(var(--tabs-h) + var(--safe-b) + 28px); z-index: 3000; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { padding: 11px 16px; border-radius: 14px; background: #fff; color: #140a20; font-weight: 650; font-size: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); opacity: 0; transform: translateY(10px) scale(0.96); transition: 0.3s var(--ease); max-width: 90%; text-align: center; }
.toast.warn { background: var(--warn); }
.toast.on { opacity: 1; transform: none; }

/* ---------- Missió superada ---------- */
.passed { position: fixed; inset: 0; z-index: 4000; display: grid; place-items: center; overflow-y: auto; opacity: 0; transition: opacity 0.4s; }
.passed.on { opacity: 1; }
.passed-bg { position: fixed; inset: 0; background: radial-gradient(80% 50% at 50% 20%, rgba(255, 61, 139, 0.35), transparent 70%), rgba(8, 4, 14, 0.94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.passed-in { position: relative; width: 100%; max-width: 440px; padding: calc(var(--safe-t) + 30px) 20px calc(var(--safe-b) + 24px); }
.passed-title { text-align: center; font-family: Anton, sans-serif; text-transform: uppercase; line-height: 0.92; }
.passed-title span { display: block; font-size: 30px; color: #fff; letter-spacing: 0.08em; opacity: 0; animation: drop 0.6s var(--spring) 0.1s forwards; }
.passed-title .grad-text { color: transparent; font-size: 64px; letter-spacing: 0.01em; filter: drop-shadow(0 4px 0 rgba(0, 0, 0, 0.6)); animation-delay: 0.25s; }
@keyframes drop { from { opacity: 0; transform: scale(1.8); } to { opacity: 1; transform: none; } }
.passed-map { height: 150px; margin: 18px 0 14px; border-radius: 18px; background: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px) 0 0 / 20px 20px, linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px) 0 0 / 20px 20px, rgba(255, 255, 255, 0.03); border: 1px solid var(--line); }
.passed-map svg { width: 100%; height: 100%; }
.passed-map path:last-of-type { stroke-dasharray: 2000; stroke-dashoffset: 2000; animation: draw 1.6s var(--ease) 0.4s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.passed-stats { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; margin-bottom: 14px; }
.passed-stats b { display: block; font-size: 24px; }
.passed-stats span { font-size: 11px; color: var(--ink3); }
.passed-lines { display: grid; gap: 2px; }
.pl { display: grid; grid-template-columns: 1fr auto 70px; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 10px; background: rgba(255, 255, 255, 0.04); font-size: 14px; opacity: 0; animation: plin 0.4s var(--ease) var(--d) forwards; }
@keyframes plin { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
.pl span { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl .i { width: 16px; height: 16px; color: var(--ok); }
.pl b { text-align: right; font-size: 13px; }
.pl.mission { background: rgba(75, 227, 154, 0.08); }
.pl.pl-badge { background: rgba(255, 210, 61, 0.08); }
.pl.pl-badge .i { color: var(--gold); }
.passed-total { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.passed-total > div { padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, 0.05); text-align: center; }
.passed-total b { display: block; font-size: 30px; line-height: 1.1; margin-top: 2px; }
.passed-lvl .lvl-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink2); margin-bottom: 8px; }
.passed-lvl .lvl-row b { color: var(--gold); }
.levelup { margin-top: 16px; text-align: center; padding: 16px; border-radius: 18px; background: linear-gradient(135deg, rgba(255, 210, 61, 0.2), rgba(255, 61, 139, 0.2)); border: 1px solid rgba(255, 210, 61, 0.5); opacity: 0; transform: scale(0.8); transition: 0.5s var(--spring); }
.levelup.on { opacity: 1; transform: none; }
.levelup span { font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); }
.levelup b { display: block; font-size: 56px; line-height: 1; margin: 4px 0; }
.levelup em { font-style: normal; font-weight: 700; }

/* ---------- Fulls inferiors ---------- */
#overlay { position: fixed; inset: 0; z-index: 3500; pointer-events: none; }
.sheet-wrap { position: absolute; inset: 0; pointer-events: auto; }
.sheet-bg { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.55); opacity: 0; transition: opacity 0.3s; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-width: 520px; margin: 0 auto; max-height: 88vh; overflow-y: auto; background: var(--bg2); border: 1px solid var(--line2); border-bottom: 0; border-radius: 28px 28px 0 0; padding: 0 20px calc(var(--safe-b) + 22px); transform: translateY(100%); transition: transform 0.4s var(--ease); scrollbar-width: none; }
.sheet::-webkit-scrollbar { display: none; }
.sheet.tall { height: 88vh; }
.sheet-wrap.open .sheet-bg { opacity: 1; }
.sheet-wrap.open .sheet { transform: none; }
.grab { padding: 10px 0 14px; touch-action: none; cursor: grab; position: sticky; top: 0; background: var(--bg2); z-index: 1; }
.sheet h2 { font-size: 23px; margin-bottom: 6px; }
.sheet .muted { font-size: 14px; }
.center-sheet { text-align: center; padding-top: 6px; }
.center-sheet .row { margin-top: 20px; }
.poi-sheet { text-align: center; }
.poi-big, .badge-big { width: 76px; height: 76px; margin: 4px auto 14px; border-radius: 24px; display: grid; place-items: center; background: rgba(255, 61, 139, 0.12); color: var(--pink); }
.poi-big .i, .badge-big .i { width: 38px; height: 38px; }
.poi-big.poi-park { background: rgba(75, 227, 154, 0.12); }
.poi-big.poi-view { background: rgba(255, 210, 61, 0.12); }
.poi-big.poi-water { background: rgba(34, 228, 214, 0.12); }
.badge-big { background: rgba(255, 255, 255, 0.05); color: var(--ink3); }
.badge-big.got { background: var(--sunset); color: #2a0f1c; box-shadow: 0 10px 40px rgba(255, 61, 139, 0.45); }
.badge-big.danger { background: rgba(255, 95, 109, 0.15); color: var(--bad); }
.walk-map { height: 190px; margin: 14px 0 4px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); }
.walk-map svg { width: 100%; height: 100%; }

/* Controls de formulari */
.stepper { display: flex; align-items: center; gap: 10px; margin: 14px 0; }
.st-b { width: 54px; height: 54px; border-radius: 16px; background: var(--card2); border: 1px solid var(--line2); display: grid; place-items: center; flex: none; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.st-b:active { transform: scale(0.92); background: var(--pink); color: #23091a; }
.st-v { flex: 1; display: flex; align-items: baseline; justify-content: center; gap: 6px; height: 64px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); min-width: 0; }
.st-v input { width: 100%; min-width: 0; background: none; border: 0; outline: 0; text-align: right; font-family: Anton, sans-serif; font-size: 38px; line-height: 64px; height: 64px; padding: 0; flex: 1; }
.st-v span { flex: 1; font-size: 14px; color: var(--ink3); font-weight: 600; }
.seg { display: flex; padding: 4px; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 15px; margin: 14px 0; }
.seg button { flex: 1; height: 42px; border-radius: 11px; font-weight: 700; color: var(--ink2); text-align: center; transition: 0.2s; }
.seg button.on { background: var(--card2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line2), 0 4px 12px rgba(0, 0, 0, 0.3); }
.fl { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink3); text-transform: uppercase; letter-spacing: 0.07em; margin-top: 12px; }
.fl input { display: block; width: 100%; margin-top: 8px; height: 52px; padding: 0 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line2); outline: 0; font-size: 17px; text-transform: none; letter-spacing: 0; color: var(--ink); font-weight: 600; }
.fl input:focus, .ob-input:focus { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(255, 61, 139, 0.2); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid2 .stepper { gap: 6px; }
.grid2 .st-b { width: 40px; height: 52px; border-radius: 13px; }
.grid2 .st-v { height: 52px; flex-direction: column; align-items: center; justify-content: center; gap: 0; }
.grid2 .st-v input { font-size: 24px; text-align: center; line-height: 30px; height: 30px; flex: none; }
.grid2 .st-v span { flex: none; font-size: 11px; }
.goal-hint { text-align: center; font-size: 13.5px; color: var(--ink2); }

/* ---------- Progrés ---------- */
.w-head { display: flex; justify-content: space-between; align-items: flex-start; }
.w-big { display: flex; align-items: baseline; gap: 6px; }
.w-big b { font-size: 46px; line-height: 1.05; }
.w-big span { color: var(--ink3); font-weight: 600; }
.w-delta { font-size: 13px; color: var(--ink2); }
.w-delta.good { color: var(--ok); }
.w-delta.bad { color: var(--warn); }
.chart { position: relative; margin: 14px -6px 4px; }
.chart svg { display: block; overflow: visible; touch-action: pan-y; }
.chart .grid { stroke: rgba(255, 255, 255, 0.06); }
.chart .base { stroke: rgba(255, 255, 255, 0.14); }
.chart .ax { fill: var(--ink3); font-size: 10.5px; font-family: Inter, sans-serif; }
.chart .ax.now { fill: var(--ink); font-weight: 700; }
.chart .goal-line { stroke: var(--ok); stroke-dasharray: 4 4; stroke-width: 1.3; opacity: 0.8; }
.chart .goal-t { fill: var(--ok); font-weight: 600; }
.chart .halo { paint-order: stroke; stroke: var(--card); stroke-width: 4px; }
.legend { display: flex; gap: 16px; justify-content: center; font-size: 11.5px; color: var(--ink3); margin-top: 4px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; }
.lg-hit { background: linear-gradient(#ffc43d, #ff3d8b); }
.lg-miss { background: rgba(255, 255, 255, 0.2); }
.chart .cross-l { stroke: rgba(255, 255, 255, 0.35); stroke-width: 1; }
.chart .tip { position: absolute; transform: translateX(-50%); padding: 6px 10px; border-radius: 10px; background: #fff; color: #140a20; font-size: 12px; pointer-events: none; white-space: nowrap; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4); text-align: center; }
.chart .tip b { display: block; font-size: 13.5px; }
.chart .tip span { color: #5a4c6b; }
.chart-empty { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); width: 70%; text-align: center; font-size: 13px; color: var(--ink2); background: var(--card2); padding: 10px 14px; border-radius: 12px; }
.goalbar { margin-top: 10px; }
.gb-row { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink3); margin-bottom: 6px; }
.gb-row b { color: var(--ok); }
.goalbar .bar i { background: linear-gradient(90deg, var(--pink), var(--ok)); }
.proj { display: flex; gap: 14px; align-items: flex-start; background: linear-gradient(135deg, rgba(75, 227, 154, 0.1), var(--card) 60%); border-color: rgba(75, 227, 154, 0.25); }
.proj-ic { width: 42px; height: 42px; border-radius: 13px; background: rgba(75, 227, 154, 0.15); color: var(--ok); display: grid; place-items: center; flex: none; }
.proj b { display: block; font-size: 17px; margin: 2px 0 4px; }
.proj p { font-size: 13.5px; color: var(--ink2); }
.en-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.en-grid div { padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, 0.04); }
.en-grid b { display: block; font-size: 30px; line-height: 1.1; }
.en-grid b.hl { color: var(--gold); }
.en-grid span { font-size: 12px; color: var(--ink3); }
.bmi-val { font-size: 40px; line-height: 1; margin-bottom: 12px; }
.bmi-scale { position: relative; height: 10px; border-radius: 99px; background: linear-gradient(90deg, #22e4d6 0 10.4%, #4be39a 10.4% 37.5%, #ffd23d 37.5% 58.3%, #ff9a3c 58.3% 79.2%, #ff3d8b 79.2%); }
.bmi-scale i { position: absolute; top: -5px; width: 20px; height: 20px; margin-left: -10px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px var(--card), 0 2px 10px rgba(0, 0, 0, 0.5); transition: left 1s var(--ease); }
.bmi-labels { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--ink3); margin: 8px 0 10px; }
.bmi-labels span:nth-child(2) { margin-left: -12px; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 6px; text-align: center; }
.tile b { display: block; font-size: 22px; line-height: 1.1; }
.tile span { font-size: 11px; color: var(--ink3); }
.history { display: grid; gap: 8px; }
.hitem { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); width: 100%; }
.hitem:active { transform: scale(0.985); }
.hthumb { width: 72px; height: 54px; border-radius: 12px; background: #150d24; flex: none; overflow: hidden; }
.hthumb svg { width: 100%; height: 100%; }
.hbody { flex: 1; min-width: 0; }
.hbody b { display: block; font-size: 14.5px; }
.hbody span { font-size: 12.5px; color: var(--ink3); }
.hval { text-align: right; padding-right: 6px; }
.hval b { display: block; font-size: 22px; line-height: 1; }
.hval span { font-size: 11px; color: var(--ink3); }
.empty { text-align: center; padding: 26px 16px; border: 1px dashed var(--line2); border-radius: 20px; color: var(--ink2); }
.empty .i { width: 36px; height: 36px; color: var(--pink); }
.empty p { margin: 8px 0 14px; font-size: 14px; }

/* ---------- Perfil ---------- */
.me-card { display: flex; gap: 16px; align-items: center; }
.avatar { width: 72px; height: 72px; border-radius: 50%; padding: 3px; background: var(--sunset); flex: none; }
.avatar span { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; background: var(--card); font-family: Anton, sans-serif; font-size: 32px; }
.me-info { flex: 1; min-width: 0; }
.me-title { display: block; font-size: 19px; margin: 2px 0 10px; }
.me-info .small { display: block; margin-top: 6px; }
.statc { text-align: center; padding: 16px 10px; }
.statc b { display: block; font-size: 34px; line-height: 1.1; }
.statc span:last-child { font-size: 12px; color: var(--ink3); }
.statc .flame .i { color: var(--orange); }
.ice .i { width: 28px; height: 28px; color: #8fd8ff; }
.badges { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.badge { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; text-align: center; color: var(--ink3); line-height: 1.2; }
.b-ic { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; background: var(--card); border: 1px solid var(--line); color: rgba(255, 255, 255, 0.25); transition: transform 0.2s var(--spring); }
.badge:active .b-ic { transform: scale(0.9); }
.b-ic .i { width: 26px; height: 26px; }
.badge.got { color: var(--ink); }
.badge.got .b-ic { background: var(--sunset); border: 0; color: #2a0f1c; box-shadow: 0 6px 20px rgba(255, 61, 139, 0.3); }
.shop-h { font-size: 12.5px; font-weight: 700; color: var(--ink3); text-transform: uppercase; letter-spacing: 0.07em; margin: 14px 0 8px; }
.shop { display: flex; gap: 10px; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 4px; scrollbar-width: none; }
.shop::-webkit-scrollbar { display: none; }
.shop-item { flex: 0 0 104px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); text-align: center; }
.shop-item:active { transform: scale(0.95); }
.shop-item b { font-size: 12.5px; }
.shop-item > span:last-child { font-size: 12px; font-weight: 800; color: var(--gold); }
.shop-item.own > span:last-child { color: var(--ink2); font-weight: 600; }
.shop-item.on { border-color: var(--pink); box-shadow: inset 0 0 0 1px var(--pink); }
.shop-item.on > span:last-child { color: var(--pink); }
.swatch { width: 54px; height: 10px; border-radius: 5px; margin: 10px 0 8px; box-shadow: 0 0 12px currentColor; }
.swatch.mk { width: 38px; height: 38px; margin: 0; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: 0 0 0 3px var(--pink); color: var(--pink); }
.swatch.mk .i { width: 18px; height: 18px; fill: var(--pink); }
.freeze-buy { display: flex; align-items: center; gap: 14px; text-align: left; }
.freeze-buy p { font-size: 12.5px; color: var(--ink2); }
.freeze-buy > div { flex: 1; }
.price { font-weight: 800; color: var(--gold); }
.price.off { opacity: 0.4; }
.list { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.list.compact { margin: 12px 0; }
.li { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; font-size: 14.5px; }
.li + .li { border-top: 1px solid var(--line); }
.li > .i:first-child { color: var(--ink2); width: 20px; height: 20px; }
.li span { flex: 1; }
.li b { font-weight: 600; color: var(--ink2); font-size: 13.5px; }
.li > .i:last-child:not(:first-child) { width: 16px; height: 16px; color: var(--ink3); }
.li.danger, .li.danger .i { color: var(--bad) !important; }
.sw { width: 46px; height: 28px; border-radius: 99px; background: rgba(255, 255, 255, 0.14); position: relative; transition: 0.25s; flex: none; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: 0.25s var(--spring); }
.sw.on { background: var(--pink); }
.sw.on::after { transform: translateX(18px); }
.credits { margin-top: 14px; line-height: 1.5; }

/* ---------- Onboarding ---------- */
#onboard { position: fixed; inset: 0; max-width: 520px; margin: 0 auto; overflow-y: auto; padding: calc(var(--safe-t) + 20px) 22px calc(var(--safe-b) + 24px); display: flex; flex-direction: column; }
.ob-step { flex: 1; display: flex; flex-direction: column; animation: obin 0.5s var(--ease) both; }
@keyframes obin { from { opacity: 0; transform: translateX(24px); } }
.ob-step > .btn.big { margin-top: auto; }
.ob-hero { text-align: center; padding-top: 6vh; }
.logo-sun { width: 170px; height: 170px; margin: 0 auto -38px; border-radius: 50%; background: linear-gradient(180deg, #ffd23d 0%, #ff9a3c 45%, #ff3d8b 100%); position: relative; overflow: hidden; box-shadow: 0 0 80px rgba(255, 61, 139, 0.55); animation: sun 6s ease-in-out infinite; }
@keyframes sun { 50% { box-shadow: 0 0 120px rgba(255, 122, 82, 0.7); } }
.logo-sun i { position: absolute; left: 0; right: 0; height: 6px; background: var(--bg); }
.logo-sun i:nth-child(1) { top: 52%; height: 4px; }
.logo-sun i:nth-child(2) { top: 62%; height: 6px; }
.logo-sun i:nth-child(3) { top: 72%; height: 8px; }
.logo-sun i:nth-child(4) { top: 82%; height: 10px; }
.logo-sun i:nth-child(5) { top: 93%; height: 14px; }
.logo { position: relative; font-family: Anton, sans-serif; font-size: 82px; line-height: 1; text-transform: uppercase; letter-spacing: 0.02em; }
.logo span { color: #fff; text-shadow: 0 4px 0 var(--pink), 0 8px 0 rgba(139, 92, 255, 0.8), 0 0 40px rgba(255, 61, 139, 0.6); font-style: italic; }
.ob-tag { margin: 26px auto 0; max-width: 300px; color: var(--ink2); font-size: 16px; }
.ob-feats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 30px 0 20px; }
.ob-feats div { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); font-size: 13px; font-weight: 600; }
.ob-feats .i { color: var(--pink); }
.ob-q { padding-top: 8vh; }
.ob-q h2 { font-size: 32px; margin: 8px 0 8px; }
.ob-q .muted { margin-bottom: 8px; }
.ob-input { width: 100%; height: 64px; margin-top: 18px; padding: 0 20px; border-radius: 20px; background: var(--card); border: 1px solid var(--line2); outline: 0; font-size: 22px; font-weight: 700; }
.shake { animation: shake 0.4s; border-color: var(--bad) !important; }
@keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.ob-note { margin-top: 10px; padding: 14px; border-radius: 16px; background: rgba(139, 92, 255, 0.1); border: 1px solid rgba(139, 92, 255, 0.25); font-size: 13.5px; color: var(--ink2); }
.ob-note b { color: var(--ink); }
.choices { display: grid; gap: 10px; margin-top: 14px; }
.choices button { display: flex; justify-content: space-between; align-items: center; padding: 18px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); transition: 0.2s; }
.choices button span { color: var(--ink3); font-size: 13.5px; }
.choices button.on { border-color: var(--pink); background: rgba(255, 61, 139, 0.1); box-shadow: inset 0 0 0 1px var(--pink); }
.perm-list { display: grid; gap: 10px; margin-top: 16px; }
.perm-item { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); }
.perm-item > .i { color: var(--teal); width: 26px; height: 26px; }
.perm-item div { flex: 1; }
.perm-item b { display: block; }
.perm-item span { font-size: 13px; color: var(--ink2); }
.perm-item .st { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line2); flex: none; }
.perm-item.ok { border-color: rgba(75, 227, 154, 0.5); }
.perm-item.ok .st { background: var(--ok); border-color: var(--ok); }
.perm-item.ko .st { background: var(--bad); border-color: var(--bad); }
.ob-q.done { text-align: center; }
.ob-check { width: 84px; height: 84px; margin: 0 auto 18px; border-radius: 50%; background: var(--sunset); display: grid; place-items: center; color: #2a0f1c; box-shadow: 0 10px 50px rgba(255, 61, 139, 0.5); animation: drop 0.6s var(--spring); }
.ob-check .i { width: 42px; height: 42px; stroke-width: 2.6; }
.ob-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 22px 0; }
.ob-sum div { padding: 14px 6px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.ob-sum b { display: block; font-size: 26px; line-height: 1.1; }
.ob-sum span { font-size: 11.5px; color: var(--ink3); }
.ob-back { position: absolute; top: calc(var(--safe-t) + 16px); left: 14px; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; }
.ob-dots { display: flex; justify-content: center; gap: 6px; margin-top: 16px; }
.ob-dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--line2); transition: 0.3s var(--ease); }
.ob-dots i.on { width: 22px; background: var(--pink); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .me-pulse { display: none; }
}
body.walking #notifs { top: calc(var(--safe-t) + 112px); }

/* ---------- Repte setmanal i duel ---------- */
.weekly { margin-top: 14px; background: linear-gradient(150deg, rgba(255, 210, 61, 0.1), var(--card) 55%); border-color: rgba(255, 210, 61, 0.22); }
.weekly.done { border-color: rgba(75, 227, 154, 0.4); }
.wk-top { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.wk-ic { width: 42px; height: 42px; border-radius: 13px; flex: none; display: grid; place-items: center; background: rgba(255, 210, 61, 0.15); color: var(--gold); }
.weekly.done .wk-ic { background: var(--ok); color: #0b2a1b; }
.wk-t { flex: 1; min-width: 0; }
.wk-t b { display: block; font-size: 15px; line-height: 1.3; margin-top: 2px; }
.weekly .rew { font-size: 12px; text-align: right; line-height: 1.35; }
.weekly .m-meta { margin-top: 7px; }
.duel { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.duel-h { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.duel-h span { display: inline-flex; align-items: center; gap: 6px; color: var(--ink2); }
.duel-h .i { width: 16px; height: 16px; color: var(--pink); }
.duel-h .win { color: var(--ok); }
.duel-h .lose { color: var(--warn); }
.duel-row { display: grid; grid-template-columns: 92px 1fr 64px; gap: 10px; align-items: center; font-size: 12px; color: var(--ink3); margin-bottom: 6px; }
.duel-row b { text-align: right; font-size: 16px; color: var(--ink); }
.duel-bar { height: 10px; border-radius: 99px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.duel-bar i { display: block; height: 100%; border-radius: inherit; transition: width 1s var(--ease); }
.me-b { background: var(--sunset); }
.ghost-b { background: rgba(255, 255, 255, 0.28); }
.duel .small { margin-top: 6px; }
.install { display: flex; gap: 14px; align-items: flex-start; border-color: rgba(139, 92, 255, 0.35); background: linear-gradient(135deg, rgba(139, 92, 255, 0.14), var(--card) 60%); }
.install img { border-radius: 12px; flex: none; }
.install p { font-size: 13px; color: var(--ink2); margin-top: 2px; }
.install .row { margin-top: 10px; justify-content: flex-start; }
.install .row > * { flex: none; }

/* ---------- Calendari ---------- */
.cal-h, .cal-g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-h span { text-align: center; font-size: 11px; color: var(--ink3); font-weight: 600; margin-bottom: 4px; }
.cal-d { aspect-ratio: 1; border-radius: 10px; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: rgba(255, 255, 255, 0.55); background: rgba(255, 255, 255, 0.05); transition: transform 0.15s var(--ease); }
.cal-d:active { transform: scale(0.9); }
.cal-d.l1 { background: rgba(255, 61, 139, 0.18); }
.cal-d.l2 { background: rgba(255, 61, 139, 0.42); color: #fff; }
.cal-d.l3 { background: #ff3d8b; color: #2a0716; }
.cal-d.l4 { background: linear-gradient(135deg, #ff3d8b, #ffc43d); color: #2a0716; box-shadow: 0 0 12px rgba(255, 122, 82, 0.45); }
.cal-d.fut { opacity: 0.3; }
.cal-d.frz { box-shadow: inset 0 0 0 2px #8fd8ff; }
.cal-d.now { outline: 2px solid #fff; outline-offset: 2px; }
.cal-d.sel { transform: scale(1.12); outline: 2px solid var(--gold); outline-offset: 1px; }
.cal-info { text-align: center; font-size: 13px; color: var(--ink2); margin: 12px 0 8px; min-height: 19px; }
.legend .cal-d { width: 12px; height: 12px; border-radius: 3px; aspect-ratio: auto; }
.passed-btns { margin-top: 16px; }
.passed-btns .btn { height: 56px; border-radius: 18px; font-size: 16px; }
.passed-btns .btn.primary { flex: 1.6; }
