:root {
  --bg: #030605;
  --bg2: #07100c;
  --surface: rgba(14, 26, 20, 0.66);
  --surface-solid: #0b1511;
  --surface-2: rgba(22, 40, 31, 0.55);
  --line: rgba(130, 255, 190, 0.08);
  --line-2: rgba(130, 255, 190, 0.16);
  --g: #2bff88;
  --g-2: #00d26a;
  --g-3: #0a7a43;
  --lime: #c6ff3d;
  --glow: 0 0 24px rgba(43, 255, 136, 0.35);
  --text: #ecfff4;
  --muted: #8aa898;
  --dim: #50695c;
  --danger: #ff5d73;
  --gold: #ffd54a;
  --silver: #cfd9d4;
  --bronze: #e39a5f;
  --r-lg: 24px;
  --r: 18px;
  --r-sm: 12px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --font-d: 'Sora', system-ui, sans-serif;
  --font: 'Inter', system-ui, sans-serif;
  --top-h: 64px;
  --tab-h: 76px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 var(--font);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
h1, h2, h3, h4 { font-family: var(--font-d); margin: 0; letter-spacing: -0.02em; }
img { display: block; max-width: 100%; }
::selection { background: rgba(43, 255, 136, .3); }
::-webkit-scrollbar { width: 0; height: 0; }

/* ---------- Ambiente ---------- */
.ambient { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }
.ambient span { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(90px); opacity: .22; animation: drift 22s ease-in-out infinite alternate; }
.ambient span:nth-child(1) { background: #00d26a; top: -25vmax; left: -15vmax; }
.ambient span:nth-child(2) { background: #c6ff3d; bottom: -30vmax; right: -20vmax; opacity: .1; animation-duration: 28s; }
.ambient span:nth-child(3) { background: #0f5d3a; top: 30%; left: 40%; opacity: .25; animation-duration: 34s; }
@keyframes drift { to { transform: translate(8vmax, 6vmax) scale(1.15); } }

/* ---------- App shell ---------- */
#app {
  position: relative; margin: 0 auto; width: 100%; max-width: 480px; height: 100dvh;
  background: linear-gradient(180deg, rgba(5, 12, 9, .92), rgba(3, 6, 5, .96));
  overflow: hidden; isolation: isolate;
}
@media (min-width: 620px) {
  body { display: grid; place-items: center; }
  #app {
    height: min(920px, calc(100dvh - 40px)); border-radius: 40px;
    border: 1px solid var(--line-2);
    box-shadow: 0 40px 120px rgba(0, 0, 0, .7), 0 0 0 10px #0a0f0d, 0 0 0 11px var(--line-2), 0 0 80px rgba(43, 255, 136, .08);
  }
}

.view {
  position: absolute; inset: 0; padding: calc(var(--top-h) + var(--safe-t) + 4px) 16px calc(var(--tab-h) + var(--safe-b) + 24px);
  overflow-y: auto; overflow-x: hidden; scroll-behavior: smooth; overscroll-behavior: contain;
}
.view.enter { animation: viewIn .5s var(--ease) both; }
.view.leave { animation: viewOut .18s ease-in both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(14px) scale(.99); filter: blur(4px); } }
@keyframes viewOut { to { opacity: 0; transform: translateY(-6px); filter: blur(3px); } }

.view.domain { padding: 0; overflow: hidden; }

/* ---------- Topbar ---------- */
.topbar {
  position: absolute; z-index: 20; top: 0; left: 0; right: 0; height: calc(var(--top-h) + var(--safe-t));
  padding: var(--safe-t) 16px 0; display: flex; align-items: center; gap: 12px;
  background: linear-gradient(180deg, rgba(3, 6, 5, .95) 30%, rgba(3, 6, 5, .0));
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  mask-image: linear-gradient(180deg, #000 75%, transparent);
}
.topbar.clear { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; mask-image: none; }
.topbar .who { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; cursor: pointer; }
.topbar .who .hello { font-size: 11px; color: var(--muted); }
.topbar .who .name { font: 700 17px/1.1 var(--font-d); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .actions { display: flex; gap: 8px; }
.icon-btn {
  position: relative; width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--line-2); color: var(--text);
  transition: transform .2s var(--spring), background .2s, border-color .2s, box-shadow .2s;
}
.icon-btn:hover { border-color: rgba(43, 255, 136, .4); box-shadow: var(--glow); }
.icon-btn:active { transform: scale(.9); }
.icon-btn .dot { position: absolute; top: 8px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--g); box-shadow: 0 0 0 3px var(--bg), 0 0 10px var(--g); }
.icon-btn .count {
  position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px;
  background: var(--g); color: #02140a; font: 700 11px/19px var(--font); text-align: center; box-shadow: 0 0 0 3px var(--bg);
  animation: pop .4s var(--spring);
}
.icon-btn.store { background: linear-gradient(135deg, rgba(198, 255, 61, .18), rgba(43, 255, 136, .08)); border-color: rgba(198, 255, 61, .35); color: var(--lime); }
@keyframes pop { from { transform: scale(0); } }

/* ---------- Tabbar ---------- */
.tabbar {
  position: absolute; z-index: 20; left: 12px; right: 12px; bottom: calc(10px + var(--safe-b)); height: 66px;
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  background: rgba(8, 16, 12, .78); border: 1px solid var(--line-2); border-radius: 24px;
  backdrop-filter: blur(20px) saturate(140%); -webkit-backdrop-filter: blur(20px) saturate(140%);
  box-shadow: 0 20px 40px rgba(0, 0, 0, .5);
}
.tab {
  position: relative; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  color: var(--dim); font-size: 10.5px; font-weight: 600; transition: color .25s;
}
.tab svg { width: 22px; height: 22px; transition: transform .35s var(--spring); }
.tab.active { color: var(--g); }
.tab.active svg { transform: translateY(-2px) scale(1.08); filter: drop-shadow(0 0 8px rgba(43, 255, 136, .6)); }
.tab.active::after { content: ''; position: absolute; bottom: 6px; width: 18px; height: 3px; border-radius: 3px; background: var(--g); box-shadow: var(--glow); animation: pop .35s var(--spring); }
.tab.orb { color: #02140a; }
.tab.orb .orb-in {
  width: 54px; height: 54px; margin-top: -26px; border-radius: 20px; display: grid; place-items: center;
  background: conic-gradient(from 180deg, var(--g), var(--lime), var(--g-2), var(--g));
  box-shadow: 0 10px 30px rgba(43, 255, 136, .45), inset 0 0 0 2px rgba(255, 255, 255, .25);
  animation: orbSpin 6s linear infinite; position: relative;
}
.tab.orb .orb-in svg { width: 26px; height: 26px; animation: orbSpin 6s linear infinite reverse; stroke-width: 2.2; }
.tab.orb span { color: var(--muted); }
.tab.orb.active span { color: var(--g); }
.tab.orb.active::after { display: none; }
@keyframes orbSpin { to { transform: rotate(360deg); } }

/* ---------- FAB ---------- */
.fab {
  position: absolute; z-index: 19; right: 18px; bottom: calc(var(--tab-h) + 18px + var(--safe-b));
  width: 58px; height: 58px; border-radius: 20px; display: grid; place-items: center; color: #02140a;
  background: linear-gradient(135deg, var(--lime), var(--g));
  box-shadow: 0 14px 34px rgba(43, 255, 136, .45); transition: transform .3s var(--spring), opacity .3s;
}
.fab svg { width: 28px; height: 28px; stroke-width: 2.6; }
.fab:hover { transform: translateY(-2px) rotate(90deg); }
.fab:active { transform: scale(.9); }
.fab::before { content: ''; position: absolute; inset: -6px; border-radius: 24px; border: 2px solid rgba(43, 255, 136, .45); animation: ping 2.4s ease-out infinite; }
.fab.hidden { opacity: 0; pointer-events: none; transform: scale(.6); }
@keyframes ping { 0% { transform: scale(.9); opacity: 1; } 80%, 100% { transform: scale(1.35); opacity: 0; } }

/* ---------- Avatares ---------- */
.av {
  --s: 40px; width: var(--s); height: var(--s); flex: none; border-radius: 50%; position: relative;
  display: grid; place-items: center; font-size: calc(var(--s) * .5); line-height: 1;
  background: radial-gradient(circle at 30% 25%, #1f3b2d, #0a1510); border: 1.5px solid var(--line-2); overflow: hidden;
}
.av img { width: 100%; height: 100%; object-fit: cover; }
.av.ring { border: 0; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--g); }
.av.king { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--gold), 0 0 18px rgba(255, 213, 74, .5); }
.av-wrap { position: relative; flex: none; }
.av-wrap .crown { position: absolute; top: -12px; left: 50%; transform: translateX(-50%) rotate(-8deg); font-size: 15px; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .6)); animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateX(-50%) translateY(-3px) rotate(6deg); } }

