:root {
  --bg: #10202b; --bg2: #183447; --board: #1e3b4f; --cell: #f4efe4; --cellText: #1d2a33;
  --center: radial-gradient(circle at 50% 40%, #2b5876, #1a3346); --accent: #ffca28;
  --panel: rgba(255,255,255,.07); --panelBorder: rgba(255,255,255,.12); --text: #eef3f7; --muted: #9fb3c2;
  --good: #69f0ae; --bad: #ff6e6e; --radius: 14px;
  font-family: 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: radial-gradient(1200px 800px at 20% 0%, var(--bg2), var(--bg)); color: var(--text);
  overflow: hidden; user-select: none; transition: background .5s;
}
button { font: inherit; cursor: pointer; border: 0; border-radius: 10px; color: inherit; }
button:disabled { opacity: .45; cursor: not-allowed; }
.btn { background: var(--panel); border: 1px solid var(--panelBorder); padding: 10px 16px; transition: transform .12s, background .2s; }
.btn:hover:not(:disabled) { background: rgba(255,255,255,.14); transform: translateY(-1px); }
.btn.primary { background: var(--accent); color: #1a1a1a; font-weight: 700; border-color: transparent; box-shadow: 0 4px 18px color-mix(in srgb, var(--accent) 45%, transparent); }
.btn.primary:hover:not(:disabled) { filter: brightness(1.08); background: var(--accent); }
.btn.danger { background: #c62828; border-color: transparent; }
.btn.big { font-size: 1.15rem; padding: 14px 26px; }
input, select { font: inherit; background: rgba(0,0,0,.3); color: var(--text); border: 1px solid var(--panelBorder); border-radius: 8px; padding: 8px 10px; }
select option { background: #1b2b36; }

.screen { position: fixed; inset: 0; display: none; overflow: auto; }
.screen.active { display: block; animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: scale(.99); } }
.wrap { max-width: 1050px; margin: 0 auto; padding: 32px 20px 60px; }
.topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.topbar h2 { margin: 0; flex: 1; }

/* ---------- Menu ---------- */
#menu .wrap { display: grid; place-items: center; min-height: 100%; text-align: center; }
.logo { font-size: clamp(2.4rem, 6vw, 4.4rem); font-weight: 900; letter-spacing: -1px; margin: 0;
  background: linear-gradient(90deg, var(--accent), #fff 60%, var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tagline { color: var(--muted); margin: 6px 0 26px; }
.menu-buttons { display: grid; gap: 10px; width: min(360px, 90vw); margin: 0 auto; }
.profile-card { display: flex; gap: 14px; align-items: center; background: var(--panel); border: 1px solid var(--panelBorder);
  border-radius: var(--radius); padding: 12px 16px; margin: 0 auto 22px; width: min(420px, 92vw); text-align: left; }
.profile-card .tok { width: 54px; height: 54px; }
.lvl-badge { background: var(--accent); color: #111; font-weight: 800; border-radius: 999px; padding: 2px 10px; font-size: .85rem; }
.xpbar { height: 10px; background: rgba(0,0,0,.35); border-radius: 99px; overflow: hidden; margin-top: 6px; }
.xpbar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #fff); border-radius: 99px; transition: width 1s ease; }
.small { font-size: .82rem; color: var(--muted); }
.pill { display: inline-block; padding: 2px 8px; border-radius: 99px; background: var(--panel); border: 1px solid var(--panelBorder); font-size: .78rem; }

/* ---------- Setup ---------- */
.setup-grid { display: grid; gap: 10px; }
.prow { display: grid; grid-template-columns: 34px 1fr 160px 140px; gap: 10px; align-items: center; background: var(--panel); border: 1px solid var(--panelBorder); border-radius: 12px; padding: 10px 12px; }
.prow .dot { width: 22px; height: 22px; border-radius: 50%; }
.opts { display: flex; flex-wrap: wrap; gap: 18px; margin: 22px 0; }
.opts label { display: grid; gap: 6px; }
@media (max-width: 640px) { .prow { grid-template-columns: 26px 1fr; } .prow select { grid-column: 2; } }

/* ---------- Coleção / Rota ---------- */
.tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.tabs .btn.on { background: var(--accent); color: #111; }
.grid-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.item { background: var(--panel); border: 2px solid var(--panelBorder); border-radius: var(--radius); padding: 14px; text-align: center; position: relative; transition: transform .15s; }
.item:hover { transform: translateY(-2px); }
.item.equipped { border-color: var(--accent); }
.item.locked { filter: grayscale(.9) brightness(.6); }
.item .tok { width: 90px; height: 90px; margin: 0 auto; }
.item .lock { position: absolute; top: 8px; right: 10px; font-size: .75rem; }
.item h4 { margin: 8px 0 4px; }
.board-preview { width: 100%; aspect-ratio: 1; border-radius: 10px; position: relative; overflow: hidden; border: 4px solid; }
.board-preview .bp-center { position: absolute; inset: 22%; border-radius: 6px; }
.board-preview .bp-cells { position: absolute; inset: 4%; border: 6px dashed; border-radius: 4px; }

.track { display: flex; gap: 10px; overflow-x: auto; padding: 8px 2px 18px; scroll-snap-type: x mandatory; }
.tstep { flex: 0 0 120px; scroll-snap-align: start; background: var(--panel); border: 1px solid var(--panelBorder); border-radius: 12px; padding: 10px; text-align: center; }
.tstep.done { border-color: var(--good); }
.tstep.current { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.tstep .tok { width: 56px; height: 56px; margin: 6px auto; }
.tstep .mini-board { width: 56px; height: 56px; margin: 6px auto; border-radius: 8px; border: 3px solid; }
.ach-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.ach { background: var(--panel); border: 1px solid var(--panelBorder); border-radius: 12px; padding: 10px 12px; }
.ach.got { border-color: var(--good); }
.rules { line-height: 1.6; }
.rules h3 { color: var(--accent); margin-top: 26px; }

/* ---------- Pixel art ---------- */
.px-portrait { position: relative; width: 64px; height: 64px; border-radius: 50%; overflow: hidden; flex: 0 0 auto;
  background: radial-gradient(circle at 50% 35%, rgba(255,255,255,.35), rgba(255,255,255,.06) 70%); box-shadow: 0 0 0 3px var(--ring, transparent), inset 0 -8px 16px rgba(0,0,0,.25); }
.px-portrait.square { border-radius: 14px; }
.px-portrait.nobg { background: none; box-shadow: none; overflow: visible; }
.px-sprite { position: absolute; left: 50%; bottom: -2%; height: 96%; aspect-ratio: 16 / 24; transform: translateX(-50%);
  background-size: 600% 100%; background-repeat: no-repeat; image-rendering: pixelated; image-rendering: crisp-edges;
  animation: pxIdle 2.4s infinite step-end; filter: drop-shadow(0 3px 2px rgba(0,0,0,.35)); }
.px-glow .px-sprite { filter: drop-shadow(0 0 6px #ffd700) drop-shadow(0 3px 2px rgba(0,0,0,.35)); }
@keyframes pxIdle {
  0% { background-position: 0% 0; } 12.5% { background-position: 20% 0; } 25% { background-position: 40% 0; } 37.5% { background-position: 60% 0; }
  50% { background-position: 0% 0; } 62.5% { background-position: 20% 0; } 75% { background-position: 40% 0; } 87.5% { background-position: 80% 0; } }
.px-portrait.cheer .px-sprite { animation: pxCheer .5s infinite; background-position: 100% 0; }
@keyframes pxCheer { 50% { transform: translateX(-50%) translateY(-8%); } }
.profile-card .px-portrait { width: 64px; height: 64px; }
.item .px-portrait { width: 120px; height: 120px; margin: 0 auto; }
.tstep .px-portrait { width: 64px; height: 64px; margin: 6px auto; }
.unlock .px-portrait { width: 52px; height: 52px; }

/* prévia de tabuleiro 3D em CSS */
.bp3 { position: relative; width: 100%; aspect-ratio: 1; border-radius: 12px; overflow: hidden; perspective: 400px; }
.bp3 .gnd { position: absolute; left: -20%; right: -20%; bottom: -10%; height: 55%; border-radius: 50%; }
.bp3 .brd { position: absolute; left: 50%; top: 52%; width: 62%; aspect-ratio: 1; transform: translate(-50%, -50%) rotateX(58deg) rotateZ(45deg);
  border-radius: 6px; box-shadow: 0 14px 0 var(--side), 0 26px 30px rgba(0,0,0,.35); }
.bp3 .brd::before { content: ''; position: absolute; inset: 7%; border: 9px dashed var(--tile); border-radius: 3px; }
.bp3 .brd::after { content: ''; position: absolute; inset: 26%; background: var(--center); border-radius: 3px; }
.tstep .bp3, .unlock .bp3 { width: 64px; margin: 6px auto; }
.unlock .bp3 { width: 52px; margin: 0; }

/* ---------- Jogo 3D ---------- */
#game { overflow: hidden; font-family: 'Segoe UI', system-ui, sans-serif; }
#scene3d { position: absolute; inset: 0; }
#scene3d canvas { width: 100% !important; height: 100% !important; display: block; touch-action: none; }
.hud { position: absolute; inset: 0; pointer-events: none; }
.hud > * { pointer-events: auto; }

/* barra superior */
.hud-top { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; align-items: center;
  background: rgba(8, 14, 26, .72); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.12); border-radius: 999px; padding: 5px 6px 5px 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.round-pill { font-weight: 900; letter-spacing: .5px; font-size: .85rem; color: #fff; margin-right: 6px; white-space: nowrap; }
.round-pill small { color: #9fb3c2; font-weight: 700; }
.icon-btn { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1);
  color: #fff; padding: 0; transition: background .15s, transform .15s; position: relative; }
.icon-btn:hover { background: rgba(255,255,255,.2); transform: translateY(-1px); }
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn .badge { position: absolute; bottom: -3px; right: -3px; background: var(--accent); color: #111; font-size: .62rem; font-weight: 900; border-radius: 99px; padding: 1px 4px; }

#ticker { position: absolute; top: 66px; left: 50%; transform: translateX(-50%); background: rgba(8,14,26,.6); backdrop-filter: blur(6px); color: #fff;
  padding: 7px 16px; border-radius: 99px; font-size: .88rem; font-weight: 600; max-width: min(560px, calc(100vw - 640px)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none;
  border: 1px solid rgba(255,255,255,.08); }
#ticker:empty { display: none; }
#ticker.flash { animation: tick .35s ease; }
@keyframes tick { from { transform: translateX(-50%) translateY(-6px); opacity: 0; } }

/* cartões dos jogadores */
.pcard { position: absolute; width: 290px; height: 92px; color: #fff; display: flex; align-items: center; transition: transform .25s; }
.pcard .pc-body { position: absolute; inset: 8px 0 8px 40px; background: linear-gradient(135deg, rgba(14,22,38,.88), rgba(8,14,26,.82)); backdrop-filter: blur(10px);
  border-radius: 18px; border: 2px solid rgba(255,255,255,.1); box-shadow: 0 10px 28px rgba(0,0,0,.4); overflow: hidden; }
.pcard .pc-body::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--pc); }
.pcard .px-portrait { position: relative; z-index: 2; width: 84px; height: 84px; --ring: var(--pc); background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--pc) 55%, #fff), color-mix(in srgb, var(--pc) 70%, #000)); box-shadow: 0 0 0 4px var(--pc), 0 0 0 7px rgba(8,14,26,.85), 0 8px 20px rgba(0,0,0,.45); }
.pcard .info { position: relative; z-index: 2; flex: 1; min-width: 0; padding: 0 14px 0 12px; }
.pcard .nm { font-weight: 800; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; gap: 6px; align-items: center; }
.pcard .chip { font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; padding: 2px 6px; border-radius: 6px; background: rgba(255,255,255,.12); color: #c5d3df; }
.pcard .cash { font-weight: 900; font-size: 1.45rem; color: #ffe082; display: flex; align-items: center; gap: 6px; line-height: 1.15; text-shadow: 0 2px 6px rgba(0,0,0,.4); }
.pcard .cash .coin { width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff59d, #f9a825 60%, #c77800); box-shadow: inset 0 -2px 0 rgba(0,0,0,.2); flex: 0 0 auto; }
.pcard .row2 { display: flex; gap: 10px; font-size: .74rem; color: #b8c7d3; font-weight: 600; white-space: nowrap; }
.pcard .row2 b { color: #fff; }
.pcard.c0 { left: 16px; bottom: 16px; } .pcard.c1 { left: 16px; top: 16px; }
.pcard.c2 { right: 16px; top: 16px; flex-direction: row-reverse; } .pcard.c3 { right: 16px; bottom: 16px; flex-direction: row-reverse; }
.pcard.c2 .pc-body, .pcard.c3 .pc-body { inset: 8px 40px 8px 0; }
.pcard.c2 .info, .pcard.c3 .info { text-align: right; padding: 0 12px 0 14px; }
.pcard.c2 .nm, .pcard.c3 .nm { justify-content: flex-end; } .pcard.c2 .cash, .pcard.c3 .cash { justify-content: flex-end; }
.pcard.c2 .row2, .pcard.c3 .row2 { justify-content: flex-end; }
.pcard.turn { transform: scale(1.05); }
.pcard.turn .pc-body { border-color: var(--pc); box-shadow: 0 0 0 1px var(--pc), 0 0 34px color-mix(in srgb, var(--pc) 55%, transparent), 0 10px 28px rgba(0,0,0,.4); }
.pcard .turn-tag { position: absolute; z-index: 3; top: -6px; left: 58px; background: var(--pc); color: #fff; font-size: .62rem; font-weight: 900; letter-spacing: 1px;
  padding: 3px 8px; border-radius: 99px; box-shadow: 0 3px 10px rgba(0,0,0,.35); animation: pulseTag 1.2s infinite; display: none; }
.pcard.c2 .turn-tag, .pcard.c3 .turn-tag { left: auto; right: 58px; }
.pcard.c0 .turn-tag, .pcard.c3 .turn-tag { top: auto; bottom: -6px; }
.pcard.turn .turn-tag { display: block; }
@keyframes pulseTag { 50% { transform: scale(1.08); } }
.pcard.dead { opacity: .45; filter: grayscale(1); }

/* prompt central */
#prompt { position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%); width: min(420px, 38vw); min-width: 320px; color: #fff;
  display: none; max-height: 70vh; overflow: auto; filter: drop-shadow(0 22px 44px rgba(0,0,0,.5)); }
#prompt.show { display: block; animation: pop .28s cubic-bezier(.2,1.3,.4,1); }
@keyframes pop { from { transform: translate(-50%, -50%) scale(.85); opacity: 0; } }
.dlg { background: linear-gradient(180deg, #16223a, #0c1426); border: 1px solid rgba(255,255,255,.14); border-radius: 22px; overflow: hidden; }
.dlg-head { padding: 14px 18px; display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,.06); }
.dlg-head .ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; background: rgba(255,255,255,.12); flex: 0 0 auto; }
.dlg-head h3 { margin: 0; font-size: 1.15rem; font-weight: 900; }
.dlg-head .sub { font-size: .78rem; opacity: .85; }
.dlg-body { padding: 14px 18px 18px; font-size: .92rem; line-height: 1.45; }
.dlg-body .cashline { display: flex; justify-content: space-between; background: rgba(255,255,255,.06); padding: 8px 12px; border-radius: 10px; margin-bottom: 10px; font-weight: 700; }
.dlg-body .cashline b { color: #ffe082; }
.deed .dlg-head { background: var(--gc); color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.35); padding: 16px 18px; }
.deed .dlg-head .ico { background: rgba(255,255,255,.25); }
.btn-col { display: grid; gap: 8px; margin-top: 12px; }
.btn-col .btn { width: 100%; padding: 11px 14px; font-weight: 800; display: flex; justify-content: space-between; align-items: center; }
.btn-col .btn.primary { justify-content: space-between; }
.btn-col .btn .p { font-weight: 900; }
#prompt table.rt, .dialog table.rt { width: 100%; border-collapse: collapse; font-size: .82rem; }
table.rt td { padding: 5px 6px; border-bottom: 1px solid rgba(255,255,255,.07); }
table.rt td:last-child { text-align: right; font-weight: 700; }
table.rt tr.cur td { color: var(--accent); }
table.rt tr.head td { color: #8fa3b3; font-size: .7rem; text-transform: uppercase; letter-spacing: .5px; }

.roll-wrap { display: grid; place-items: center; gap: 10px; }
.roll-btn { width: 150px; height: 150px; border-radius: 50%; border: 0; background: radial-gradient(circle at 35% 30%, #fff3a0, var(--accent) 55%, #c98a00);
  box-shadow: 0 0 0 6px rgba(255,255,255,.18), 0 0 0 12px rgba(255,202,40,.18), 0 18px 40px rgba(0,0,0,.45); color: #3a2600; font-weight: 900; font-size: 1.1rem;
  display: grid; place-items: center; cursor: pointer; animation: breathe 1.6s ease-in-out infinite; }
.roll-btn svg { width: 54px; height: 54px; display: block; margin: 0 auto 2px; }
.roll-btn:hover { filter: brightness(1.08); }
@keyframes breathe { 50% { transform: scale(1.05); } }
.roll-hint { background: rgba(8,14,26,.75); padding: 6px 14px; border-radius: 99px; font-size: .82rem; font-weight: 700; }

.sell-list { max-height: 220px; overflow: auto; display: grid; gap: 5px; margin-top: 8px; }
.sell-list label { display: flex; gap: 8px; align-items: center; background: rgba(255,255,255,.06); padding: 7px 10px; border-radius: 8px; }
.sell-list label span:last-child { margin-left: auto; font-weight: 800; }

/* tooltip de casa */
#tip { position: fixed; z-index: 40; pointer-events: none; min-width: 180px; background: rgba(10,16,28,.94); color: #fff; border-radius: 12px; overflow: hidden;
  border: 1px solid rgba(255,255,255,.14); box-shadow: 0 10px 28px rgba(0,0,0,.45); font-size: .82rem; display: none; }
#tip.show { display: block; }
#tip .th { padding: 7px 10px; font-weight: 900; font-size: .9rem; }
#tip .tb { padding: 7px 10px; display: grid; gap: 3px; }
#tip .tb div { display: flex; justify-content: space-between; gap: 14px; }
#tip .tb span { color: #9fb3c2; }

#logPanel { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); width: 300px; max-height: 42vh; overflow: auto; background: rgba(8,14,26,.85);
  backdrop-filter: blur(8px); border-radius: 16px; padding: 10px 14px; font-size: .8rem; display: none; border: 1px solid rgba(255,255,255,.14); color: #dfe8ef; }
#logPanel.show { display: block; }
#log div { padding: 4px 0; border-bottom: 1px solid rgba(255,255,255,.05); }
#log .good { color: var(--good); } #log .bad { color: var(--bad); }

.cardfx { position: fixed; inset: 0; display: grid; place-items: center; align-content: center; gap: 14px; z-index: 55; pointer-events: none; transition: opacity .25s; }
.cardfx.out { opacity: 0; }
.cardfx-dim { position: absolute; inset: 0; background: radial-gradient(circle, rgba(3,8,20,.35), rgba(3,8,20,.75)); animation: fadeIn .3s both; }
.cardfx-who { position: relative; display: flex; align-items: center; gap: 10px; padding: 6px 20px 6px 6px; border-radius: 999px; background: var(--pc); color: #fff;
  box-shadow: 0 10px 30px rgba(0,0,0,.45), 0 0 0 3px rgba(255,255,255,.35); animation: popIn .4s cubic-bezier(.2,1.3,.4,1) both; }
.cardfx-who .px-portrait { width: 46px; height: 46px; background: rgba(255,255,255,.25); }
.cardfx-who b { font-family: var(--gm-font); font-weight: 400; font-size: 1.35rem; letter-spacing: 1px; text-shadow: 0 2px 0 rgba(0,0,0,.25); }
.cardflip { position: relative; width: min(290px, 72vw); aspect-ratio: .68; perspective: 900px; animation: cardIn .5s cubic-bezier(.2,1.3,.4,1) both; }
.cardflip-in { position: absolute; inset: 0; transform-style: preserve-3d; animation: cardFlip .7s .45s cubic-bezier(.3,1.3,.5,1) both; }
.cf-back, .cardfx .card { position: absolute; inset: 0; backface-visibility: hidden; border-radius: 22px; }
.cf-back { display: grid; place-items: center; align-content: center; gap: 4px; color: #fff; border: 6px solid #fff;
  background: repeating-linear-gradient(45deg, #ef6c00 0 14px, #f57c00 14px 28px); box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.cf-back span { font-family: var(--gm-font); font-size: 6rem; line-height: 1; text-shadow: 0 6px 0 rgba(0,0,0,.2); }
.cf-back b { font-weight: 900; letter-spacing: 4px; }
.cardfx .card { transform: rotateY(180deg); background: linear-gradient(160deg, #fffdf5, #ffe9b0); color: #2a2000;
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 22px; text-align: center;
  box-shadow: 0 30px 80px rgba(0,0,0,.6); border: 6px solid #ef6c00; }
.cardfx .card.bad { background: linear-gradient(160deg, #fff5f5, #ffcdd2); border-color: #d32f2f; }
.cardfx .card.good { border-color: #2e7d32; }
.cardfx .card .ic { font-size: 64px; filter: drop-shadow(0 4px 4px rgba(0,0,0,.2)); }
.cardfx .card .kind { font-size: .72rem; font-weight: 900; letter-spacing: 2px; color: #ef6c00; }
.cardfx .card h4 { font-size: 1.5rem; margin: 10px 0 6px; }
.cardfx .card p { margin: 0; font-weight: 700; }
.cardfx .cf-ok { margin-top: 14px; pointer-events: auto; min-width: 120px; }
@keyframes cardFlip { from { transform: rotateY(0); } to { transform: rotateY(180deg); } }
@keyframes cardIn { from { transform: perspective(600px) rotateY(100deg) scale(.6); opacity: 0; } }

.floatmoney { position: fixed; font-weight: 900; font-size: 1.35rem; pointer-events: none; animation: floatUp 1.5s ease forwards; z-index: 30;
  text-shadow: 0 2px 0 #000, 0 0 10px rgba(0,0,0,.6); transform: translateX(-50%); }
.floatmoney.plus { color: #69f0ae; } .floatmoney.minus { color: #ff6e6e; }
@keyframes floatUp { to { transform: translate(-50%, -64px); opacity: 0; } }
.fairpop { font-size: .8rem; word-break: break-all; }

@media (max-width: 820px) {
  #prompt { width: calc(100vw - 24px); min-width: 0; top: auto; bottom: 110px; transform: translateX(-50%); }
  @keyframes pop { from { opacity: 0; } }
  .pcard { width: calc(50vw - 18px); height: 64px; }
  .pcard .px-portrait { width: 54px; height: 54px; }
  .pcard .pc-body { inset: 6px 0 6px 26px; } .pcard.c2 .pc-body, .pcard.c3 .pc-body { inset: 6px 26px 6px 0; }
  .pcard .cash { font-size: 1.05rem; } .pcard .row2 { display: none; }
  .pcard.c1, .pcard.c2 { top: 70px; }
  .pcard.c0, .pcard.c3 { bottom: 10px; }
  .pcard .turn-tag { left: 40px; } .pcard.c2 .turn-tag, .pcard.c3 .turn-tag { right: 40px; }
  .hud-top { top: 10px; } #ticker { display: none; }
  #logPanel { width: calc(100vw - 28px); }
  .roll-btn { width: 110px; height: 110px; }
}

/* ---------- Overlay (fim de jogo, confirmações) ---------- */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.65); backdrop-filter: blur(6px); display: none; place-items: center; z-index: 100; padding: 16px; }
.overlay.show { display: grid; animation: fadeIn .3s; }
.dialog { background: linear-gradient(160deg, var(--bg2), var(--bg)); border: 1px solid var(--panelBorder); border-radius: 20px; padding: 26px; width: min(620px, 100%); max-height: 92vh; overflow: auto; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.dialog h2 { margin-top: 0; }
.xp-rows { display: grid; gap: 4px; margin: 12px 0; }
.xp-rows div { display: flex; justify-content: space-between; animation: fadeIn .3s both; }
.unlock { display: flex; align-items: center; gap: 12px; background: var(--panel); border: 1px solid var(--accent); border-radius: 12px; padding: 8px 12px; margin: 6px 0; animation: pop .4s both; }
.unlock .tok, .unlock .mini-board { width: 48px; height: 48px; border-radius: 8px; border: 3px solid; }
.unlock .tok { border: 0; }
.rank { width: 100%; border-collapse: collapse; margin: 10px 0; }
.rank td { padding: 6px 4px; border-bottom: 1px solid var(--panelBorder); }
.verify { font-size: .78rem; color: var(--muted); word-break: break-all; background: rgba(0,0,0,.25); padding: 10px; border-radius: 10px; margin-top: 12px; }
#toast { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; }
#toast div { background: var(--accent); color: #111; padding: 10px 18px; border-radius: 99px; font-weight: 700; animation: pop .3s, fadeOut .4s 2.6s forwards; box-shadow: 0 8px 26px rgba(0,0,0,.4); }
@keyframes fadeOut { to { opacity: 0; transform: translateY(-10px); } }
.confetti { position: fixed; top: -10px; width: 10px; height: 14px; z-index: 150; animation: fall linear forwards; pointer-events: none; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

.pcard .px-sprite, .profile-card .px-sprite, .unlock .px-sprite { height: 165%; bottom: -78%; }

/* ---------- Moedas, menu ---------- */
.coin { display: inline-block; width: 16px; height: 16px; border-radius: 50%; vertical-align: -3px; margin-right: 4px;
  background: radial-gradient(circle at 35% 35%, #fff59d, #f9a825 60%, #c77800); box-shadow: inset 0 -2px 0 rgba(0,0,0,.2); }
.coins-pill { display: inline-flex; align-items: center; background: rgba(0,0,0,.35); border: 1px solid rgba(255,213,79,.4); color: #ffe082;
  font-weight: 900; padding: 3px 10px; border-radius: 99px; font-size: .9rem; }
.menu-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wrap.wide { max-width: 1280px; }
.pcard .pc-body { box-shadow: var(--frame, 0 0 0 0 transparent), 0 10px 28px rgba(0,0,0,.4); }
.pcard.turn .pc-body { box-shadow: var(--frame, 0 0 0 0 transparent), 0 0 0 1px var(--pc), 0 0 34px color-mix(in srgb, var(--pc) 55%, transparent); }

/* ---------- Personalizar ---------- */
.custom-layout { display: grid; grid-template-columns: 340px 1fr; gap: 20px; align-items: start; }
.custom-preview { position: sticky; top: 16px; background: var(--panel); border: 1px solid var(--panelBorder); border-radius: 20px; padding: 16px; display: grid; gap: 14px; }
.big-char { position: relative; height: 300px; border-radius: 16px; display: grid; place-items: end center; overflow: hidden;
  background: radial-gradient(ellipse at 50% 90%, rgba(0,0,0,.35) 0 18%, transparent 19%), linear-gradient(180deg, var(--bg2), var(--bg)); }
.big-char .px-portrait { width: 200px; height: 290px; border-radius: 0; background: none; box-shadow: none; overflow: visible; }
.big-char .px-portrait .px-sprite { height: 100%; bottom: 0; }
.big-char.is-preview { outline: 3px dashed var(--accent); outline-offset: -3px; }
.pv-tag { position: absolute; top: 10px; left: 10px; background: var(--accent); color: #111; font-weight: 900; font-size: .7rem; padding: 3px 8px; border-radius: 99px; }
.pcard-demo { position: relative !important; inset: auto !important; width: 100% !important; transform: none !important; }
.pv-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: center; }
.pv-dice { display: flex; gap: 8px; justify-content: center; }
.pv-dice .dice-mini { width: 54px; height: 54px; }
.pv-board .bp3 { width: 100%; }
.sections { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.sec { background: var(--panel); border: 1px solid var(--panelBorder); padding: 8px 12px; border-radius: 99px; font-size: .85rem; font-weight: 700; }
.sec:hover { background: rgba(255,255,255,.14); }
.sec.on { background: var(--accent); color: #111; border-color: transparent; }
.small-sec .sec { padding: 6px 10px; font-size: .78rem; }
.grid-title { margin: 6px 0 10px; color: var(--muted); text-transform: uppercase; font-size: .78rem; letter-spacing: 1px; }
.opt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; margin-bottom: 18px; }
.opt-grid.wide { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.opt { background: var(--panel); border: 2px solid var(--panelBorder); border-radius: 14px; padding: 8px 6px; display: grid; gap: 4px; justify-items: center; text-align: center;
  transition: transform .12s, border-color .15s; position: relative; }
.opt:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.35); }
.opt.sel { border-color: var(--good); background: rgba(105,240,174,.08); }
.opt.pv { border-color: var(--accent); }
.opt.locked .opt-thumb { filter: grayscale(.6) brightness(.75); }
.opt-thumb { width: 100%; display: grid; place-items: center; min-height: 72px; }
.opt-thumb .px-portrait { width: 72px; height: 72px; border-radius: 12px; }
.opt-thumb .px-sprite { height: 100%; bottom: 0; }
.opt-name { font-size: .76rem; font-weight: 700; line-height: 1.15; }
.opt-state { font-size: .72rem; font-weight: 800; color: #ffe082; display: flex; align-items: center; }
.opt-state.ok { color: var(--good); }
.swatch { width: 56px; height: 56px; border-radius: 50%; border: 3px solid rgba(255,255,255,.7); box-shadow: 0 4px 10px rgba(0,0,0,.35); }
.banner-mini { width: 100%; height: 46px; border-radius: 10px; }
.title-mini { font-weight: 900; font-size: .85rem; background: rgba(255,255,255,.1); border-radius: 8px; padding: 10px 6px; width: 100%; }
.dice-mini { width: 60px; height: 60px; }
.buy-bar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); width: min(760px, calc(100vw - 24px)); background: #101a2c; border: 2px solid var(--accent);
  border-radius: 16px; padding: 12px 16px; display: none; justify-content: space-between; align-items: center; gap: 12px; box-shadow: 0 18px 40px rgba(0,0,0,.5); z-index: 20; flex-wrap: wrap; }
.buy-bar.show { display: flex; animation: fadeIn .2s; }
@media (max-width: 860px) { .custom-layout { grid-template-columns: 1fr; } .custom-preview { position: static; } .big-char { height: 220px; } .big-char .px-portrait { width: 150px; height: 215px; } }

/* ---------- Loja ---------- */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.shop-item { background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03)); border: 1px solid var(--panelBorder); border-radius: 18px; padding: 12px;
  display: grid; gap: 4px; text-align: center; justify-items: center; }
.shop-item.owned { opacity: .7; }
.si-thumb { min-height: 96px; width: 100%; display: grid; place-items: center; }
.si-thumb .px-portrait { width: 96px; height: 96px; border-radius: 14px; }
.si-thumb .px-sprite { height: 100%; bottom: 0; }
.si-thumb .bp3 { width: 120px; }
.si-thumb .dice-mini { width: 80px; height: 80px; }
.si-cat { font-size: .66rem; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.si-name { font-weight: 800; }
.si-alt { font-size: .7rem; color: var(--muted); margin-bottom: 4px; }
.si-owned { color: var(--good); font-weight: 800; font-size: .85rem; padding: 8px; }
.shop-item .btn { width: 100%; font-weight: 900; }

/* ---------- Rota / fim de jogo ---------- */
.tr-thumbs { display: flex; gap: 4px; justify-content: center; margin: 6px 0; }
.tr-thumb { width: 40px; height: 40px; display: grid; place-items: center; overflow: hidden; }
.tr-thumb .px-portrait { width: 40px; height: 40px; border-radius: 8px; }
.tr-thumb .px-sprite { height: 100%; bottom: 0; }
.tr-thumb .swatch { width: 28px; height: 28px; }
.tr-thumb .bp3 { width: 40px; }
.tr-thumb .dice-mini { width: 36px; height: 36px; }
.tr-thumb .banner-mini { height: 22px; }
.tr-thumb .title-mini { font-size: .5rem; padding: 4px 2px; }
.tstep { flex: 0 0 150px; }
.reward-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.unlock-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.unlock-item { background: var(--panel); border: 1px solid var(--accent); border-radius: 12px; padding: 6px; display: grid; justify-items: center; gap: 4px; font-size: .72rem; font-weight: 700; text-align: center; animation: pop .4s both; }
.unlock-item .px-portrait { width: 56px; height: 56px; border-radius: 10px; }
.unlock-item .px-sprite { height: 100%; bottom: 0; }
.unlock-item .swatch { width: 40px; height: 40px; }
.unlock-item .bp3 { width: 64px; }
.unlock-item .dice-mini { width: 48px; height: 48px; }
.unlock-item .banner-mini { height: 30px; }

/* =================== MENU — GIRO MUNDIAL =================== */
:root { --gm-font: 'Lilita One', 'Segoe UI Black', 'Arial Black', sans-serif; --ui-font: 'Nunito', 'Segoe UI', system-ui, sans-serif; }
body { font-family: var(--ui-font); }
#menu { overflow: hidden; display: none; }
#menu.active { display: grid; grid-template-rows: auto 1fr auto; }

.menu-bg { position: absolute; inset: 0; overflow: hidden; z-index: 0; }
.menu-sky { position: absolute; inset: 0; background:
  radial-gradient(ellipse at 72% 45%, #1d4f9c 0%, transparent 55%),
  radial-gradient(ellipse at 10% 110%, #3a1d6e 0%, transparent 50%),
  linear-gradient(180deg, #071226 0%, #0b1f44 55%, #12285a 100%); }
.menu-stars { position: absolute; inset: 0; opacity: .7;
  background-image: radial-gradient(1px 1px at 20px 30px, #fff, transparent), radial-gradient(1px 1px at 120px 80px, #cfe3ff, transparent),
  radial-gradient(1.5px 1.5px at 200px 160px, #fff, transparent), radial-gradient(1px 1px at 300px 40px, #fff, transparent),
  radial-gradient(1px 1px at 380px 200px, #bcd6ff, transparent), radial-gradient(1.5px 1.5px at 60px 220px, #fff, transparent);
  background-size: 420px 260px; animation: twinkle 6s ease-in-out infinite alternate; }
@keyframes twinkle { from { opacity: .35; } to { opacity: .8; } }
#globe { position: absolute; width: min(78vh, 58vw); height: min(78vh, 58vw); right: max(-4vw, -60px); top: 50%; transform: translateY(-46%);
  animation: globeIn 1.4s cubic-bezier(.2,.9,.3,1) both; filter: drop-shadow(0 30px 60px rgba(0,0,0,.5)); }
@keyframes globeIn { from { opacity: 0; transform: translateY(-40%) scale(.85); } }
.menu-clouds i { position: absolute; display: block; width: 260px; height: 70px; border-radius: 99px; background: rgba(255,255,255,.06); filter: blur(6px);
  animation: drift linear infinite; }
.menu-clouds i::before, .menu-clouds i::after { content: ''; position: absolute; border-radius: 50%; background: inherit; }
.menu-clouds i::before { width: 110px; height: 90px; left: 40px; top: -40px; }
.menu-clouds i::after { width: 140px; height: 110px; left: 110px; top: -55px; }
.menu-clouds i:nth-child(1) { top: 16%; animation-duration: 70s; animation-delay: -10s; }
.menu-clouds i:nth-child(2) { top: 62%; animation-duration: 95s; animation-delay: -50s; transform: scale(.7); }
.menu-clouds i:nth-child(3) { top: 34%; animation-duration: 120s; animation-delay: -80s; transform: scale(1.3); opacity: .7; }
.menu-clouds i:nth-child(4) { top: 82%; animation-duration: 80s; animation-delay: -30s; }
@keyframes drift { from { left: -320px; } to { left: 110vw; } }
.menu-vignette { position: absolute; inset: 0; background: radial-gradient(ellipse at 40% 50%, transparent 40%, rgba(2,6,16,.65) 100%); pointer-events: none; }

/* topo */
.menu-top { position: relative; z-index: 2; display: flex; justify-content: flex-end; gap: 10px; padding: 18px 24px 0; animation: fadeDown .8s .2s both; }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-14px); } }
.mt-chip { display: flex; align-items: center; gap: 8px; background: rgba(6,14,30,.6); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.12);
  padding: 7px 14px; border-radius: 99px; font-weight: 800; color: #fff; font-size: .92rem; }
.mt-chip.coins { color: #ffe082; }
.mt-chip .lv { background: linear-gradient(180deg, #ffe082, #ffb300); color: #3a2600; border-radius: 99px; padding: 1px 9px; font-weight: 900; }
.mt-chip .bar { width: 70px; height: 6px; background: rgba(255,255,255,.15); border-radius: 99px; overflow: hidden; }
.mt-chip .bar i { display: block; height: 100%; background: linear-gradient(90deg, #ffd54f, #fff); border-radius: 99px; }
.mt-icon { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(6,14,30,.6); backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.12); transition: transform .3s, background .2s; }
.mt-icon:hover { transform: rotate(60deg); background: rgba(255,255,255,.15); }
.mt-icon svg { width: 20px; height: 20px; }

/* conteúdo */
.menu-main { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(380px, 560px) 1fr; align-items: center; gap: 20px; padding: 0 clamp(20px, 6vw, 90px); min-height: 0; }
.menu-left { display: grid; gap: 22px; }
.menu-left > * { animation: rise .8s cubic-bezier(.2,.9,.3,1) both; }
.menu-left > :nth-child(1) { animation-delay: .1s; } .menu-left > :nth-child(2) { animation-delay: .25s; }
.menu-left > :nth-child(3) { animation-delay: .4s; } .menu-left > :nth-child(4) { animation-delay: .55s; }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } }

/* logo */
.gm-logo { margin: 0; font-family: var(--gm-font); font-weight: 400; line-height: .86; letter-spacing: 1px; user-select: none; }
.gm-l1, .gm-l2 { display: flex; align-items: center; }
.gm-l1 { font-size: clamp(4.2rem, 9vw, 7.4rem); }
.gm-l2 { font-size: clamp(2.9rem, 6.2vw, 5.1rem); letter-spacing: 6px; margin-top: 4px; }
.gm-ch, .gm-l2 { color: #ffd54f; background: linear-gradient(180deg, #fff6c8 0%, #ffd54f 45%, #ff9f1c 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 0 #b3540a) drop-shadow(0 8px 0 #6b2c00) drop-shadow(0 14px 18px rgba(0,0,0,.5)); }
.gm-l2 { background: linear-gradient(180deg, #ffffff 0%, #bfe3ff 60%, #69b7ff 100%); -webkit-background-clip: text; background-clip: text;
  filter: drop-shadow(0 4px 0 #1c4f9c) drop-shadow(0 8px 0 #0b2556) drop-shadow(0 14px 18px rgba(0,0,0,.5)); }
.gm-ch { display: inline-block; animation: bob 3.2s ease-in-out infinite; }
.gm-ch:nth-child(2) { animation-delay: .15s; } .gm-ch:nth-child(3) { animation-delay: .3s; }
@keyframes bob { 50% { transform: translateY(-6px); } }
.gm-globe { position: relative; display: inline-block; width: .82em; height: .82em; margin-left: .04em; border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 32% 30%, #7fd3ff 0%, #1e63c6 50%, #0a2c6e 100%);
  box-shadow: inset -.08em -.06em .12em rgba(0,0,0,.45), inset .05em .05em .08em rgba(255,255,255,.5), 0 .07em 0 #0b2556, 0 .12em .2em rgba(0,0,0,.45); animation: bob 3.2s .45s ease-in-out infinite; }
.gm-globe i { position: absolute; inset: 0; border-radius: 50%;
  background: repeating-linear-gradient(90deg, transparent 0 18%, rgba(255,213,79,.85) 18% 21%, transparent 21% 33%) 0 0 / 200% 100%,
              linear-gradient(transparent 31%, rgba(255,213,79,.7) 31% 34%, transparent 34% 66%, rgba(255,213,79,.7) 66% 69%, transparent 69%);
  animation: spinGlobe 4s linear infinite; mask: radial-gradient(circle, #000 69%, transparent 71%); -webkit-mask: radial-gradient(circle, #000 69%, transparent 71%); }
@keyframes spinGlobe { to { background-position: -200% 0, 0 0; } }
.gm-tag { margin: 0; color: #d5e4ff; font-size: 1.12rem; font-weight: 700; max-width: 470px; line-height: 1.45; }
.gm-tag span { color: #8fb0e0; font-size: .85rem; font-weight: 700; letter-spacing: .3px; }

/* botão principal */
.play-group { display: grid; gap: 12px; max-width: 440px; }
.play-btn { position: relative; overflow: hidden; display: flex; align-items: center; gap: 16px; padding: 14px 26px 14px 16px; border-radius: 22px; text-align: left;
  background: linear-gradient(180deg, #ffe066 0%, #ffb300 55%, #ff8f00 100%); color: #3a1f00;
  box-shadow: 0 7px 0 #b35c00, 0 14px 28px rgba(0,0,0,.45), inset 0 2px 0 rgba(255,255,255,.65); transition: transform .12s, box-shadow .12s, filter .2s; }
.play-btn:hover { transform: translateY(-2px); filter: brightness(1.06); box-shadow: 0 9px 0 #b35c00, 0 18px 34px rgba(0,0,0,.5), inset 0 2px 0 rgba(255,255,255,.65); }
.play-btn:active { transform: translateY(5px); box-shadow: 0 2px 0 #b35c00, 0 6px 14px rgba(0,0,0,.4), inset 0 2px 0 rgba(255,255,255,.5); }
.play-btn::after { content: ''; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.65), transparent); animation: shine 3.4s ease-in-out infinite; }
@keyframes shine { 0%, 60% { left: -60%; } 100% { left: 130%; } }
.pb-icon { width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; background: rgba(58,31,0,.14); flex: 0 0 auto; }
.pb-icon svg { width: 30px; height: 30px; margin-left: 4px; }
.pb-text { display: grid; line-height: 1.05; }
.pb-text b { font-family: var(--gm-font); font-weight: 400; font-size: 2.1rem; letter-spacing: 1.5px; }
.pb-text small { font-weight: 800; font-size: .85rem; opacity: .7; text-transform: uppercase; letter-spacing: 1px; }
.play-btn.secondary { background: linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.06)); color: #fff; padding: 10px 22px 10px 12px;
  box-shadow: 0 5px 0 rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.25); border: 1px solid rgba(255,255,255,.15); }
.play-btn.secondary::after { display: none; }
.play-btn.secondary .pb-icon { width: 42px; height: 42px; background: rgba(255,255,255,.12); }
.play-btn.secondary .pb-icon svg { width: 20px; height: 20px; }
.play-btn.secondary .pb-text b { font-size: 1.35rem; }

/* blocos do menu */
.menu-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 520px; }
.m-tile { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 18px; text-align: left; color: #fff;
  background: linear-gradient(160deg, rgba(255,255,255,.11), rgba(255,255,255,.03)); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.12);
  transition: transform .2s cubic-bezier(.2,.9,.3,1.4), border-color .2s, box-shadow .2s; overflow: hidden; }
.m-tile::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 0% 50%, var(--tc), transparent 60%); opacity: 0; transition: opacity .25s; }
.m-tile:hover { transform: translateY(-4px); border-color: var(--tc); box-shadow: 0 12px 28px rgba(0,0,0,.4), 0 0 0 1px var(--tc), 0 0 24px color-mix(in srgb, var(--tc) 35%, transparent); }
.m-tile:hover::before { opacity: .18; }
.m-tile:active { transform: translateY(-1px) scale(.98); }
.mt-ico { position: relative; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: #0b1730; flex: 0 0 auto;
  background: linear-gradient(160deg, color-mix(in srgb, var(--tc) 60%, #fff), var(--tc)); box-shadow: 0 4px 0 color-mix(in srgb, var(--tc) 55%, #000), 0 6px 14px rgba(0,0,0,.35); }
.mt-ico svg { width: 24px; height: 24px; }
.m-tile:hover .mt-ico { animation: wiggle .5s ease; }
@keyframes wiggle { 30% { transform: rotate(-10deg) scale(1.08); } 60% { transform: rotate(8deg) scale(1.08); } }
.mt-txt { position: relative; display: grid; line-height: 1.2; }
.mt-txt b { font-size: 1.05rem; font-weight: 900; }
.mt-txt small { color: #a9bedc; font-weight: 700; font-size: .78rem; }

/* vitrine do personagem */
.menu-right { position: relative; height: 100%; display: grid; place-items: end center; min-height: 0; }
.showcase { position: relative; display: grid; justify-items: center; margin-bottom: 3vh; animation: popIn 1s .5s cubic-bezier(.2,1.2,.3,1) both; cursor: pointer; }
@keyframes popIn { from { opacity: 0; transform: translateY(40px) scale(.9); } }
.sc-char { position: relative; z-index: 2; width: clamp(150px, 17vw, 230px); aspect-ratio: 32 / 48; margin-bottom: -26px; animation: hover 3s ease-in-out infinite; }
@keyframes hover { 50% { transform: translateY(-8px); } }
.sc-char .px-portrait { width: 100%; height: 100%; border-radius: 0; background: none; box-shadow: none; overflow: visible; }
.sc-char .px-sprite { height: 100%; bottom: 0; filter: drop-shadow(0 6px 0 rgba(0,0,0,.25)); }
.pedestal { position: relative; z-index: 1; width: clamp(200px, 22vw, 290px); height: 60px; }
.pedestal::before { content: ''; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(ellipse at 50% 40%, #2c5aa8, #10275a 70%);
  box-shadow: 0 10px 0 #0a1a3d, 0 24px 40px rgba(0,0,0,.6), inset 0 3px 0 rgba(255,255,255,.2); }
.pedestal::after { content: ''; position: absolute; inset: -10px; border-radius: 50%; border: 2px dashed rgba(255,213,79,.6); animation: ring 14s linear infinite; }
@keyframes ring { to { transform: rotate(360deg); } }
.sc-card { margin-top: 26px; display: grid; justify-items: center; gap: 6px; background: rgba(6,14,30,.65); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px; padding: 12px 20px; min-width: 230px; }
.sc-name { font-weight: 900; font-size: 1.2rem; display: flex; align-items: center; gap: 8px; }
.sc-name .chip { font-size: .66rem; font-weight: 900; letter-spacing: .6px; text-transform: uppercase; background: rgba(255,213,79,.18); color: #ffd54f; padding: 3px 8px; border-radius: 6px; }
.sc-stats { font-size: .78rem; color: #a9bedc; font-weight: 700; }
.sc-edit { margin-top: 4px; font-weight: 900; font-size: .85rem; color: #0b1730; background: linear-gradient(180deg, #d1c4ff, #b388ff); padding: 7px 14px; border-radius: 99px;
  box-shadow: 0 3px 0 #6f4bc4; transition: transform .15s; }
.sc-edit:hover { transform: translateY(-2px); }

.menu-foot { position: relative; z-index: 2; display: flex; gap: 22px; justify-content: center; padding: 10px 20px 16px; color: #8fb0e0; font-size: .8rem; font-weight: 700;
  animation: fadeUp 1s .8s both; flex-wrap: wrap; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } }

@media (max-width: 900px) {
  #menu.active { overflow: auto; }
  .menu-main { grid-template-columns: 1fr; padding: 10px 20px; }
  .menu-right { order: -1; height: auto; }
  .showcase { margin-bottom: 0; } .sc-card { display: none; }
  .sc-char { width: 110px; margin-bottom: -18px; } .pedestal { width: 150px; height: 40px; }
  #globe { width: 110vw; height: 110vw; right: -30vw; top: 4%; transform: none; opacity: .55; }
  .menu-tiles { grid-template-columns: 1fr 1fr; }
  .gm-l1 { font-size: 3.6rem; } .gm-l2 { font-size: 2.4rem; }
}

/* outras telas com a mesma tipografia */
.topbar h2 { font-family: var(--gm-font); font-weight: 400; letter-spacing: 1px; font-size: 2rem; }

/* correções de altura e visibilidade */
.play-btn[hidden] { display: none !important; }
.menu-left { gap: clamp(10px, 2.3vh, 22px); }
.gm-l1 { font-size: clamp(3rem, min(9vw, 13vh), 7.4rem); }
.gm-l2 { font-size: clamp(2.1rem, min(6.2vw, 8.6vh), 5.1rem); }
.gm-tag { font-size: clamp(.95rem, 2vh, 1.12rem); }
.play-btn { padding-top: clamp(8px, 1.6vh, 14px); padding-bottom: clamp(8px, 1.6vh, 14px); }
.pb-icon { width: clamp(44px, 7vh, 58px); height: clamp(44px, 7vh, 58px); }
.pb-text b { font-size: clamp(1.6rem, 4.2vh, 2.1rem); }
.m-tile { padding: clamp(9px, 1.6vh, 14px) 14px; }
.sc-char { width: clamp(120px, min(15vw, 26vh), 210px); }

/* =================== PERSONALIZAR (v2) =================== */
#custom.active { display: block; overflow: hidden; }
.cz { height: 100%; display: grid; grid-template-rows: auto 1fr; background: radial-gradient(ellipse at 20% 0%, #1d3f73, transparent 60%), linear-gradient(180deg, #0b1a33, #08122a); }
.cz-top { display: flex; align-items: center; gap: 14px; padding: 14px 22px; flex-wrap: wrap; }
.cz-top h2 { margin: 0; font-family: var(--gm-font); font-weight: 400; font-size: 1.9rem; letter-spacing: 1px; }
.cz-tabs { display: flex; gap: 4px; background: rgba(0,0,0,.3); padding: 4px; border-radius: 99px; border: 1px solid rgba(255,255,255,.1); margin: 0 auto; }
.cz-tab { padding: 8px 16px; border-radius: 99px; font-weight: 800; font-size: .9rem; color: #c5d3e8; background: none; transition: background .2s, color .2s; }
.cz-tab:hover { color: #fff; background: rgba(255,255,255,.08); }
.cz-tab.on { background: linear-gradient(180deg, #ffe066, #ffb300); color: #3a1f00; box-shadow: 0 3px 0 #b35c00; }
.cz-main { display: grid; grid-template-columns: 330px 180px 1fr; gap: 16px; padding: 0 22px 22px; min-height: 0; }
.cz-stage { display: flex; flex-direction: column; gap: 12px; min-height: 0; overflow: auto; }
.stage { position: relative; height: 330px; border-radius: 22px; overflow: hidden; flex: 0 0 auto;
  background: radial-gradient(ellipse at 50% 100%, #2b5fae 0%, #142e5c 45%, #0a1830 100%); border: 1px solid rgba(255,255,255,.12); }
.stage.is-preview { box-shadow: 0 0 0 3px var(--accent), 0 0 30px rgba(255,202,40,.35); }
.stage-light { position: absolute; left: 50%; top: -40px; width: 260px; height: 420px; transform: translateX(-50%);
  background: radial-gradient(ellipse at 50% 0%, rgba(255,255,255,.28), transparent 65%); pointer-events: none; }
.stage-floor { position: absolute; left: 50%; bottom: 22px; width: 200px; height: 40px; transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0,0,0,.55), transparent 70%); }
.stage-char { position: absolute; left: 50%; bottom: 34px; width: 180px; height: 270px; transform: translateX(-50%); z-index: 2; animation: hover 3s ease-in-out infinite; }
.stage-char .px-portrait { width: 100%; height: 100%; border-radius: 0; background: none; box-shadow: none; overflow: visible; }
.stage-char .px-sprite { height: 100%; bottom: 0; }
.stage-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stage-actions .btn { font-weight: 800; }
.cz-rail { display: flex; flex-direction: column; gap: 6px; overflow: auto; }
.rail-btn { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 14px; font-weight: 800; font-size: .92rem; text-align: left; color: #c5d3e8;
  background: rgba(255,255,255,.04); border: 1px solid transparent; transition: background .15s, transform .15s; }
.rail-btn:hover { background: rgba(255,255,255,.09); color: #fff; transform: translateX(3px); }
.rail-btn.on { background: rgba(255,202,40,.14); border-color: rgba(255,202,40,.6); color: #fff; }
.rail-btn .ri { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: rgba(255,255,255,.08); font-size: 1rem; }
.rail-btn.on .ri { background: var(--accent); }
.cz-panel { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); border-radius: 22px; padding: 18px 20px 90px; overflow: auto; min-height: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.panel-head h3 { margin: 0; font-size: 1.3rem; }
.panel-head p { margin: 2px 0 0; }
.panel-filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.seg { display: flex; background: rgba(0,0,0,.3); border-radius: 10px; padding: 3px; }
.seg button { padding: 6px 10px; border-radius: 8px; font-size: .8rem; font-weight: 800; color: #c5d3e8; background: none; }
.seg button.on { background: rgba(255,255,255,.16); color: #fff; }
.own-toggle { font-size: .82rem; font-weight: 700; color: #c5d3e8; display: flex; gap: 6px; align-items: center; cursor: pointer; }
.g-tag { position: absolute; top: 5px; left: 7px; font-size: .75rem; font-weight: 900; opacity: .75; }
.g-tag.f { color: #f48fb1; } .g-tag.m { color: #81d4fa; }
.sw-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.sw { position: relative; width: 36px; height: 36px; border-radius: 50%; background: var(--c); border: 3px solid rgba(255,255,255,.25); padding: 0;
  box-shadow: 0 3px 8px rgba(0,0,0,.35); transition: transform .12s; }
.sw:hover { transform: scale(1.12); }
.sw.sel { border-color: #fff; box-shadow: 0 0 0 3px var(--good), 0 3px 8px rgba(0,0,0,.35); }
.sw.pv { box-shadow: 0 0 0 3px var(--accent); }
.sw.locked { opacity: .55; }
.sw i { position: absolute; right: -4px; bottom: -4px; font-size: .62rem; font-style: normal; background: #111; border-radius: 50%; padding: 1px; }
.body-pick { display: grid; grid-template-columns: repeat(2, minmax(120px, 170px)); gap: 12px; margin-bottom: 8px; }
.body-card { display: grid; justify-items: center; gap: 6px; padding: 12px; border-radius: 18px; background: rgba(255,255,255,.05); border: 2px solid rgba(255,255,255,.12); color: #fff; font-size: 1rem; }
.body-card .px-portrait { width: 90px; height: 135px; border-radius: 0; background: none; box-shadow: none; overflow: visible; }
.body-card .px-sprite { height: 100%; bottom: 0; }
.body-card.sel { border-color: var(--good); background: rgba(105,240,174,.08); }
.body-card:hover { border-color: rgba(255,255,255,.4); }
.note { background: rgba(255,202,40,.12); border: 1px solid rgba(255,202,40,.4); padding: 8px 12px; border-radius: 10px; font-size: .85rem; }
@media (max-width: 1050px) {
  #custom.active { overflow: auto; }
  .cz-main { grid-template-columns: 1fr; }
  .cz-rail { flex-direction: row; flex-wrap: wrap; }
  .rail-btn { padding: 8px 10px; font-size: .82rem; }
  .stage { height: 240px; } .stage-char { width: 130px; height: 195px; }
  .cz-panel { overflow: visible; }
}

/* =================== VEZ / FALÊNCIA / VITÓRIA =================== */
.fx-layer { position: fixed; inset: 0; z-index: 60; pointer-events: none; display: grid; place-items: center; }
.turn-banner { position: relative; display: flex; align-items: center; gap: 18px; padding: 14px 40px 14px 20px; border-radius: 999px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--pc) 85%, #000), var(--pc)); color: #fff; box-shadow: 0 20px 50px rgba(0,0,0,.5), 0 0 0 4px rgba(255,255,255,.25);
  animation: tbIn .45s cubic-bezier(.2,1.3,.4,1) both, tbOut .4s ease-in both; animation-delay: 0s, var(--hold, 1.1s); }
.turn-banner .px-portrait { width: 84px; height: 84px; background: rgba(255,255,255,.2); box-shadow: 0 0 0 4px #fff; }
.turn-banner small { display: block; font-weight: 900; letter-spacing: 3px; font-size: .8rem; opacity: .85; }
.turn-banner b { font-family: var(--gm-font); font-weight: 400; font-size: 2.6rem; letter-spacing: 1px; line-height: 1; text-shadow: 0 3px 0 rgba(0,0,0,.25); }
@keyframes tbIn { from { transform: translateX(-60vw) skewX(-12deg); opacity: 0; } }
@keyframes tbOut { to { transform: translateX(60vw) skewX(12deg); opacity: 0; } }
.fx-dim { position: fixed; inset: 0; background: rgba(0,0,0,.35); animation: fadeIn .3s both, fadeOut .4s both; animation-delay: 0s, var(--hold, 1.1s); }

.bk-card { position: relative; display: grid; justify-items: center; gap: 8px; padding: 26px 46px; border-radius: 26px; color: #fff;
  background: linear-gradient(180deg, #4a0d0d, #1c0505); box-shadow: 0 0 0 4px #ff5252, 0 30px 70px rgba(0,0,0,.6); animation: bkIn .5s cubic-bezier(.2,1.3,.4,1) both, shake .5s .5s both; }
.bk-card .px-portrait { width: 120px; height: 120px; filter: grayscale(1) brightness(.8); background: rgba(255,255,255,.08); }
.bk-card b { font-family: var(--gm-font); font-weight: 400; font-size: 3.4rem; color: #ff5252; letter-spacing: 3px; line-height: 1; text-shadow: 0 4px 0 #5a0000; }
.bk-card span { font-weight: 800; font-size: 1.1rem; }
.bk-card::after { content: ''; position: absolute; inset: 0; border-radius: 26px; pointer-events: none;
  background: linear-gradient(115deg, transparent 47%, rgba(255,255,255,.55) 48%, transparent 49.5%), linear-gradient(65deg, transparent 58%, rgba(255,255,255,.4) 59%, transparent 60%);
  opacity: 0; animation: crack .2s .55s both; }
@keyframes bkIn { from { transform: scale(2.2); opacity: 0; } }
@keyframes shake { 20%, 60% { transform: translateX(-12px) rotate(-2deg); } 40%, 80% { transform: translateX(12px) rotate(2deg); } }
@keyframes crack { to { opacity: 1; } }
.fall-coin { position: fixed; top: -30px; width: 22px; height: 22px; border-radius: 50%; z-index: 61; pointer-events: none;
  background: radial-gradient(circle at 35% 35%, #fff59d, #f9a825 60%, #c77800); animation: coinFall linear forwards; }
@keyframes coinFall { to { transform: translateY(110vh) rotate(900deg); } }

.win-wrap { position: relative; display: grid; justify-items: center; gap: 6px; }
.win-rays { position: absolute; width: 900px; height: 900px; left: 50%; top: 50%; transform: translate(-50%, -50%); border-radius: 50%;
  background: repeating-conic-gradient(rgba(255,213,79,.28) 0 8deg, transparent 8deg 20deg); mask: radial-gradient(circle, #000 20%, transparent 70%); -webkit-mask: radial-gradient(circle, #000 20%, transparent 70%);
  animation: spinRays 12s linear infinite, fadeIn .6s both; }
@keyframes spinRays { to { transform: translate(-50%, -50%) rotate(360deg); } }
.win-char { position: relative; width: 200px; height: 300px; animation: winJump .7s ease-in-out infinite alternate, popIn .6s both; }
.win-char .px-portrait { width: 100%; height: 100%; border-radius: 0; background: none; box-shadow: none; overflow: visible; }
.win-char .px-sprite { height: 100%; bottom: 0; }
@keyframes winJump { to { transform: translateY(-18px); } }
.win-title { position: relative; font-family: var(--gm-font); font-size: 5rem; line-height: 1; letter-spacing: 4px;
  background: linear-gradient(180deg, #fff6c8, #ffd54f 50%, #ff9f1c); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 5px 0 #b3540a) drop-shadow(0 14px 18px rgba(0,0,0,.5)); animation: bkIn .6s .2s cubic-bezier(.2,1.3,.4,1) both; }
.win-name { position: relative; font-weight: 900; font-size: 1.5rem; color: #fff; background: var(--pc); padding: 6px 22px; border-radius: 99px; box-shadow: 0 4px 0 rgba(0,0,0,.3); animation: rise .5s .5s both; }
.win-sub { position: relative; color: #ffe082; font-weight: 800; animation: rise .5s .7s both; }
.win-click { position: relative; color: #c5d3e8; font-size: .85rem; margin-top: 10px; animation: fadeIn .5s 1.6s both; }

/* miniatura de ambiente */
.env-mini { width: 100%; height: 80px; border-radius: 12px; background-size: cover; position: relative; box-shadow: inset 0 0 0 2px rgba(255,255,255,.15), inset 0 -20px 30px rgba(0,0,0,.35); }
.env-mini span { position: absolute; right: 8px; bottom: 6px; font-size: 1.6rem; filter: drop-shadow(0 2px 3px rgba(0,0,0,.5)); }
.si-thumb .env-mini { width: 140px; }
.tr-thumb .env-mini { height: 36px; width: 40px; } .tr-thumb .env-mini span { font-size: .9rem; right: 2px; bottom: 0; }
.unlock-item .env-mini { height: 44px; }

/* construções raras */
.bld-mini { width: 100%; height: 80px; border-radius: 12px; display: grid; place-items: center; position: relative; font-size: 2.4rem;
  background: radial-gradient(circle at 50% 35%, rgba(255,255,255,.25), transparent 60%), var(--rc, #546e7a); box-shadow: inset 0 0 0 2px rgba(255,255,255,.2); }
.bld-mini small { position: absolute; bottom: 4px; font-size: .62rem; font-weight: 900; letter-spacing: 1px; text-transform: uppercase; color: #fff; text-shadow: 0 1px 2px #000; }
.bld-mini.r-raro { --rc: linear-gradient(135deg, #1565c0, #42a5f5); }
.bld-mini.r-épico { --rc: linear-gradient(135deg, #6a1b9a, #ba68c8); }
.bld-mini.r-lendário { --rc: linear-gradient(135deg, #e65100, #ffd54f); animation: legend 2s ease-in-out infinite; }
@keyframes legend { 50% { box-shadow: inset 0 0 0 2px #fff, 0 0 18px #ffd54f; } }
.si-thumb .bld-mini { width: 140px; }

/* =================== PRÉVIA EM TELA CHEIA =================== */
#pvModal { position: fixed; inset: 0; z-index: 120; display: none; grid-template-columns: 1fr 360px; background: #050a14; }
#pvModal.show { display: grid; animation: fadeIn .25s; }
.pv-stage { position: relative; min-width: 0; overflow: hidden; }
.pv-canvas { position: absolute; inset: 0; }
.pv-canvas canvas { width: 100% !important; height: 100% !important; display: block; touch-action: none; }
.pv-hint { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); background: rgba(5,10,20,.7); color: #cfe0f5; padding: 6px 14px; border-radius: 99px; font-size: .82rem; font-weight: 700; pointer-events: none; }
.pv-tools { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); display: grid; gap: 8px; }
.pv-tb { width: 46px; height: 46px; border-radius: 14px; font-size: 1.3rem; font-weight: 900; color: #fff; background: rgba(5,10,20,.72); border: 1px solid rgba(255,255,255,.18); }
.pv-tb:hover { background: rgba(255,255,255,.16); } .pv-tb.on { background: var(--accent); color: #111; }
.pv-actions { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.pv-act { padding: 10px 16px; border-radius: 99px; font-weight: 900; color: #3a1f00; background: linear-gradient(180deg, #ffe066, #ffb300); box-shadow: 0 4px 0 #b35c00; }
.pv-act:active { transform: translateY(3px); box-shadow: 0 1px 0 #b35c00; }
.pv-overlay { position: absolute; inset: 0; pointer-events: none; }
.pv-side { background: linear-gradient(180deg, #13213c, #0a1426); border-left: 1px solid rgba(255,255,255,.1); padding: 24px 22px; overflow: auto; display: flex; flex-direction: column; gap: 14px; color: #fff; }
.pv-side h2 { margin: 0; font-family: var(--gm-font); font-weight: 400; font-size: 2rem; letter-spacing: .5px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pv-cat { color: #8fb0e0; font-weight: 800; text-transform: uppercase; letter-spacing: 1.5px; font-size: .75rem; }
.pv-rar { font-family: var(--ui-font); font-size: .7rem; font-weight: 900; text-transform: uppercase; letter-spacing: 1px; padding: 3px 10px; border-radius: 99px; background: var(--rc); color: #111; }
.pv-big { height: 280px; border-radius: 18px; background: radial-gradient(ellipse at 50% 100%, #2b5fae, #0a1830 70%); position: relative; overflow: hidden; }
.pv-big-char { position: absolute; left: 50%; bottom: 10px; width: 170px; height: 255px; transform: translateX(-50%); }
.pv-big-char .px-portrait { width: 100%; height: 100%; border-radius: 0; background: none; box-shadow: none; overflow: visible; }
.pv-big-char .px-sprite { height: 100%; bottom: 0; }
.pv-anim { display: flex; gap: 6px; }
.pv-anim button { flex: 1; padding: 7px; border-radius: 10px; font-weight: 800; font-size: .82rem; color: #cfe0f5; background: rgba(255,255,255,.07); }
.pv-anim button.on { background: rgba(255,202,40,.2); color: #fff; box-shadow: inset 0 0 0 1px var(--accent); }
.pv-thumb { display: grid; place-items: center; padding: 10px; background: rgba(255,255,255,.04); border-radius: 18px; }
.pv-thumb .env-mini, .pv-thumb .bld-mini, .pv-thumb .banner-mini { height: 140px; }
.pv-thumb .bp3 { width: 220px; } .pv-thumb .dice-mini { width: 120px; height: 120px; } .pv-thumb .swatch { width: 90px; height: 90px; }
.pv-thumb .title-mini { font-size: 1.4rem; padding: 18px; }
.pv-where { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: 14px; padding: 12px 14px; }
.pv-where p { margin: 6px 0 0; color: #c5d3e8; font-size: .9rem; line-height: 1.4; }
.pv-status { font-weight: 800; } .pv-status .ok { color: var(--good); }
.pv-buttons { display: grid; gap: 8px; }
.pv-buttons .btn { padding: 12px; font-weight: 900; }
.pv-close { position: absolute; top: 14px; left: 14px; width: 44px; height: 44px; border-radius: 50%; font-size: 1.2rem; color: #fff; background: rgba(5,10,20,.75); border: 1px solid rgba(255,255,255,.2); z-index: 5; }
.pv-close:hover { background: #c62828; }
.opt-zoom { position: absolute; top: 4px; right: 5px; width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; font-size: .75rem;
  background: rgba(0,0,0,.45); opacity: 0; transition: opacity .15s; z-index: 2; }
.opt:hover .opt-zoom, .opt.locked .opt-zoom { opacity: 1; }
.shop-item .si-pv { width: 100%; font-weight: 800; padding: 7px; }
@media (max-width: 860px) { #pvModal { grid-template-columns: 1fr; grid-template-rows: 55vh 1fr; } .pv-side { border-left: 0; border-top: 1px solid rgba(255,255,255,.1); } .pv-big { height: 200px; } .pv-big-char { width: 120px; height: 180px; } }

/* sorteio de quem começa */
.so-box { position: relative; background: linear-gradient(180deg, #16223a, #0c1426); border: 1px solid rgba(255,255,255,.15); border-radius: 24px; padding: 22px 26px; text-align: center; color: #fff;
  box-shadow: 0 30px 70px rgba(0,0,0,.6); animation: popIn .5s cubic-bezier(.2,1.2,.3,1) both; max-width: 92vw; }
.so-box h2 { margin: 0; font-family: var(--gm-font); font-weight: 400; font-size: 2.2rem; letter-spacing: 1px; }
.so-sub { color: #c5d3e8; margin: 6px 0 16px; font-weight: 700; }
.so-grid { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.so-card { width: 150px; padding: 12px 10px; border-radius: 18px; background: rgba(255,255,255,.06); border: 2px solid rgba(255,255,255,.12); display: grid; justify-items: center; gap: 6px; transition: transform .3s, opacity .3s, border-color .3s; }
.so-card .px-portrait { width: 70px; height: 70px; }
.so-card .px-sprite { height: 165%; bottom: -78%; }
.so-dice { display: flex; gap: 6px; height: 44px; }
.so-d { width: 42px; height: 42px; display: block; }
.so-d svg { width: 100%; height: 100%; filter: drop-shadow(0 3px 4px rgba(0,0,0,.4)); }
.so-card.rolling .so-d { animation: soShake .14s linear infinite; }
@keyframes soShake { 50% { transform: rotate(14deg) translateY(-4px); } }
.so-sum { font-family: var(--gm-font); font-size: 1.8rem; min-height: 1.9rem; color: #ffe082; }
.so-card.lose { opacity: .4; transform: scale(.94); }
.so-card.win { border-color: var(--pc); box-shadow: 0 0 0 2px var(--pc), 0 0 28px color-mix(in srgb, var(--pc) 60%, transparent); transform: scale(1.08); }

.so-sum small { font-size: 1.1rem; color: #fff; }

/* aviso de dupla */
.dbl-banner { background: linear-gradient(135deg, #ffca28, #ff8f00) !important; color: #3e2100 !important; }
.dbl-banner small { color: #5d3200; opacity: 1; }
.dbl-banner b { color: #fff; text-shadow: 0 3px 0 rgba(120,50,0,.45); }
.dbl-banner em { display: block; font-style: normal; font-weight: 900; font-size: .9rem; margin-top: 4px; color: #b71c1c; }

/* ================= ONLINE ================= */
.play-btn.online { background: linear-gradient(180deg, #4fc3f7, #0288d1); color: #fff; box-shadow: 0 7px 0 #01579b, 0 14px 30px rgba(0,0,0,.45), inset 0 2px 0 rgba(255,255,255,.5); }
.play-btn.online:hover { box-shadow: 0 9px 0 #01579b, 0 18px 34px rgba(0,0,0,.5), inset 0 2px 0 rgba(255,255,255,.55); }
.play-btn.online:active { box-shadow: 0 2px 0 #01579b, 0 6px 14px rgba(0,0,0,.4); }
.play-btn.online .pb-icon { color: #fff; }
.play-btn.online .pb-icon svg { width: 26px; height: 26px; }
.on-status { font-size: .8rem; font-weight: 800; color: var(--muted); padding: 4px 10px; border-radius: 99px; background: var(--panel); }
.on-status.ok { color: var(--good); }
.on-loading, .on-waiting { display: flex; align-items: center; gap: 12px; justify-content: center; padding: 40px; color: var(--muted); font-weight: 700; }
.on-waiting { padding: 10px; justify-content: flex-start; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(255,255,255,.15); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.on-home { display: grid; gap: 18px; }
.on-me { display: flex; align-items: center; gap: 14px; background: var(--panel); border: 1px solid var(--panelBorder); border-radius: 18px; padding: 10px 16px; }
.on-me .px-portrait { width: 64px; height: 64px; }
.on-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.on-big { display: grid; gap: 4px; justify-items: start; text-align: left; padding: 18px; border-radius: 20px; background: var(--panel); border: 1px solid var(--panelBorder); transition: transform .15s, background .2s; }
button.on-big:hover { transform: translateY(-3px); background: rgba(255,255,255,.12); }
.on-big > span { font-size: 2rem; }
.on-big b { font-family: var(--gm-font, inherit); font-size: 1.35rem; font-weight: 400; letter-spacing: .5px; }
.on-big small { color: var(--muted); font-weight: 600; }
.on-big.quick { background: linear-gradient(160deg, rgba(255,202,40,.25), rgba(255,143,0,.12)); border-color: rgba(255,202,40,.4); }
.on-big.create { background: linear-gradient(160deg, rgba(79,195,247,.22), rgba(2,136,209,.1)); border-color: rgba(79,195,247,.35); }
.on-join { display: flex; gap: 8px; margin-top: 6px; width: 100%; }
.on-join input { flex: 1; min-width: 0; font-size: 1.3rem; letter-spacing: 6px; text-transform: uppercase; font-weight: 900; text-align: center; }
.on-list-head { display: flex; align-items: center; gap: 12px; }
.on-list-head h3 { margin: 0; flex: 1; }
.on-list { display: grid; gap: 8px; }
.on-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 14px; background: var(--panel); border: 1px solid var(--panelBorder); }
.on-seats { letter-spacing: 3px; color: var(--accent); }
.on-empty { padding: 20px; border-radius: 14px; border: 1px dashed var(--panelBorder); color: var(--muted); text-align: center; }
.on-room { display: grid; gap: 18px; }
.on-code-card { display: grid; gap: 8px; justify-items: center; padding: 18px; border-radius: 20px; background: linear-gradient(160deg, rgba(255,202,40,.16), rgba(255,255,255,.04)); border: 1px solid rgba(255,202,40,.35); text-align: center; }
.on-code { font-family: var(--gm-font, inherit); font-size: 3rem; letter-spacing: 12px; color: var(--accent); line-height: 1; text-shadow: 0 4px 0 rgba(0,0,0,.3); }
.on-link { display: flex; gap: 8px; width: min(560px, 100%); }
.on-link input { flex: 1; min-width: 0; font-size: .85rem; }
.on-seats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.on-seat { position: relative; display: grid; justify-items: center; gap: 6px; padding: 16px 12px; border-radius: 18px; background: var(--panel); border: 2px solid var(--pc, var(--panelBorder)); min-height: 190px; align-content: center; text-align: center; animation: popIn .35s both; }
.on-seat .px-portrait { width: 84px; height: 84px; }
.on-seat.empty { border-style: dashed; border-color: var(--panelBorder); color: var(--muted); }
.es-ico { font-size: 2rem; opacity: .5; }
.es-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.es-actions .btn { padding: 6px 10px; font-size: .8rem; }
.os-name { font-weight: 900; font-size: 1.05rem; text-shadow: 0 2px 4px rgba(0,0,0,.5); }
.os-tags { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.tag { font-size: .7rem; font-weight: 800; padding: 2px 8px; border-radius: 99px; background: rgba(0,0,0,.35); }
.tag.host { color: #ffd54f; } .tag.you { color: var(--good); } .tag.off { color: var(--bad); } .tag.bot { color: #b3e5fc; }
.os-x { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; background: rgba(0,0,0,.4); }
.os-x:hover { background: #c62828; }
.on-room-bottom { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.on-settings, .on-chat { padding: 16px; border-radius: 18px; background: var(--panel); border: 1px solid var(--panelBorder); display: grid; gap: 10px; align-content: start; }
.on-settings > div:first-child { display: flex; justify-content: space-between; align-items: center; }
.on-chat-log { height: 160px; overflow: auto; font-size: .9rem; display: grid; gap: 3px; align-content: start; user-select: text; }
.on-chat-log .sys { color: var(--muted); font-style: italic; font-size: .82rem; }
.on-chat-in { display: flex; gap: 8px; } .on-chat-in input { flex: 1; min-width: 0; }
.on-emotes, .cb-emotes { display: flex; gap: 6px; flex-wrap: wrap; }
.on-emotes button, .cb-emotes button { background: rgba(255,255,255,.08); padding: 4px 10px; font-size: 1rem; }
.on-emotes button:hover, .cb-emotes button:hover { background: rgba(255,255,255,.18); }
.on-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 10px 0; }
.on-form label { display: grid; gap: 4px; font-weight: 700; font-size: .9rem; }
.on-form label.chk { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; }
/* na partida */
.room-chip { font-size: .72rem; font-weight: 900; letter-spacing: 2px; padding: 4px 10px; border-radius: 99px; background: rgba(79,195,247,.2); color: #b3e5fc; align-self: center; }
.on-timer { position: fixed; top: 112px; left: 50%; transform: translateX(-50%); z-index: 45; padding: 6px 16px; border-radius: 99px; background: rgba(10,16,28,.88);
  border: 2px solid var(--pc); color: #fff; font-weight: 700; font-size: .9rem; pointer-events: none; box-shadow: 0 8px 20px rgba(0,0,0,.4); }
.on-timer.mine { background: color-mix(in srgb, var(--pc) 35%, #0a101c); }
.on-timer.urgent { animation: urgent .5s ease-in-out infinite alternate; border-color: var(--bad); }
@keyframes urgent { to { transform: translateX(-50%) scale(1.08); } }
.pcard.offline { filter: grayscale(.8) brightness(.7); }
#chatBubbles { position: fixed; left: 50%; bottom: 120px; transform: translateX(-50%); display: grid; gap: 6px; justify-items: center; z-index: 44; pointer-events: none; }
.chat-bubble { padding: 7px 14px; border-radius: 16px; background: rgba(10,16,28,.9); border-left: 4px solid var(--pc); color: #fff; max-width: 70vw; animation: popIn .3s both; transition: opacity .4s; }
.chat-bubble b { color: var(--pc); margin-right: 4px; }
.chat-bubble.out { opacity: 0; }
#chatBar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%) translateY(140%); width: min(560px, 92vw); z-index: 46; display: grid; gap: 6px; padding: 10px; border-radius: 16px; background: rgba(10,16,28,.94); border: 1px solid var(--panelBorder); transition: transform .25s; }
#chatBar.show { transform: translateX(-50%); }
#chatBar input { width: 100%; }
@media (max-width: 820px) {
  .on-actions, .on-room-bottom, .on-form { grid-template-columns: 1fr; }
  .on-code { font-size: 2.2rem; letter-spacing: 8px; }
}

/* "Seu personagem" (online) */
.on-join-screen { max-width: 860px; margin: 0 auto; display: grid; gap: 16px; }
.on-join-head { text-align: center; display: grid; gap: 4px; justify-items: center; }
.on-join-head h3 { margin: 0; font-size: 1.5rem; }
.on-join-head p { margin: 4px 0 0; color: var(--muted); font-weight: 600; }
.on-code.sm { font-size: 2.2rem; letter-spacing: 9px; }
.id-card { display: grid; grid-template-columns: 230px 1fr; gap: 18px; padding: 18px; border-radius: 22px; background: var(--panel); border: 1px solid var(--panelBorder); text-align: left; }
.id-stage { display: grid; place-items: center; border-radius: 18px; background: radial-gradient(circle at 50% 70%, rgba(255,202,40,.22), rgba(0,0,0,.25) 70%); min-height: 240px; }
.id-stage .px-portrait { width: 190px; height: 230px; background: none; box-shadow: none; }
.id-form { display: grid; gap: 10px; align-content: start; }
.id-name { display: grid; gap: 6px; font-weight: 800; }
.id-name input { font-size: 1.25rem; font-weight: 800; padding: 12px 14px; }
.id-sub { font-weight: 800; margin-top: 4px; }
.id-presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; max-height: 220px; overflow: auto; padding: 2px; }
.id-pre { height: 76px; padding: 0; background: rgba(0,0,0,.25); border: 2px solid transparent; border-radius: 14px; overflow: hidden; display: grid; place-items: center; transition: transform .12s, border-color .15s; }
.id-pre:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.3); }
.id-pre.on { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); }
.id-pre .px-portrait { width: 60px; height: 72px; background: none; box-shadow: none; }
.on-join-go { display: flex; justify-content: flex-end; gap: 10px; }
.os-edit { margin-top: 4px; padding: 6px 12px; font-size: .82rem; font-weight: 800; }
.dialog .id-card { grid-template-columns: 170px 1fr; background: none; border: 0; padding: 0; }
.dialog .id-stage .px-portrait { width: 150px; height: 180px; }
@media (max-width: 720px) { .id-card, .dialog .id-card { grid-template-columns: 1fr; } .id-stage { min-height: 180px; } }

.on-fail { max-width: 560px; margin: 30px auto; text-align: center; display: grid; gap: 8px; justify-items: center; padding: 26px; border-radius: 22px; background: var(--panel); border: 1px solid var(--panelBorder); }
.on-fail .of-ico { font-size: 3rem; }
.on-fail h3 { margin: 0; }
.of-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }

/* ===== avisos de ação ===== */
.act-note { position: fixed; top: 128px; left: 50%; transform: translateX(-50%); z-index: 47; display: flex; align-items: center; gap: 12px;
  padding: 8px 22px 8px 8px; border-radius: 999px; background: rgba(10,16,28,.93); border: 3px solid var(--pc, #90a4ae); color: #fff;
  box-shadow: 0 14px 34px rgba(0,0,0,.5); animation: noteIn .35s cubic-bezier(.2,1.3,.4,1) both; pointer-events: none; max-width: 92vw; }
.act-note.out { animation: noteOut .3s ease-in both; }
.act-note .px-portrait { width: 52px; height: 52px; flex: none; background: color-mix(in srgb, var(--pc, #90a4ae) 45%, #000); box-shadow: 0 0 0 3px var(--pc, #fff); }
.act-note .an-ico { font-size: 1.9rem; line-height: 1; }
.act-note .an-txt { display: grid; gap: 1px; min-width: 0; }
.act-note b { font-size: 1.12rem; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act-note small { font-size: .86rem; color: #cfd8dc; font-weight: 700; }
.act-note.buy small { color: #ffe082; } .act-note.good small { color: #a5d6a7; } .act-note.bad small { color: #ff8a80; }
@keyframes noteIn { from { opacity: 0; transform: translate(-50%, -16px) scale(.9); } }
@keyframes noteOut { to { opacity: 0; transform: translate(-50%, -10px) scale(.95); } }
/* ===== prévia de onde vai cair ===== */
.land-label { position: fixed; bottom: 150px; left: 50%; transform: translateX(-50%); z-index: 46; display: flex; align-items: baseline; gap: 10px;
  padding: 8px 18px; border-radius: 999px; background: rgba(10,16,28,.9); border: 2px solid #ffd54f; color: #fff; font-size: 1.05rem;
  box-shadow: 0 0 24px rgba(255,213,79,.35); animation: noteIn .3s both; pointer-events: none; }
.land-label b { color: #ffd54f; font-weight: 900; letter-spacing: .5px; }
.land-label small { color: #cfd8dc; font-weight: 700; }
.land-label.out { animation: noteOut .25s both; }
/* ===== minigames ===== */
#mg { position: fixed; inset: 0; z-index: 140; display: grid; place-items: center; background: radial-gradient(circle at 50% 30%, rgba(40,20,80,.88), rgba(4,8,18,.95)); }
.mg-box { width: min(780px, 96vw); display: grid; gap: 12px; padding: 18px; border-radius: 26px; background: linear-gradient(180deg, #1d2a48, #111a2e);
  border: 2px solid rgba(255,213,79,.4); box-shadow: 0 30px 80px rgba(0,0,0,.6); animation: popIn .4s both; color: #fff; }
.mg-box.small { width: min(560px, 94vw); }
.mg-head { display: flex; align-items: center; gap: 12px; }
.mg-head small { letter-spacing: 3px; font-weight: 900; color: #ffd54f; font-size: .72rem; }
.mg-head h2 { margin: 0; font-family: var(--gm-font); font-weight: 400; font-size: 1.9rem; }
.mg-ico { font-size: 2.6rem; }
.mg-who { margin-left: auto; display: flex; align-items: center; gap: 8px; padding: 4px 14px 4px 4px; border-radius: 999px; background: var(--pc); }
.mg-who .px-portrait { width: 40px; height: 40px; background: rgba(255,255,255,.25); }
.mg-stage { position: relative; min-height: 300px; border-radius: 18px; overflow: hidden; background: rgba(0,0,0,.3); display: grid; place-items: center; }
.mg-canvas { width: 100%; height: auto; display: block; touch-action: none; cursor: crosshair; }
.mg-intro { text-align: center; display: grid; gap: 14px; justify-items: center; padding: 20px; }
.mg-intro p { font-size: 1.15rem; font-weight: 700; margin: 0; max-width: 520px; }
.mg-prize { font-weight: 900; color: #ffd54f; }
.mg-count { font-family: var(--gm-font); font-size: 7rem; color: #fff; text-shadow: 0 8px 0 rgba(0,0,0,.35); animation: popIn .3s both; display: grid; justify-items: center; }
.mg-count.go { color: #69f0ae; } .mg-count.end { font-size: 4.5rem; color: #ffd54f; }
.mg-count small { font-size: 1.6rem; color: #fff; }
.mg-hud { display: flex; align-items: center; gap: 14px; }
.mg-time { flex: 1; height: 12px; border-radius: 99px; background: rgba(255,255,255,.12); overflow: hidden; }
.mg-time i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #ff7043, #ffd54f, #69f0ae); }
.mg-score { font-weight: 900; font-size: 1.1rem; } .mg-score b { color: #ffd54f; font-size: 1.4rem; }
.mg-reflex { width: 100%; min-height: 300px; display: grid; place-items: center; text-align: center; font-size: 1.4rem; font-weight: 800; cursor: pointer; user-select: none; }
.mg-reflex b { font-family: var(--gm-font); font-weight: 400; font-size: 4.5rem; }
.mg-reflex.wait { background: #b71c1c; } .mg-reflex.go { background: #2e7d32; } .mg-reflex.ok { background: #1565c0; } .mg-reflex.bad { background: #4e342e; }
.mg-math { display: grid; gap: 18px; justify-items: center; padding: 20px; width: 100%; }
.mg-math .mq { font-family: var(--gm-font); font-size: 3.2rem; transition: color .15s; }
.mg-math .mq.ok { color: #69f0ae; } .mg-math .mq.bad { color: #ff5252; }
.mg-math .mo { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; width: 100%; }
.mg-math .mo .btn { font-size: 1.5rem; font-weight: 900; padding: 18px; }
.mg-math .mo small { opacity: .5; font-size: .8rem; margin-right: 6px; }
.mg-waiting { display: flex; align-items: center; gap: 12px; justify-content: center; padding: 30px; font-weight: 800; }
.mg-podium { display: grid; gap: 8px; }
.mg-row { display: grid; grid-template-columns: 50px 56px 1fr auto auto; align-items: center; gap: 10px; padding: 6px 12px; border-radius: 16px;
  background: color-mix(in srgb, var(--pc) 22%, rgba(255,255,255,.04)); border: 2px solid var(--pc); animation: popIn .4s both; }
.mg-row .px-portrait { width: 52px; height: 52px; }
.mg-place { font-size: 1.9rem; text-align: center; font-weight: 900; }
.mg-pts { font-weight: 800; color: #cfd8dc; } .mg-won { font-weight: 900; color: #69f0ae; min-width: 70px; text-align: right; }
.mg-box > #mgOk { justify-self: end; min-width: 120px; }

/* modos de jogo */
.mode-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 6px 0 16px; }
.mode-card { display: grid; gap: 4px; justify-items: start; text-align: left; padding: 12px 14px; border-radius: 16px; background: var(--panel); border: 2px solid var(--panelBorder); transition: transform .12s, border-color .15s; }
.mode-card:hover { transform: translateY(-2px); }
.mode-card span { font-size: 1.6rem; } .mode-card b { font-size: 1.02rem; } .mode-card small { color: var(--muted); font-weight: 600; font-size: .78rem; line-height: 1.3; }
.mode-card.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--panel)); }
.mode-pick.compact { margin: 6px 0 4px; } .mode-pick.compact .mode-card small { display: none; }
.mode-chip { display: inline-block; justify-self: start; padding: 3px 12px; border-radius: 99px; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); font-weight: 900; font-size: .85rem; }
@media (max-width: 720px) { .mode-pick { grid-template-columns: 1fr; } }

/* progressão no fim da partida */
.prog-fx { position: fixed; inset: 0; z-index: 130; display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, rgba(30,40,90,.88), rgba(4,8,18,.95)); animation: fadeIn .3s both; }
.prog-fx.out { animation: noteOut .3s both; }
.pf-box { width: min(620px, 94vw); display: grid; gap: 16px; padding: 24px; border-radius: 26px; background: linear-gradient(180deg, #1d2a48, #111a2e); border: 2px solid rgba(255,213,79,.4); box-shadow: 0 30px 80px rgba(0,0,0,.6); text-align: center; }
.pf-title { font-family: var(--gm-font); font-size: 2rem; color: #ffd54f; }
.pf-row { display: flex; align-items: center; gap: 16px; }
.pf-lvl { flex: none; width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; font-family: var(--gm-font); font-size: 2.2rem; color: #1a1a1a;
  background: radial-gradient(circle at 35% 30%, #fff59d, #ffb300); box-shadow: 0 0 0 4px #fff3, 0 8px 20px rgba(0,0,0,.4); }
.pf-lvl.pop { animation: lvlPop .7s cubic-bezier(.2,1.6,.4,1); }
@keyframes lvlPop { 0% { transform: scale(1); } 40% { transform: scale(1.5) rotate(-8deg); box-shadow: 0 0 0 10px #ffd54f66, 0 0 50px #ffd54f; } 100% { transform: scale(1); } }
.pf-bar-wrap { flex: 1; display: grid; gap: 6px; text-align: left; }
.pf-bar { height: 22px; border-radius: 99px; background: rgba(255,255,255,.12); overflow: hidden; box-shadow: inset 0 2px 4px rgba(0,0,0,.4); }
.pf-bar i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, #69f0ae, #40c4ff); transition: width .08s linear; box-shadow: 0 0 14px #40c4ff; }
.pf-nums { display: flex; justify-content: space-between; font-weight: 800; font-size: .9rem; color: #cfd8dc; }
.pf-nums span:first-child { color: #69f0ae; font-size: 1.1rem; }
.pf-coins { font-size: 1.6rem; font-weight: 900; } .pf-add { color: #ffd54f; font-size: 1.1rem; margin-left: 6px; }
.pf-up { min-height: 1.6rem; } .pf-up span { display: inline-block; font-family: var(--gm-font); font-size: 1.7rem; color: #ffd54f; animation: popIn .5s both; text-shadow: 0 0 20px rgba(255,213,79,.6); }
.pf-ul-title { font-weight: 900; font-size: 1.2rem; margin-bottom: 8px; }
.pf-ul-grid { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.pf-item { width: 92px; display: grid; gap: 4px; justify-items: center; font-size: .75rem; font-weight: 800; animation: cardFlipIn .5s cubic-bezier(.2,1.3,.4,1) both; }
.pf-thumb { width: 84px; height: 84px; border-radius: 16px; overflow: hidden; display: grid; place-items: center; background: rgba(255,255,255,.08); border: 2px solid #ffd54f; box-shadow: 0 0 16px rgba(255,213,79,.35); font-size: 2.6rem; }
.pf-thumb > * { max-width: 100%; max-height: 100%; }
.pf-item.more { width: 84px; height: 84px; place-content: center; border-radius: 16px; background: rgba(255,255,255,.08); font-size: 1.3rem; }
@keyframes cardFlipIn { from { opacity: 0; transform: perspective(500px) rotateY(90deg) scale(.6); } }
.pf-skip { color: var(--muted); }

.mode-pick { display: grid; gap: 10px; grid-template-columns: 1fr; }
.mode-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mode-rules { padding: 12px 16px; border-radius: 14px; background: rgba(0,0,0,.22); border: 1px solid var(--panelBorder); text-align: left; animation: fadeIn .25s; }
.mode-rules ul { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 4px; font-size: .9rem; color: #dfe7ee; }
.dialog .mode-card small { display: block; }
@media (max-width: 720px) { .mode-cards { grid-template-columns: 1fr; } }

.danger-row { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.danger-chip { font-size: .66rem; font-weight: 900; padding: 1px 7px; border-radius: 99px; background: #c62828; color: #fff; animation: dangerPulse 1.2s ease-in-out infinite; }
@keyframes dangerPulse { 50% { background: #ff5252; box-shadow: 0 0 10px #ff5252; } }

/* venda para cobrir dívida */
.sell-dlg { width: min(760px, 94vw); max-height: 88vh; overflow: auto; padding: 18px 20px; }
.sell-ui { display: grid; gap: 12px; }
.sell-head { display: flex; gap: 12px; align-items: center; }
.sell-head .sh-ico { font-size: 2.4rem; }
.sell-head h3 { margin: 0; font-size: 1.4rem; } .sell-head p { margin: 2px 0 0; color: var(--muted); font-weight: 600; font-size: .9rem; }
.sell-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sell-stats > div { padding: 8px 12px; border-radius: 12px; background: rgba(0,0,0,.25); display: grid; }
.sell-stats small { color: var(--muted); font-weight: 700; font-size: .75rem; } .sell-stats b { font-size: 1.25rem; } .sell-stats b.bad { color: #ff8a80; }
.sell-bar { position: relative; height: 26px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.sell-bar i { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, #ff7043, #ffca28); transition: width .25s; border-radius: 99px; }
.sell-bar i.ok { background: linear-gradient(90deg, #43a047, #69f0ae); }
.sell-bar span { position: relative; display: block; text-align: center; line-height: 26px; font-weight: 900; font-size: .85rem; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.sell-tools { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sell-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.sell-card { position: relative; display: grid; gap: 2px; text-align: left; padding: 14px 10px 10px; border-radius: 14px; overflow: hidden; background: rgba(255,255,255,.06); border: 2px solid rgba(255,255,255,.1); transition: transform .12s, border-color .15s, background .15s; }
.sell-card:hover { transform: translateY(-2px); }
.sell-card .sc-band { position: absolute; left: 0; right: 0; top: 0; height: 6px; background: var(--gc); }
.sell-card b { font-size: .98rem; } .sell-card small { color: var(--muted); font-weight: 700; font-size: .72rem; }
.sell-card .sc-lvl { font-size: .78rem; font-weight: 800; color: #cfd8dc; }
.sell-card .sc-val { font-weight: 900; color: #69f0ae; font-size: 1.05rem; }
.sell-card .sc-check { position: absolute; top: 10px; right: 8px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: .8rem; background: rgba(255,255,255,.1); color: transparent; }
.sell-card.on { border-color: var(--gc); background: color-mix(in srgb, var(--gc) 22%, rgba(255,255,255,.04)); }
.sell-card.on .sc-check { background: #43a047; color: #fff; }
.sell-actions { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.sell-actions .btn.primary small { font-weight: 700; opacity: .75; }
.btn.danger.ghost { background: transparent; border: 1px solid #c62828; color: #ff8a80; }
@media (max-width: 560px) { .sell-stats { grid-template-columns: 1fr; } }

/* ===== arenas dos minigames ===== */
#mg.arena { background: radial-gradient(circle at 50% 20%, #2a1b5c, #070b16 80%); }
.mg-intro-card { width: min(860px, 96vw); display: grid; gap: 14px; justify-items: center; text-align: center; padding: 24px; border-radius: 28px;
  background: linear-gradient(180deg, #1d2a48, #111a2e); border: 2px solid rgba(255,213,79,.45); box-shadow: 0 30px 80px rgba(0,0,0,.6); animation: popIn .4s both; color: #fff; }
.mgi-head { display: flex; align-items: center; gap: 14px; text-align: left; }
.mgi-head small { letter-spacing: 3px; font-weight: 900; color: #ffd54f; font-size: .75rem; }
.mgi-head h2 { margin: 0; font-family: var(--gm-font); font-weight: 400; font-size: 2.4rem; }
.mgi-how { margin: 0; font-size: 1.12rem; font-weight: 700; max-width: 640px; }
.mgi-vs { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; }
.mgi-p { display: grid; justify-items: center; gap: 4px; animation: popIn .4s both; }
.mgi-p .px-portrait { width: 86px; height: 86px; }
.mgi-p b { font-size: .9rem; color: var(--pc); }
.mgi-x { font-family: var(--gm-font); font-size: 1.6rem; color: #ff5252; text-shadow: 0 3px 0 rgba(0,0,0,.4); }
.arena-wrap { width: min(1100px, 98vw); display: grid; gap: 8px; }
.arena-top { display: flex; align-items: center; gap: 10px; color: #fff; flex-wrap: wrap; }
.arena-top b { font-family: var(--gm-font); font-weight: 400; font-size: 1.4rem; }
.arena-top .mg-ico { font-size: 1.8rem; }
.arena-top .mg-time { flex: 1; min-width: 120px; }
.arena-board { display: flex; gap: 6px; flex-wrap: wrap; }
.ab-chip { padding: 3px 10px; border-radius: 99px; background: rgba(10,16,28,.85); border: 2px solid var(--pc); font-weight: 800; font-size: .85rem; }
.ab-chip.me { background: color-mix(in srgb, var(--pc) 40%, #0a101c); }
.ab-chip b { color: #ffd54f; }
#mgCanvas { width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 18px; display: block; touch-action: none; box-shadow: 0 20px 60px rgba(0,0,0,.6); cursor: crosshair; image-rendering: auto; }
.arena-pad { display: flex; gap: 10px; justify-content: center; }
.arena-pad:empty { display: none; }
.arena-pad button { min-width: 74px; padding: 14px 18px; font-size: 1.3rem; font-weight: 900; border-radius: 16px; background: rgba(255,255,255,.12); border: 2px solid rgba(255,255,255,.25); color: #fff; touch-action: manipulation; }
.arena-pad button:active { background: rgba(255,213,79,.4); }
@media (pointer: fine) { .arena-pad { opacity: .55; } }

.body-pick.phys { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.body-pick.phys .body-card small { display: block; font-size: .66rem; color: var(--muted); }
.body-card.locked { opacity: .7; }

/* globo do logo com a Terra de verdade */
.gm-globe { background: radial-gradient(circle at 50% 50%, #1e63c6, #0a2c6e) !important; }
.gm-globe i { display: none; }
.gm-globe .logo-earth { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; image-rendering: auto; }

.build-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.bm-card { display: grid; gap: 2px; justify-items: start; text-align: left; padding: 12px 14px; border-radius: 16px; background: var(--panel); border: 2px solid var(--panelBorder); }
.bm-card span { font-size: 1.5rem; } .bm-card b { font-size: 1rem; } .bm-card small { color: var(--muted); font-weight: 600; }
.bm-card.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--panel)); }

.acc-chip { padding: 8px 14px; border-radius: 99px; background: rgba(255,255,255,.08); border: 1px solid var(--panelBorder); font-weight: 800; font-size: .85rem; color: #e3f2fd; }
.acc-chip.on { border-color: #69f0ae; color: #b9f6ca; }
.acc-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.acc-opt { display: grid; gap: 4px; padding: 14px; border-radius: 14px; background: var(--panel); border: 2px solid var(--panelBorder); text-align: left; }
.acc-opt:hover { border-color: var(--accent); } .acc-opt span { color: var(--muted); font-size: .85rem; font-weight: 700; }
.gsi-box { min-height: 50px; display: grid; place-items: center; margin: 12px 0; }

.dice-img { display: inline-block; border-radius: 22%; background-size: cover; background-position: center; box-shadow: inset 0 0 0 2px rgba(0,0,0,.3), 0 3px 8px rgba(0,0,0,.35); }

/* ===== Personalização: layout limpo (prévia à esquerda, categorias em abas no topo, opções em cartões) ===== */
.cz-main { grid-template-columns: 330px 1fr; grid-template-rows: auto 1fr; grid-template-areas: "stage rail" "stage panel"; gap: 12px 18px; }
.cz-stage { grid-area: stage; }
.cz-rail { grid-area: rail; flex-direction: row; gap: 6px; overflow-x: auto; overflow-y: hidden; padding: 4px 2px 6px; scrollbar-width: thin; }
.rail-btn { flex: 0 0 auto; flex-direction: column; gap: 4px; padding: 8px 12px 7px; min-width: 78px; justify-content: center; text-align: center; font-size: .78rem; border-radius: 14px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); }
.rail-btn:hover { transform: translateY(-2px); }
.rail-btn .ri { width: 34px; height: 34px; border-radius: 11px; font-size: 1.15rem; }
.rail-btn.on { background: linear-gradient(180deg, rgba(255,202,40,.22), rgba(255,202,40,.08)); border-color: rgba(255,202,40,.7); box-shadow: 0 4px 14px rgba(255,202,40,.15); }
.cz-panel { grid-area: panel; padding: 16px 20px 90px; }
.build-mode { grid-template-columns: auto auto; justify-content: start; gap: 6px; margin-bottom: 14px; background: rgba(0,0,0,.25); padding: 4px; border-radius: 14px; width: max-content; max-width: 100%; }
.bm-card { grid-auto-flow: column; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 11px; border: 0; background: none; }
.bm-card span { font-size: 1.1rem; } .bm-card b { font-size: .9rem; } .bm-card small { display: none; }
.bm-card.on { background: linear-gradient(180deg, #ffe066, #ffb300); color: #3a1f00; box-shadow: 0 2px 0 #b35c00; }
.panel-head { align-items: center; padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,.08); }
.panel-head h3 { font-size: 1.25rem; }
.grid-title { display: flex; align-items: center; gap: 10px; margin: 18px 0 10px; color: #d7e3f4; font-size: .8rem; font-weight: 900; }
.grid-title::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(255,255,255,.18), transparent); }
.opt-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.opt { position: relative; padding: 6px 6px 8px; border-radius: 16px; border: 2px solid transparent; background: rgba(255,255,255,.055); gap: 6px; transition: transform .15s, border-color .15s, background .15s; }
.opt:hover { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.22); }
.opt-thumb { min-height: 0; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: radial-gradient(circle at 50% 35%, #3a5d8f, #1a2c48); }
.opt-thumb .px-portrait { width: 100%; height: 100%; border-radius: 0; background: none; box-shadow: none; }
.opt.sel { border-color: var(--good); background: rgba(105,240,174,.1); }
.opt.sel::after { content: '✓'; position: absolute; top: -7px; left: -7px; width: 24px; height: 24px; border-radius: 50%; background: var(--good); color: #063; font-weight: 900; font-size: .8rem; display: grid; place-items: center; box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.opt.sel .opt-state.ok { display: none; }
.opt-name { font-size: .78rem; text-align: center; }
.opt-state { justify-content: center; gap: 3px; background: rgba(0,0,0,.3); padding: 2px 8px; border-radius: 99px; }
.part-thumb { width: 100%; height: 100%; background-size: contain; background-repeat: no-repeat; background-position: center; image-rendering: pixelated; }
.part-thumb.z-eyes, .part-thumb.z-mouth { background-size: 92%; }
.sw-row { gap: 10px; }
.sw { width: 34px; height: 34px; }
@media (max-width: 900px) {
  .cz-main { grid-template-columns: 1fr; grid-template-areas: "stage" "rail" "panel"; }
}

/* ===== Progressão ===== */
.prog-page .topbar { margin-bottom: 10px; }
.prog-hero { display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center; padding: 20px 24px; border-radius: 24px;
  background: radial-gradient(circle at 0% 0%, rgba(255,202,40,.18), transparent 50%), linear-gradient(135deg, rgba(41,98,255,.25), rgba(124,77,255,.18)); border: 1px solid rgba(255,255,255,.12); box-shadow: 0 12px 30px rgba(0,0,0,.25); }
.ph-level { position: relative; width: 120px; height: 120px; }
.ph-level svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ph-level circle { fill: none; stroke-width: 10; }
.ph-level .bg { stroke: rgba(255,255,255,.12); }
.ph-level .fg { stroke: #ffca28; stroke-linecap: round; stroke-dasharray: 327; filter: drop-shadow(0 0 6px rgba(255,202,40,.6)); transition: stroke-dashoffset .8s; }
.ph-level div { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ph-level small { font-size: .7rem; font-weight: 900; letter-spacing: 2px; color: #ffe082; }
.ph-level b { font-family: var(--gm-font); font-size: 2.8rem; line-height: 1; }
.ph-main { display: grid; gap: 10px; min-width: 0; }
.ph-name { display: flex; align-items: center; gap: 12px; }
.ph-name h3 { margin: 0; font-size: 1.4rem; }
.ph-face { width: 52px !important; height: 52px !important; border-radius: 14px; }
.ph-title { display: inline-block; margin-top: 2px; padding: 2px 10px; border-radius: 99px; background: rgba(255,202,40,.18); color: #ffe082; font-weight: 800; font-size: .78rem; }
.ph-xp { display: grid; gap: 4px; } .ph-xp span { font-size: .82rem; font-weight: 700; color: #c5d3e8; }
.xpbar.big { height: 14px; }
.ph-stats { display: flex; gap: 8px; flex-wrap: wrap; }
.ph-stats div { padding: 6px 12px; border-radius: 12px; background: rgba(0,0,0,.25); display: grid; text-align: center; min-width: 82px; }
.ph-stats b { font-size: 1.05rem; } .ph-stats small { font-size: .68rem; color: var(--muted); font-weight: 700; }
.ph-next { display: grid; justify-items: center; gap: 4px; padding: 12px 16px; border-radius: 18px; background: rgba(0,0,0,.28); border: 1px dashed rgba(255,202,40,.5); min-width: 150px; text-align: center; }
.ph-next small { font-size: .66rem; letter-spacing: 1.5px; font-weight: 900; color: #ffe082; }
.ph-next span { font-size: .78rem; font-weight: 700; }
.ph-next-items { display: flex; gap: 6px; }
.prog-tabs, .ach-cats { display: flex; gap: 6px; margin: 18px 0 14px; flex-wrap: wrap; }
.prog-tabs button, .ach-cats button { padding: 9px 16px; border-radius: 99px; font-weight: 800; background: rgba(255,255,255,.06); color: #c5d3e8; border: 1px solid rgba(255,255,255,.1); }
.prog-tabs button.on { background: linear-gradient(180deg, #ffe066, #ffb300); color: #3a1f00; border-color: transparent; box-shadow: 0 3px 0 #b35c00; }
.ach-cats { margin-top: 0; } .ach-cats button { padding: 6px 12px; font-size: .82rem; }
.ach-cats button.on { background: rgba(255,255,255,.18); color: #fff; border-color: rgba(255,255,255,.4); }
.prog-tabs em, .ach-cats em { font-style: normal; opacity: .7; font-size: .8em; margin-left: 4px; }
.route-nav { display: flex; gap: 8px; justify-content: flex-end; margin-bottom: 6px; }
.route { display: flex; gap: 0; overflow-x: auto; padding: 18px 8px 16px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.rnode { position: relative; flex: 0 0 150px; display: grid; justify-items: center; gap: 10px; scroll-snap-align: center; }
.rnode::before { content: ''; position: absolute; top: 17px; left: 0; right: 0; height: 6px; background: rgba(255,255,255,.12); z-index: 0; }
.rnode.done::before { background: linear-gradient(90deg, #ffca28, #ffb300); }
.rn-dot { position: relative; z-index: 1; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: .85rem; background: #1d2b44; border: 3px solid rgba(255,255,255,.25); }
.rnode.done .rn-dot { background: #ffb300; border-color: #fff3c4; color: #3a1f00; }
.rnode.current .rn-dot { background: #2962ff; border-color: #fff; box-shadow: 0 0 0 6px rgba(41,98,255,.35); animation: rnPulse 1.6s infinite; }
@keyframes rnPulse { 50% { box-shadow: 0 0 0 11px rgba(41,98,255,.12); } }
.rn-card { width: 136px; display: grid; justify-items: center; gap: 6px; padding: 10px 8px; border-radius: 16px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); text-align: center; }
.rnode.done .rn-card { background: rgba(255,202,40,.08); border-color: rgba(255,202,40,.35); }
.rnode.current .rn-card { background: rgba(41,98,255,.16); border-color: #82b1ff; transform: translateY(-3px); box-shadow: 0 10px 22px rgba(0,0,0,.3); }
.rnode.mile .rn-card { border-width: 2px; border-color: rgba(224,64,251,.6); background: linear-gradient(180deg, rgba(224,64,251,.16), rgba(255,255,255,.04)); }
.rnode:not(.done):not(.current) .tr-thumbs { filter: saturate(.55) brightness(.8); }
.rn-card b { font-size: .86rem; }
.rn-names { font-size: .7rem; color: #c5d3e8; font-weight: 700; min-height: 2.4em; line-height: 1.2; }
.rn-coins { font-size: .78rem; font-weight: 900; color: #ffe082; display: flex; align-items: center; gap: 3px; }
.rn-bar { width: 100%; height: 6px; border-radius: 99px; background: rgba(255,255,255,.15); overflow: hidden; } .rn-bar i { display: block; height: 100%; background: #82b1ff; }
.tr-empty { height: 48px; display: grid; place-items: center; font-size: 26px; opacity: .6; }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.achc { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 14px; border-radius: 18px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); }
.achc.got { background: linear-gradient(135deg, color-mix(in srgb, var(--tc) 18%, transparent), rgba(255,255,255,.03)); border-color: color-mix(in srgb, var(--tc) 60%, transparent); }
.ac-medal { position: relative; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 1.9rem;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--tc) 70%, white), var(--tc) 55%, color-mix(in srgb, var(--tc) 60%, black)); box-shadow: inset 0 -4px 0 rgba(0,0,0,.25), 0 4px 10px rgba(0,0,0,.3); }
.achc:not(.got) .ac-medal { filter: grayscale(1) brightness(.55); }
.ac-medal i { position: absolute; right: -2px; bottom: -2px; font-style: normal; font-size: .9rem; background: #111a2a; border-radius: 50%; padding: 3px; }
.ac-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.ac-top b { font-size: .98rem; }
.ac-tier { font-size: .66rem; font-weight: 900; letter-spacing: 1px; text-transform: uppercase; color: var(--tc); }
.achc p { margin: 3px 0 6px; font-size: .8rem; color: #c5d3e8; }
.ac-prog { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; margin-bottom: 6px; } .ac-prog small { font-weight: 800; font-size: .72rem; }
.ac-foot { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: .74rem; font-weight: 800; }
.ac-coins { display: inline-flex; align-items: center; gap: 3px; color: #ffe082; background: rgba(0,0,0,.25); padding: 2px 8px; border-radius: 99px; }
.ac-item { background: rgba(255,255,255,.08); padding: 2px 8px; border-radius: 99px; }
.ac-date { color: var(--good); margin-left: auto; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.statc { display: grid; gap: 2px; padding: 14px 16px; border-radius: 18px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); }
.statc span { font-size: 1.4rem; } .statc b { font-size: 1.5rem; font-family: var(--gm-font); font-weight: 400; } .statc small { color: var(--muted); font-weight: 700; }
@media (max-width: 820px) { .prog-hero { grid-template-columns: 1fr; justify-items: center; text-align: center; } .ph-name { justify-content: center; } .ph-stats { justify-content: center; } }