/* ---------- Componentes base ---------- */
.card {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03);
}
.card + .card, .card + .section, .section + .card, .section + .section { margin-top: 14px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card-head h3 { font-size: 16px; display: flex; align-items: center; gap: 8px; }
.card-head h3 svg { color: var(--g); width: 18px; height: 18px; }
.card-head .meta { font-size: 12px; color: var(--muted); }
.section-title { font: 700 18px var(--font-d); margin: 22px 2px 12px; display: flex; align-items: center; justify-content: space-between; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.green { color: var(--g); }
.lime { color: var(--lime); }
.row { display: flex; align-items: center; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.num { font-family: var(--font-d); font-variant-numeric: tabular-nums; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 18px; border-radius: 14px;
  font-weight: 700; font-size: 14px; transition: transform .2s var(--spring), box-shadow .25s, background .2s, opacity .2s; user-select: none;
}
.btn:active { transform: scale(.96); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn.primary { background: linear-gradient(135deg, var(--lime), var(--g)); color: #02140a; box-shadow: 0 10px 26px rgba(43, 255, 136, .3); }
.btn.primary:hover { box-shadow: 0 12px 34px rgba(43, 255, 136, .5); }
.btn.ghost { background: var(--surface-2); border: 1px solid var(--line-2); }
.btn.ghost:hover { border-color: rgba(43, 255, 136, .4); }
.btn.danger { background: rgba(255, 93, 115, .12); color: var(--danger); border: 1px solid rgba(255, 93, 115, .3); }
.btn.sm { height: 34px; padding: 0 12px; font-size: 12.5px; border-radius: 11px; }
.btn.block { width: 100%; }
.btn svg { width: 18px; height: 18px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 999px; white-space: nowrap;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); font-size: 12.5px; font-weight: 600;
  transition: all .25s var(--ease);
}
.chip.active { background: rgba(43, 255, 136, .14); color: var(--g); border-color: rgba(43, 255, 136, .45); box-shadow: inset 0 0 12px rgba(43, 255, 136, .12); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px; margin: 0 -16px; padding: 2px 16px; scroll-snap-type: x proximity; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; background: rgba(43, 255, 136, .12); color: var(--g); border: 1px solid rgba(43, 255, 136, .25); }
.badge.gold { background: rgba(255, 213, 74, .12); color: var(--gold); border-color: rgba(255, 213, 74, .3); }
.badge.lime { background: rgba(198, 255, 61, .12); color: var(--lime); border-color: rgba(198, 255, 61, .3); }
.badge.mute { background: var(--surface-2); color: var(--muted); border-color: var(--line); }

/* Segmentado com indicador deslizante */
.seg { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; border-radius: 16px; background: rgba(0, 0, 0, .35); border: 1px solid var(--line); }
.seg button { position: relative; z-index: 1; height: 38px; border-radius: 12px; font-weight: 700; font-size: 13px; color: var(--muted); transition: color .25s; }
.seg button.active { color: var(--text); }
.seg .pill { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 4px; border-radius: 12px; background: linear-gradient(135deg, rgba(43, 255, 136, .22), rgba(198, 255, 61, .12)); border: 1px solid rgba(43, 255, 136, .35); transition: transform .4s var(--spring), width .4s var(--ease); }

/* Abas de topo (Feed) */
.tabs-top { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin: 0 -16px 16px; padding: 0 16px; position: sticky; top: -4px; z-index: 5; }
.tabs-top button { position: relative; padding: 12px 0; font: 700 15px var(--font-d); color: var(--dim); transition: color .25s; }
.tabs-top button.active { color: var(--text); }
.tabs-top button.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--g), var(--lime)); box-shadow: var(--glow); animation: grow .4s var(--ease); }
@keyframes grow { from { transform: scaleX(0); } }

/* Barra de progresso */
.bar { position: relative; height: 8px; border-radius: 8px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.bar > i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--g-2), var(--g), var(--lime)); box-shadow: 0 0 12px rgba(43, 255, 136, .5); transition: width 1.4s var(--ease); }
.bar > i::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent); transform: translateX(-100%); animation: shine 2.6s ease-in-out infinite 1.2s; }
.bar.thin { height: 5px; }
.bar.warn > i { background: linear-gradient(90deg, #ff9a3c, var(--danger)); box-shadow: 0 0 12px rgba(255, 93, 115, .45); }
@keyframes shine { 60%, 100% { transform: translateX(100%); } }

/* Entradas escalonadas */
.stagger > * { animation: rise .6s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms + 60ms); }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

/* ---------- Feed ---------- */
.thrones { display: flex; gap: 14px; overflow-x: auto; margin: 0 -16px 4px; padding: 14px 16px 10px; }
.throne { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 66px; flex: none; text-align: center; }
.throne .av { --s: 58px; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--gold); }
.throne.mine .av { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--g), 0 0 20px rgba(43, 255, 136, .5); }
.throne .city { font-size: 10.5px; color: var(--muted); font-weight: 600; max-width: 66px; }
.throne:active { transform: scale(.95); }

.post { padding: 16px; }
.post-head { display: flex; align-items: center; gap: 12px; }
.post-head .name { font-weight: 700; font-size: 14.5px; }
.post-head .sub { font-size: 12px; color: var(--muted); display: flex; gap: 4px; align-items: center; }
.post-head .sub svg { width: 12px; height: 12px; }
.post h4 { font-size: 17px; margin: 14px 0 12px; }
.route {
  position: relative; height: 170px; border-radius: 18px; overflow: hidden; border: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 120%, rgba(43, 255, 136, .14), transparent 60%),
    linear-gradient(rgba(130, 255, 190, .05) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(90deg, rgba(130, 255, 190, .05) 1px, transparent 1px) 0 0 / 22px 22px,
    #050c09;
}
.route svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.route .trail { stroke: url(#trailGrad); stroke-width: 3.5; fill: none; filter: drop-shadow(0 0 6px rgba(43, 255, 136, .7)); stroke-dasharray: var(--len); stroke-dashoffset: var(--len); }
.route.drawn .trail { animation: draw 2.2s var(--ease) forwards; }
.route .trail-bg { stroke: rgba(43, 255, 136, .12); stroke-width: 10; fill: none; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.route .tag { position: absolute; left: 10px; bottom: 10px; display: flex; gap: 6px; align-items: center; padding: 5px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; background: rgba(0, 0, 0, .6); border: 1px solid var(--line-2); backdrop-filter: blur(6px); }
.route .tag svg { width: 12px; height: 12px; color: var(--g); position: static; }
.route .kmtag { position: absolute; right: 10px; top: 10px; font: 800 22px var(--font-d); color: var(--g); text-shadow: 0 0 16px rgba(43, 255, 136, .6); }
.stats5 { display: grid; grid-template-columns: repeat(5, 1fr); margin-top: 12px; padding: 12px 4px; border-radius: 16px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); }
.stats5 > div { text-align: center; border-left: 1px solid var(--line); min-width: 0; }
.stats5 > div:first-child { border-left: 0; }
.stats5 b { display: block; font: 700 14px var(--font-d); white-space: nowrap; }
.stats5 small { font-size: 9.5px; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.actions-row { display: flex; justify-content: space-between; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.act { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 12px; color: var(--muted); font-size: 12.5px; font-weight: 600; transition: color .2s, background .2s, transform .25s var(--spring); }
.act:hover { background: var(--surface-2); color: var(--text); }
.act:active { transform: scale(.9); }
.act svg { width: 18px; height: 18px; }
.act.on { color: var(--g); }
.act.on.heart { color: #ff6b8a; }
.act.on svg { fill: currentColor; animation: heartPop .45s var(--spring); }
@keyframes heartPop { 40% { transform: scale(1.45); } }
.burst { position: fixed; z-index: 100; pointer-events: none; font-size: 18px; animation: burst .9s ease-out forwards; }
@keyframes burst { to { transform: translate(var(--dx), var(--dy)) scale(.4) rotate(var(--rot)); opacity: 0; } }

.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .big { font-size: 44px; margin-bottom: 8px; }

/* Desafios */
.challenge { padding: 0; overflow: hidden; }
.challenge .cover { position: relative; height: 130px; padding: 16px; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; }
.challenge .cover::before { content: ''; position: absolute; inset: 0; background: var(--art); }
.challenge .cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 20%, rgba(5, 12, 9, .95)); }
.challenge .cover > * { position: relative; z-index: 1; }
.challenge .cover .emoji { position: absolute; z-index: 1; right: 12px; top: 6px; font-size: 64px; opacity: .9; filter: drop-shadow(0 8px 20px rgba(0, 0, 0, .5)); animation: float 5s ease-in-out infinite; }
.challenge .cover h3 { font-size: 20px; }
.challenge .cover .when { font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.challenge .cover .when svg { width: 13px; height: 13px; }
.challenge .body { padding: 16px; }
.challenge .lead { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: rgba(0, 0, 0, .25); font-size: 13px; }
.challenge .lead + .lead { margin-top: 6px; }
.challenge .lead .pos { width: 18px; color: var(--dim); font-weight: 700; }
@keyframes float { 50% { transform: translateY(-8px) rotate(-4deg); } }

/* Meta pessoal */
.goal-hero { display: flex; align-items: center; gap: 16px; padding: 22px; overflow: hidden; }
.goal-hero::before { content: ''; position: absolute; width: 220px; height: 220px; right: -60px; top: -60px; border-radius: 50%; background: radial-gradient(circle, rgba(43, 255, 136, .18), transparent 70%); }
.goal-hero .label { font-size: 11px; font-weight: 800; letter-spacing: .14em; color: var(--g); display: flex; gap: 6px; align-items: center; }
.goal-hero .big { font: 800 40px/1 var(--font-d); margin: 8px 0 14px; }
.goal-hero .big small { font-size: 18px; color: var(--muted); font-weight: 600; }
.ring-wrap { position: relative; width: 116px; height: 116px; flex: none; }
.ring-wrap svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-wrap .track { stroke: rgba(255, 255, 255, .07); }
.ring-wrap .prog { stroke: url(#ringGrad); stroke-linecap: round; transition: stroke-dashoffset 1.8s var(--ease); filter: drop-shadow(0 0 8px rgba(43, 255, 136, .6)); }
.ring-wrap .center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; font: 800 24px var(--font-d); }
.ring-wrap .center small { display: block; font: 600 10px var(--font); color: var(--muted); }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal .dow { text-align: center; font-size: 11px; font-weight: 700; color: var(--dim); padding-bottom: 4px; }
.cal .day { position: relative; aspect-ratio: 1; border-radius: 12px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); padding: 5px 6px; font-size: 11px; font-weight: 700; color: var(--muted); display: flex; flex-direction: column; justify-content: space-between; transition: transform .25s var(--spring); }
.cal .day:hover { transform: scale(1.08); z-index: 1; }
.cal .day.run { background: linear-gradient(135deg, rgba(43, 255, 136, .22), rgba(0, 210, 106, .08)); border-color: rgba(43, 255, 136, .4); color: var(--text); }
.cal .day.hit { background: linear-gradient(135deg, var(--g), var(--lime)); color: #02140a; border-color: transparent; box-shadow: 0 0 16px rgba(43, 255, 136, .45); }
.cal .day.today { outline: 2px solid var(--g); outline-offset: 1px; }
.cal .day.future { opacity: .45; }
.cal .day small { font-size: 9.5px; font-weight: 700; align-self: flex-end; }
.legend { display: flex; justify-content: center; gap: 16px; margin-top: 14px; font-size: 11px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* ---------- Rankings ---------- */
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 8px; padding: 30px 6px 0; margin-top: 12px; border-radius: var(--r-lg); background: radial-gradient(ellipse at 50% 100%, rgba(43, 255, 136, .16), transparent 70%); }
.pod { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; cursor: pointer; }
.pod .av { --s: 58px; }
.pod.p1 .av { --s: 76px; }
.pod .nm { font-weight: 700; font-size: 13px; max-width: 100%; }
.pod .val { font: 800 13px var(--font-d); }
.pod .medal { position: absolute; bottom: -6px; right: -4px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font: 800 12px var(--font-d); color: #1a1200; box-shadow: 0 0 0 3px var(--bg); }
.pod .block { width: 100%; border-radius: 16px 16px 0 0; display: grid; place-items: start center; padding-top: 10px; font: 800 28px var(--font-d); color: rgba(255, 255, 255, .25); transform-origin: bottom; animation: riseBlock 1s var(--spring) both; }
.pod.p1 .block { height: 120px; background: linear-gradient(180deg, rgba(255, 213, 74, .55), rgba(255, 213, 74, .05)); border-top: 2px solid var(--gold); animation-delay: .25s; }
.pod.p2 .block { height: 86px; background: linear-gradient(180deg, rgba(207, 217, 212, .35), rgba(207, 217, 212, .03)); border-top: 2px solid var(--silver); animation-delay: .1s; }
.pod.p3 .block { height: 64px; background: linear-gradient(180deg, rgba(227, 154, 95, .35), rgba(227, 154, 95, .03)); border-top: 2px solid var(--bronze); animation-delay: .4s; }
.pod.p1 .head { animation: bob2 3s ease-in-out infinite; }
@keyframes bob2 { 50% { transform: translateY(-5px); } }
@keyframes riseBlock { from { transform: scaleY(0); } }
.rank-list { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.rank-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); cursor: pointer; transition: transform .25s var(--spring), border-color .2s; }
.rank-row:hover { border-color: var(--line-2); transform: translateX(3px); }
.rank-row .pos { width: 22px; font: 800 14px var(--font-d); color: var(--dim); text-align: center; }
.rank-row .nm { font-weight: 700; }
.rank-row .sub { font-size: 11.5px; color: var(--muted); }
.rank-row .val { font: 800 15px var(--font-d); }
.rank-row.me { border-color: rgba(43, 255, 136, .5); background: linear-gradient(90deg, rgba(43, 255, 136, .14), var(--surface)); }
.selects { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }

/* ---------- Formulários ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12px; color: var(--muted); font-weight: 600; }
.input, select.input, textarea.input {
  width: 100%; height: 48px; padding: 0 14px; border-radius: 14px; outline: none;
  background: rgba(0, 0, 0, .35); border: 1px solid var(--line-2); color: var(--text); transition: border-color .2s, box-shadow .2s;
}
textarea.input { height: auto; min-height: 90px; padding: 12px 14px; resize: vertical; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--g) 50%), linear-gradient(135deg, var(--g) 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
select.input option { background: #0b1511; }
.input:focus { border-color: var(--g); box-shadow: 0 0 0 4px rgba(43, 255, 136, .12); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.hint { font-size: 12px; color: var(--muted); }

/* ---------- Sheets ---------- */
.sheet-backdrop { position: absolute; inset: 0; z-index: 40; background: rgba(0, 0, 0, .55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fadeIn .3s ease both; }
.sheet {
  position: absolute; z-index: 41; left: 0; right: 0; bottom: 0; max-height: calc(100% - 40px);
  display: flex; flex-direction: column; border-radius: 30px 30px 0 0;
  background: linear-gradient(180deg, #0d1a14, #060d0a); border: 1px solid var(--line-2); border-bottom: 0;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, .6); animation: sheetIn .5s var(--ease) both;
}
.sheet.full { height: calc(100% - 26px); }
.sheet.closing { animation: sheetOut .3s ease-in both; }
.sheet-backdrop.closing { animation: fadeOut .3s ease both; }
.sheet .grab { width: 44px; height: 5px; border-radius: 5px; background: rgba(255, 255, 255, .16); margin: 10px auto 0; flex: none; }
.sheet-head { display: flex; align-items: center; gap: 12px; padding: 12px 18px 12px; flex: none; }
.sheet-head h2 { font-size: 20px; flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.sheet-body { flex: 1; overflow-y: auto; padding: 4px 18px calc(22px + var(--safe-b)); overscroll-behavior: contain; }
@keyframes sheetIn { from { transform: translateY(100%); } }
@keyframes sheetOut { to { transform: translateY(100%); } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }

/* ---------- Toasts ---------- */
#toasts { position: absolute; z-index: 90; top: calc(var(--top-h) + var(--safe-t) + 6px); left: 16px; right: 16px; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: rgba(10, 22, 16, .92); border: 1px solid rgba(43, 255, 136, .35); box-shadow: 0 16px 40px rgba(0, 0, 0, .5), var(--glow); backdrop-filter: blur(14px); animation: toastIn .5s var(--spring) both; pointer-events: auto; font-weight: 600; }
.toast.err { border-color: rgba(255, 93, 115, .5); box-shadow: 0 16px 40px rgba(0, 0, 0, .5); }
.toast .ic { font-size: 22px; }
.toast.out { animation: toastOut .35s ease-in both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-20px) scale(.95); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-14px) scale(.97); } }

.xp-float { position: absolute; z-index: 95; left: 50%; top: 42%; transform: translate(-50%, -50%); pointer-events: none; text-align: center; animation: xpFloat 2.2s var(--ease) forwards; }
.xp-float b { display: block; font: 800 54px var(--font-d); background: linear-gradient(135deg, var(--lime), var(--g)); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 24px rgba(43, 255, 136, .6)); }
.xp-float span { font-weight: 700; color: var(--muted); }
@keyframes xpFloat { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.6); } 20% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); } 30% { transform: translate(-50%, -50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -90%); } }
#confetti { position: absolute; inset: 0; z-index: 94; pointer-events: none; }

/* ---------- Evolução ---------- */
.level-hero { overflow: hidden; padding: 20px; }
.level-hero::before { content: ''; position: absolute; inset: -40%; background: conic-gradient(from 0deg, transparent, rgba(43, 255, 136, .14), transparent 30%); animation: orbSpin 8s linear infinite; }
.level-hero > * { position: relative; }
.lvl-badge { width: 62px; height: 62px; flex: none; border-radius: 20px; display: grid; place-items: center; font: 800 26px var(--font-d); color: #02140a; background: linear-gradient(135deg, var(--lime), var(--g)); box-shadow: 0 10px 30px rgba(43, 255, 136, .4), inset 0 -4px 0 rgba(0, 0, 0, .15); transform: rotate(-6deg); }
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat { padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.stat b { display: block; font: 800 24px var(--font-d); }
.stat b small { font-size: 13px; color: var(--muted); font-weight: 600; }
.stat > span:not(.ic) { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.stat .ic { float: right; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: rgba(43, 255, 136, .1); color: var(--g); }
.stat .ic svg { width: 17px; height: 17px; }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart .barr { fill: url(#barGrad); transform-origin: bottom; transform-box: fill-box; animation: riseBlock .9s var(--spring) both; }
.chart .barr.cur { fill: url(#barGradHi); filter: drop-shadow(0 0 6px rgba(198, 255, 61, .6)); }
.chart text { fill: var(--dim); font: 600 10px var(--font); }
.chart .vlabel { fill: var(--muted); font-weight: 700; }
.chart .line { stroke: var(--g); stroke-width: 2.5; fill: none; filter: drop-shadow(0 0 5px rgba(43, 255, 136, .7)); stroke-dasharray: 1200; stroke-dashoffset: 1200; animation: draw 2s var(--ease) .2s forwards; }
.chart .area { fill: url(#areaGrad); opacity: 0; animation: fadeInTo 1s ease 1s forwards; }
.chart .pt { fill: var(--bg); stroke: var(--lime); stroke-width: 2; }
@keyframes fadeInTo { to { opacity: 1; } }
.mission { padding: 14px; border-radius: 16px; background: rgba(0, 0, 0, .25); border: 1px solid var(--line); }
.mission + .mission { margin-top: 10px; }
.mission .chk { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--dim); display: grid; place-items: center; flex: none; }
.mission.done .chk { background: var(--g); border-color: var(--g); color: #02140a; box-shadow: var(--glow); }
.mission.done .chk svg { width: 13px; height: 13px; stroke-width: 3.5; }
.mission.claimed { opacity: .6; }
.achv-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 8px; }
.achv { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; cursor: pointer; }
.achv .medal { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; font-size: 26px; background: rgba(255, 255, 255, .03); border: 1.5px dashed rgba(255, 255, 255, .1); filter: grayscale(1); opacity: .45; transition: transform .3s var(--spring); }
.achv.on .medal { filter: none; opacity: 1; border: 2px solid var(--g); background: radial-gradient(circle, rgba(43, 255, 136, .25), rgba(43, 255, 136, .03)); box-shadow: 0 0 20px rgba(43, 255, 136, .35); animation: medalGlow 3s ease-in-out infinite; }
.achv:hover .medal { transform: scale(1.1) rotate(-6deg); }
.achv small { font-size: 10.5px; font-weight: 700; color: var(--dim); line-height: 1.2; }
.achv.on small { color: var(--text); }
@keyframes medalGlow { 50% { box-shadow: 0 0 32px rgba(43, 255, 136, .55); } }
.records { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.records > div { padding: 12px 8px; border-radius: 16px; background: rgba(0, 0, 0, .25); border: 1px solid var(--line); text-align: center; }
.records b { display: block; font: 800 18px var(--font-d); }
.records span { font-size: 10.5px; color: var(--muted); font-weight: 600; }
.records i { font-style: normal; font-size: 18px; }

/* ---------- Perfil ---------- */
.profile-cover { position: relative; margin: calc(-1 * (var(--top-h) + var(--safe-t) + 4px)) -16px 0; height: 190px; overflow: hidden; }
.profile-cover::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 20% 30%, rgba(198, 255, 61, .35), transparent 45%), radial-gradient(circle at 80% 60%, rgba(43, 255, 136, .35), transparent 50%), linear-gradient(160deg, #0b2b1c, #030605); }
.profile-cover svg.topo { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .35; stroke: var(--g); stroke-width: 1; }
.profile-cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, var(--bg)); }
.profile-head { position: relative; margin-top: -58px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.profile-head .av { --s: 108px; box-shadow: 0 0 0 4px var(--bg), 0 0 0 6px var(--g), 0 0 40px rgba(43, 255, 136, .45); font-size: 50px; }
.profile-head .cam { position: absolute; top: 72px; left: calc(50% + 26px); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--g); color: #02140a; box-shadow: 0 0 0 3px var(--bg); }
.profile-head .cam svg { width: 16px; height: 16px; }
.profile-head h1 { font-size: 24px; margin-top: 12px; }
.profile-head .loc { color: var(--muted); font-size: 13px; display: flex; gap: 4px; align-items: center; justify-content: center; }
.profile-head .loc svg { width: 14px; height: 14px; color: var(--g); }
.profile-head .bio { margin: 10px 10px 0; font-size: 13.5px; color: #c4dccf; }
.follow { display: flex; justify-content: center; gap: 26px; margin: 14px 0 6px; }
.follow div { text-align: center; }
.follow b { display: block; font: 800 18px var(--font-d); }
.follow span { font-size: 11.5px; color: var(--muted); }
.heat { display: grid; grid-template-columns: 26px repeat(12, 1fr); gap: 4px; }
.heat .lbl { font-size: 9.5px; color: var(--dim); font-weight: 700; display: flex; align-items: center; }
.heat .c { aspect-ratio: 1; border-radius: 4px; background: rgba(255, 255, 255, .04); animation: fadeInTo .5s ease both; opacity: 0; animation-delay: calc(var(--i) * 6ms); }
.heat .c.l1 { background: rgba(43, 255, 136, .25); }
.heat .c.l2 { background: rgba(43, 255, 136, .5); }
.heat .c.l3 { background: var(--g); box-shadow: 0 0 8px rgba(43, 255, 136, .6); }
.heat .c.l4 { background: var(--lime); box-shadow: 0 0 10px rgba(198, 255, 61, .7); }
.shoe { display: flex; gap: 12px; align-items: center; }
.shoe + .shoe { margin-top: 14px; }
.shoe .ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: rgba(43, 255, 136, .1); color: var(--g); border: 1px solid rgba(43, 255, 136, .2); flex: none; }
.hist { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: rgba(0, 0, 0, .25); border: 1px solid var(--line); cursor: pointer; transition: transform .2s var(--spring), border-color .2s; }
.hist + .hist { margin-top: 8px; }
.hist:hover { border-color: var(--line-2); transform: translateX(3px); }
.hist .km { font: 800 17px var(--font-d); color: var(--g); }
.hist .t { font-weight: 700; }
.hist .s { font-size: 11.5px; color: var(--muted); }

/* ---------- Domínio (holograma 3D) ---------- */
.holo-stage { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 60%, #06180f, #020403 70%); }
.holo-stage canvas { display: block; width: 100% !important; height: 100% !important; touch-action: none; }
.holo-stage::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(43, 255, 136, .035) 0 1px, transparent 1px 3px); mix-blend-mode: screen; }
.holo-loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--g); font: 700 13px var(--font-d); letter-spacing: .2em; text-transform: uppercase; }
.holo-loading span { animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .3; } }
.holo-ui { position: absolute; inset: 0; pointer-events: none; padding: calc(var(--top-h) + var(--safe-t)) 16px calc(var(--tab-h) + var(--safe-b) + 20px); display: flex; flex-direction: column; justify-content: space-between; }
.holo-ui > * { pointer-events: auto; }
.holo-title { text-align: center; }
.holo-title .kicker { font: 700 10.5px var(--font); letter-spacing: .3em; color: var(--g); text-transform: uppercase; text-shadow: 0 0 10px rgba(43, 255, 136, .6); }
.holo-title h1 { font-size: 26px; text-shadow: 0 0 30px rgba(43, 255, 136, .45); margin-top: 2px; }
.city-pick { margin: 8px auto 0; display: inline-flex; gap: 6px; align-items: center; height: 34px; padding: 0 12px; border-radius: 999px; background: rgba(0, 0, 0, .5); border: 1px solid var(--line-2); font-size: 12.5px; font-weight: 600; backdrop-filter: blur(10px); }
.city-pick svg { width: 14px; height: 14px; color: var(--g); }
.city-pick select { background: none; border: 0; outline: 0; color: var(--text); font-weight: 700; appearance: none; padding-right: 4px; cursor: pointer; }
.city-pick select option { background: #0b1511; }
.holo-panel { background: rgba(4, 14, 9, .72); border: 1px solid rgba(43, 255, 136, .28); border-radius: 22px; padding: 14px; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 0 40px rgba(43, 255, 136, .1), inset 0 0 30px rgba(43, 255, 136, .05); position: relative; overflow: hidden; animation: rise .7s var(--ease) .3s both; }
.holo-panel::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--g), transparent); animation: scan 3s linear infinite; }
@keyframes scan { 0% { transform: translateY(0); opacity: 0; } 10% { opacity: 1; } 100% { transform: translateY(160px); opacity: 0; } }
.holo-panel .king-row { display: flex; gap: 12px; align-items: center; }
.holo-panel .king-row .av { --s: 50px; }
.holo-panel .lbl { font-size: 10px; letter-spacing: .2em; color: var(--gold); font-weight: 800; text-transform: uppercase; }
.holo-panel .nm { font: 800 17px var(--font-d); }
.holo-panel .xp { font: 800 18px var(--font-d); color: var(--g); text-align: right; }
.holo-panel .xp small { display: block; font: 600 10px var(--font); color: var(--muted); }
.holo-panel .me-row { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line-2); }
.holo-panel .challengers { display: flex; gap: 6px; margin-top: 10px; }
.holo-panel .challengers .ch { flex: 1; display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 12px; background: rgba(0, 0, 0, .35); min-width: 0; font-size: 11px; }
.holo-panel .challengers .ch .av { --s: 24px; font-size: 12px; }
.holo-hint { align-self: center; margin: 0 auto 8px; width: fit-content; max-width: 100%; text-align: center; font-size: 11px; color: var(--muted); padding: 5px 12px; border-radius: 999px; background: rgba(0, 0, 0, .55); border: 1px solid var(--line); backdrop-filter: blur(8px); }

/* Tomada de trono */
.takeover { position: absolute; inset: 0; z-index: 99; display: grid; place-items: center; background: radial-gradient(circle, rgba(10, 40, 25, .92), rgba(0, 0, 0, .96)); animation: fadeIn .4s both; overflow: hidden; text-align: center; padding: 30px; }
.takeover.out { animation: fadeOut .5s both; }
.takeover .rays { position: absolute; width: 900px; height: 900px; left: 50%; top: 42%; margin: -450px 0 0 -450px; background: repeating-conic-gradient(from 0deg, rgba(255, 213, 74, .14) 0 6deg, transparent 6deg 18deg); animation: orbSpin 18s linear infinite; mask-image: radial-gradient(circle, #000 10%, transparent 60%); }
.takeover .inner { position: relative; }
.takeover .crown-big { font-size: 64px; animation: crownDrop 1s var(--spring) .3s both; display: block; }
.takeover .av { --s: 140px; font-size: 64px; margin: 0 auto; box-shadow: 0 0 0 4px #000, 0 0 0 8px var(--gold), 0 0 80px rgba(255, 213, 74, .6); animation: zoomIn .9s var(--spring) both; }
.takeover h2 { font-size: 28px; margin-top: 22px; animation: rise .6s var(--ease) .6s both; }
.takeover p { color: var(--muted); margin: 8px 0 24px; animation: rise .6s var(--ease) .75s both; }
.takeover .btn { animation: rise .6s var(--ease) .9s both; }
.takeover .old { display: inline-flex; gap: 8px; align-items: center; padding: 6px 12px; border-radius: 999px; background: rgba(255, 93, 115, .1); color: var(--danger); font-size: 12px; font-weight: 700; margin-top: 10px; animation: rise .6s var(--ease) .7s both; }
@keyframes crownDrop { from { transform: translateY(-120px) rotate(-30deg); opacity: 0; } }
@keyframes zoomIn { from { transform: scale(0) rotate(-20deg); } }

/* ---------- Chat ---------- */
.chat-rooms { display: flex; gap: 8px; overflow-x: auto; padding: 0 18px 10px; flex: none; }
.chat-list { flex: 1; overflow-y: auto; padding: 8px 14px; display: flex; flex-direction: column; gap: 4px; overscroll-behavior: contain; }
.msg { display: flex; gap: 8px; align-items: flex-end; max-width: 86%; animation: msgIn .4s var(--spring) both; }
.msg .av { --s: 30px; font-size: 15px; }
.msg .bubble { padding: 9px 13px; border-radius: 18px 18px 18px 6px; background: var(--surface-2); border: 1px solid var(--line); word-wrap: break-word; overflow-wrap: anywhere; }
.msg .bubble .who { font-size: 11.5px; font-weight: 700; color: var(--g); display: flex; gap: 6px; align-items: center; }
.msg .bubble .time { font-size: 10px; color: var(--dim); margin-left: 8px; float: right; margin-top: 6px; }
.msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.msg.mine .bubble { background: linear-gradient(135deg, rgba(43, 255, 136, .26), rgba(0, 210, 106, .16)); border-color: rgba(43, 255, 136, .35); border-radius: 18px 18px 6px 18px; }
.msg.cont { margin-top: -1px; }
.msg.cont .av { visibility: hidden; }
.msg.cont .who { display: none !important; }
.day-sep { align-self: center; font-size: 11px; color: var(--dim); font-weight: 700; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .04); margin: 8px 0; }
@keyframes msgIn { from { opacity: 0; transform: translateY(10px) scale(.96); } }
.typing { height: 22px; padding: 0 20px; font-size: 11.5px; color: var(--muted); flex: none; display: flex; align-items: center; gap: 6px; }
.typing .dots i { display: inline-block; width: 5px; height: 5px; margin: 0 1px; border-radius: 50%; background: var(--g); animation: dot 1s infinite; }
.typing .dots i:nth-child(2) { animation-delay: .15s; }
.typing .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 50% { transform: translateY(-4px); opacity: .4; } }
.chat-input { display: flex; gap: 8px; padding: 10px 14px calc(14px + var(--safe-b)); border-top: 1px solid var(--line); flex: none; background: rgba(0, 0, 0, .25); }
.chat-input .input { height: 46px; border-radius: 23px; }
.chat-input .send { width: 46px; height: 46px; border-radius: 50%; flex: none; display: grid; place-items: center; background: linear-gradient(135deg, var(--lime), var(--g)); color: #02140a; transition: transform .25s var(--spring); }
.chat-input .send:active { transform: scale(.85) rotate(20deg); }
.quick-emoji { display: flex; gap: 4px; padding: 6px 14px 0; flex: none; overflow-x: auto; }
.quick-emoji button { font-size: 20px; padding: 4px 6px; border-radius: 10px; transition: transform .2s var(--spring); }
.quick-emoji button:hover { transform: scale(1.25); background: var(--surface-2); }
.online-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--g); font-weight: 700; padding: 4px 10px; border-radius: 999px; background: rgba(43, 255, 136, .1); }
.online-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--g); box-shadow: 0 0 8px var(--g); animation: blink 1.4s infinite; }

/* ---------- Loja ---------- */
.store-hero { position: relative; padding: 18px; border-radius: 22px; overflow: hidden; margin-bottom: 14px; background: linear-gradient(135deg, rgba(198, 255, 61, .2), rgba(43, 255, 136, .08) 60%, rgba(0, 0, 0, .2)); border: 1px solid rgba(198, 255, 61, .25); }
.store-hero h3 { font-size: 19px; }
.store-hero p { margin: 4px 0 0; color: var(--muted); font-size: 12.5px; max-width: 70%; }
.store-hero .deco { position: absolute; right: -6px; bottom: -14px; font-size: 76px; transform: rotate(-12deg); animation: float 5s ease-in-out infinite; }
.products { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.product { border-radius: 20px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); cursor: pointer; transition: transform .3s var(--spring), border-color .25s, box-shadow .25s; display: flex; flex-direction: column; }
.product:hover { transform: translateY(-4px); border-color: rgba(43, 255, 136, .35); box-shadow: 0 14px 30px rgba(0, 0, 0, .4), var(--glow); }
.product .img { position: relative; aspect-ratio: 1; display: grid; place-items: center; font-size: 56px; background: radial-gradient(circle at 50% 40%, rgba(43, 255, 136, .18), transparent 65%), #08110d; overflow: hidden; }
.product .img img { width: 100%; height: 100%; object-fit: cover; }
.product .img .tagx { position: absolute; top: 8px; left: 8px; }
.product .info { padding: 10px 12px 12px; }
.product .nm { font-weight: 700; font-size: 13px; line-height: 1.25; height: 2.5em; overflow: hidden; }
.product .pr { font: 800 16px var(--font-d); color: var(--g); margin-top: 6px; }
.product.add { display: grid; place-items: center; min-height: 220px; border: 2px dashed rgba(43, 255, 136, .35); background: rgba(43, 255, 136, .04); color: var(--g); font-weight: 700; text-align: center; gap: 8px; }
.product.add svg { width: 34px; height: 34px; }
.pd-img { aspect-ratio: 1.2; border-radius: 22px; overflow: hidden; display: grid; place-items: center; font-size: 110px; background: radial-gradient(circle at 50% 40%, rgba(43, 255, 136, .22), transparent 65%), #08110d; border: 1px solid var(--line); animation: zoomSoft .6s var(--ease); }
.pd-img img { width: 100%; height: 100%; object-fit: cover; }
@keyframes zoomSoft { from { transform: scale(.94); opacity: 0; } }
.uploader { position: relative; aspect-ratio: 1.6; border-radius: 18px; border: 2px dashed var(--line-2); display: grid; place-items: center; overflow: hidden; cursor: pointer; color: var(--muted); text-align: center; background: rgba(0, 0, 0, .25); transition: border-color .2s; }
.uploader:hover { border-color: var(--g); }
.uploader img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.uploader input { display: none; }

/* ---------- Registrar corrida ---------- */
.dist-pick { text-align: center; padding: 8px 0 18px; }
.dist-pick .val { font: 800 64px/1 var(--font-d); background: linear-gradient(135deg, var(--text), var(--g)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.dist-pick .val small { font-size: 22px; -webkit-text-fill-color: var(--muted); }
.dist-pick .ctrl { display: flex; align-items: center; gap: 14px; justify-content: center; margin-top: 14px; }
.dist-pick .ctrl button { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line-2); font-size: 22px; font-weight: 700; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 8px; background: linear-gradient(90deg, var(--g) var(--p, 20%), rgba(255, 255, 255, .08) var(--p, 20%)); outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: var(--lime); border: 4px solid #02140a; box-shadow: 0 0 0 2px var(--g), var(--glow); cursor: grab; }
input[type=range]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--lime); border: 4px solid #02140a; box-shadow: 0 0 0 2px var(--g); }
.live-pace { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 16px; }
.live-pace > div { text-align: center; padding: 10px; border-radius: 14px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); }
.live-pace b { display: block; font: 800 17px var(--font-d); color: var(--g); }
.live-pace span { font-size: 10.5px; color: var(--muted); font-weight: 600; }

/* ---------- Onboarding / splash ---------- */
.splash { position: absolute; inset: 0; z-index: 200; display: grid; place-content: center; justify-items: center; gap: 20px; background: var(--bg); transition: opacity .6s, visibility .6s; }
.splash p { color: var(--muted); font-size: 13px; }
#app:not(.booting) .splash { opacity: 0; visibility: hidden; }
.splash-logo { position: relative; width: 130px; height: 130px; display: grid; place-items: center; }
.splash-logo strong { font: 800 34px var(--font-d); letter-spacing: -.04em; }
.splash-logo strong small { font-size: 14px; color: var(--g); margin-left: 2px; }
.splash-logo .ring { position: absolute; inset: 0; border-radius: 50%; border: 3px solid transparent; border-top-color: var(--g); border-right-color: var(--g); animation: orbSpin 1.4s linear infinite; filter: drop-shadow(0 0 8px var(--g)); }
.splash-logo .r2 { inset: 12px; border-top-color: var(--lime); border-right-color: transparent; border-left-color: var(--lime); animation-duration: 2s; animation-direction: reverse; }
.splash-logo .r3 { inset: 24px; border-width: 2px; border-top-color: rgba(43, 255, 136, .4); animation-duration: 3s; }

.onboard { position: absolute; inset: 0; z-index: 150; overflow-y: auto; background: radial-gradient(circle at 50% 0%, rgba(43, 255, 136, .18), transparent 55%), var(--bg); padding: calc(40px + var(--safe-t)) 22px 40px; animation: fadeIn .5s both; }
.onboard .hero { text-align: center; margin-bottom: 26px; }
.onboard .hero .splash-logo { margin: 0 auto 16px; width: 110px; height: 110px; }
.onboard .hero .splash-logo .ring { animation-duration: 6s; }
.onboard h1 { font-size: 30px; line-height: 1.1; }
.onboard h1 em { font-style: normal; background: linear-gradient(135deg, var(--lime), var(--g)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.onboard .hero p { color: var(--muted); margin: 10px 0 0; }
.emoji-pick { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.emoji-pick button { aspect-ratio: 1; border-radius: 14px; font-size: 24px; background: var(--surface-2); border: 1px solid var(--line); transition: transform .25s var(--spring), border-color .2s; }
.emoji-pick button.active { border-color: var(--g); background: rgba(43, 255, 136, .15); transform: scale(1.08); box-shadow: var(--glow); }
.avatar-edit { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.avatar-edit .av { --s: 72px; font-size: 34px; }

/* Notificações */
.notif { display: flex; gap: 12px; padding: 12px; border-radius: 16px; background: rgba(0, 0, 0, .25); border: 1px solid var(--line); align-items: center; }
.notif + .notif { margin-top: 8px; }
.notif .ic { font-size: 22px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: rgba(43, 255, 136, .08); flex: none; }
.notif .t { font-size: 13px; }
.notif .s { font-size: 11px; color: var(--dim); }

/* Perfis de outros */
.user-mini { text-align: center; }
.user-mini .av { --s: 90px; font-size: 42px; margin: 0 auto 10px; box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--g); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media (max-width: 360px) {
  .stats5 b { font-size: 12.5px; }
  .tab { font-size: 9.5px; }
}

/* Re-render silencioso (dados em tempo real): sem replay das animações de entrada */
.view.quiet .stagger > *, .view.quiet .heat .c, .view.quiet .chart .barr, .view.quiet .chart .line, .view.quiet .chart .area,
.view.quiet .pod .block, .view.quiet .cal .day, .view.quiet .tabs-top button.active::after {
  animation-duration: 0s !important; animation-delay: 0s !important;
}
.profile-head .av.king { box-shadow: 0 0 0 4px var(--bg), 0 0 0 6px var(--gold), 0 0 40px rgba(255, 213, 74, .45); }
.goal-hero { gap: 12px; padding: 20px 16px; }
.goal-hero .big { font-size: 34px; white-space: nowrap; }
.goal-hero .big small { font-size: 15px; }
.goal-hero .row { gap: 14px !important; white-space: nowrap; }
.goal-hero .ring-wrap { width: 100px; height: 100px; }
.legend { flex-wrap: wrap; gap: 8px 14px; }
.tabs-top { background: rgba(4, 9, 7, .88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
