@font-face { font-family: 'Fredoka'; font-weight: 400; font-display: swap; src: url('fredoka-400.woff2') format('woff2'); }
@font-face { font-family: 'Fredoka'; font-weight: 500; font-display: swap; src: url('fredoka-500.woff2') format('woff2'); }
@font-face { font-family: 'Fredoka'; font-weight: 600; font-display: swap; src: url('fredoka-600.woff2') format('woff2'); }

/* O jogo tem só tema claro. Isto impede o escurecimento automático do browser
   (Chrome no Android, Samsung Internet, Safari) e mantém os campos de texto claros. */
:root { color-scheme: light only; }
html, body, input, textarea, button, select { color-scheme: light only; forced-color-adjust: none; }

:root {
  --cream: #fff4de;
  --card: #fffbf2;
  --line: #ebddc3;
  --ink: #4a3226;
  --ink-soft: #7a6250;
  --green: #2f9d58;
  --green-dark: #22743f;
  --green-soft: #e3f3e8;
  --coin: #ffb020;
  --coin-dark: #c77f00;
  --shard: #9b6bff;
  --shard-dark: #6f45d8;
  --off-bg: #efe3cc;
  --off-ink: #a28e78;
  --off-edge: #dccaa8;
  --danger: #c8553d;
  --shadow: 0 4px 0 rgba(74, 50, 38, 0.22);
  --r-panel: 22px;
  --r-card: 16px;
  --r-btn: 12px;
  --fs-xs: 12px;
  --fs-sm: 14px;
  --fs-md: 16px;
  --fs-lg: 20px;
  --fs-xl: 30px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%; overflow: hidden; background: #bfe6f5;
  font-family: 'Fredoka', system-ui, sans-serif; color: var(--ink);
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none; touch-action: manipulation; -webkit-text-size-adjust: 100%;
}
button, input, a, .modal-card, #panel { touch-action: manipulation; }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible { outline: 3px solid var(--shard); outline-offset: 2px; }
[hidden] { display: none !important; }

#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
#floaters, #labels { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }

/* ---------- ícones ---------- */
.coin-icon {
  display: inline-block; width: 26px; height: 26px; border-radius: 50%; flex: none;
  background: var(--coin); border: 3px solid var(--coin-dark);
  box-shadow: inset 3px 3px 0 rgba(255, 255, 255, 0.55);
}
.coin-icon.sm { width: 15px; height: 15px; border-width: 2px; box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.5); }
.shard-icon {
  display: inline-block; width: 18px; height: 22px; flex: none; background: var(--shard);
  clip-path: polygon(50% 0, 100% 38%, 50% 100%, 0 38%);
}
.ore-gem {
  display: inline-block; width: 20px; height: 20px; flex: none; background: var(--ore);
  clip-path: polygon(50% 0, 100% 30%, 100% 70%, 50% 100%, 0 70%, 0 30%);
}
.ore-gem.dim { opacity: 0.4; }

/* ---------- HUD ---------- */
#hud {
  position: fixed; top: max(10px, env(safe-area-inset-top)); left: 10px; right: 10px;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; pointer-events: none;
}
.hud-card {
  pointer-events: auto; background: var(--cream); border: 3px solid var(--ink); border-radius: 18px;
  padding: 6px 16px 6px 10px; box-shadow: var(--shadow); min-width: 150px;
}
.coin-row { display: flex; align-items: center; gap: 8px; }
#coins { font-size: var(--fs-xl); font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.income-row { display: flex; align-items: center; gap: 8px; padding-left: 34px; }
.income { font-size: var(--fs-sm); color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.shard-chip { display: inline-flex; align-items: center; gap: 3px; font-size: var(--fs-sm); font-weight: 600; color: var(--shard-dark); }
.offline-rate { font-size: var(--fs-xs); color: var(--ink-soft); padding-left: 34px; font-variant-numeric: tabular-nums; min-height: 15px; }
.offline-rate:empty { display: none; }
.shard-icon.sm { width: 12px; height: 15px; vertical-align: -2px; }
.key-icon {
  --kc: var(--coin); --kd: var(--coin-dark);
  display: inline-block; width: 18px; height: 18px; flex: none; vertical-align: -3px;
  background: radial-gradient(circle at 34% 34%, transparent 0 3px, var(--kc) 3.5px 6px, transparent 6.5px),
    linear-gradient(var(--kc), var(--kc)) 9px 7px / 9px 4px no-repeat,
    linear-gradient(var(--kc), var(--kc)) 13px 10px / 3px 5px no-repeat;
  filter: drop-shadow(1px 1px 0 var(--kd));
}
.key-icon.key-wood { --kc: #c98a4a; --kd: #6b4a32; }
.key-icon.key-gold { --kc: #ffc53d; --kd: #b07400; }
.key-icon.key-star { --kc: #b894ff; --kd: #4a2a9a; }
.dust-icon {
  display: inline-block; width: 16px; height: 16px; flex: none; vertical-align: -3px;
  background: radial-gradient(circle at 30% 60%, #7fe3f0 0 3px, transparent 3.5px), radial-gradient(circle at 65% 35%, #b894ff 0 3.5px, transparent 4px),
    radial-gradient(circle at 70% 75%, #ff8fb1 0 2.5px, transparent 3px);
}
.fab-col { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: auto; }
.icon-btn { position: relative; }
.icon-btn svg { width: 26px; height: 26px; }
.fab-exp .shard-icon { width: 20px; height: 25px; }
.fab-exp.glow { background: #efe4ff; animation: glow 1.6s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 4px 0 rgba(74, 50, 38, 0.22), 0 0 0 5px rgba(155, 107, 255, 0.35); } }
.fab-badge {
  position: absolute; right: -8px; top: -8px; min-width: 24px; height: 22px; padding: 0 6px; border-radius: 99px;
  background: var(--shard); color: #fff; font-size: var(--fs-xs); font-weight: 600; display: grid; place-items: center;
  border: 2px solid var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.fab-dot { position: absolute; right: -5px; top: -5px; width: 16px; height: 16px; border-radius: 50%; background: var(--danger); border: 2px solid var(--ink); }
.hud-right { display: flex; gap: 8px; align-items: center; pointer-events: auto; }
.shard-badge {
  display: flex; align-items: center; gap: 6px; background: var(--cream); border: 3px solid var(--ink);
  border-radius: 999px; padding: 4px 12px 4px 8px; box-shadow: var(--shadow); font-weight: 600;
}
.icon-btn {
  width: 48px; height: 48px; border-radius: 14px; border: 3px solid var(--ink); background: var(--cream);
  box-shadow: var(--shadow); display: grid; place-items: center; padding: 0;
}
.icon-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(74, 50, 38, 0.22); }
.icon-btn svg { width: 24px; height: 24px; }

.boosts { position: fixed; top: calc(max(10px, env(safe-area-inset-top)) + 96px); left: 10px; display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
.boost-pill {
  display: flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px;
  border: 3px solid var(--ink); font-weight: 600; font-size: var(--fs-sm); box-shadow: var(--shadow);
  font-variant-numeric: tabular-nums;
}
.boost-pill.frenzy { background: var(--coin); }
.boost-pill.ad { background: #cfe8ff; }
.boost-pill.tap { background: #ffe27a; }
.boost-pill.turbo { background: #ffc9a8; }
.boost-pill.sale { background: var(--green-soft); }

/* ---------- painel ---------- */
#panel {
  position: fixed; left: 8px; right: 8px; bottom: max(8px, env(safe-area-inset-bottom));
  height: min(46vh, 430px); display: flex; flex-direction: column;
  background: var(--cream); border: 3px solid var(--ink); border-radius: var(--r-panel); box-shadow: var(--shadow);
  transition: height 0.25s ease;
}
#panel.collapsed { height: 64px; }
#panel.collapsed .panel-body { visibility: hidden; }
.panel-head { display: flex; align-items: center; gap: 8px; padding: 10px 10px 8px; border-bottom: 2px solid var(--line); }
.segmented { display: flex; background: var(--off-bg); border-radius: 12px; padding: 3px; }
.segmented button {
  border: 0; background: transparent; border-radius: 9px; padding: 6px 12px; font-weight: 600;
  font-size: var(--fs-sm); color: var(--ink-soft); min-width: 46px; min-height: 36px;
}
.segmented button[aria-pressed='true'] { background: var(--ink); color: var(--cream); }
.head-spacer { flex: 1; }
.ad-btn {
  border: 3px solid var(--ink); background: #cfe8ff; border-radius: 12px; padding: 5px 10px;
  font-size: var(--fs-xs); font-weight: 600; line-height: 1.15; max-width: 170px; text-align: left; box-shadow: 0 3px 0 rgba(74, 50, 38, 0.22);
}
.panel-toggle { width: 40px; height: 40px; border-radius: 12px; border: 0; background: var(--off-bg); display: grid; place-items: center; padding: 0; }
.panel-toggle svg { width: 20px; height: 20px; transition: transform 0.2s; }
#panel.collapsed .panel-toggle svg { transform: rotate(180deg); }

.panel-body { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 10px; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }

.card { background: var(--card); border: 2px solid var(--line); border-radius: var(--r-card); padding: 10px 12px 12px; }
.card h3 { margin: 0; font-size: var(--fs-md); font-weight: 600; }
.card .sub { margin: 2px 0 0; font-size: var(--fs-sm); color: var(--ink-soft); }
.card header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.card header h3 { flex: 1; }
.focus-btn { display: grid; width: 34px; height: 34px; margin: -4px -4px -4px 0; border-radius: 10px; border: 0; background: var(--off-bg); place-items: center; padding: 0; }
.focus-btn svg { width: 18px; height: 18px; }
.focus-btn[aria-pressed='true'] { background: var(--coin); }
.zone-income { font-weight: 600; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.card.flash { animation: flash 0.9s ease; }
@keyframes flash { 0%, 100% { border-color: var(--line); } 30% { border-color: var(--coin); box-shadow: 0 0 0 4px rgba(255, 176, 32, 0.35); } }

.card-pick { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; }
.card-pick .buy { min-width: 128px; }

.miner-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: var(--fs-sm); margin-bottom: 8px; }
.milestone { display: flex; align-items: center; gap: 6px; color: var(--ink-soft); font-size: var(--fs-xs); }
.bar { width: 70px; height: 8px; background: var(--off-bg); border-radius: 99px; overflow: hidden; }
.bar i, .progress i { display: block; height: 100%; width: 0; background: var(--green); border-radius: 99px; transition: width 0.2s; }
.progress { height: 10px; background: var(--off-bg); border-radius: 99px; overflow: hidden; margin: 8px 0; }
.progress i { background: var(--coin); }

.actions { display: grid; grid-template-columns: 1.15fr 1fr; gap: 8px; }

.buy {
  border: 0; border-radius: var(--r-btn); min-height: 54px; padding: 6px 10px 5px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  background: var(--off-bg); color: var(--off-ink); border-bottom: 4px solid var(--off-edge);
  transition: transform 0.05s;
}
.buy .buy-label { font-size: var(--fs-sm); font-weight: 500; line-height: 1.1; }
.buy .buy-cost { display: flex; align-items: center; gap: 5px; font-size: var(--fs-md); font-weight: 600; font-variant-numeric: tabular-nums; }
.buy:active { transform: translateY(2px); border-bottom-width: 2px; margin-bottom: 2px; }
.buy.can.primary, .buy.can.pick { background: var(--green); color: #fff; border-bottom-color: var(--green-dark); }
.buy.can.secondary { background: var(--green-soft); color: var(--green-dark); border-bottom-color: #a9d9b8; }
.buy.can.unlock { background: var(--coin); color: var(--ink); border-bottom-color: var(--coin-dark); }
.buy.can.prestige { background: var(--shard); color: #fff; border-bottom-color: var(--shard-dark); }
.buy.wide { width: 100%; }
.buy.denied { animation: denied 0.25s; }
@keyframes denied { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.buy.pulse { animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(47, 157, 88, 0.35); } }

.locked-far { display: flex; align-items: center; gap: 10px; opacity: 0.75; }
.locked-far h3 { font-size: var(--fs-sm); }
.expedition header .shard-icon { width: 16px; height: 20px; }

/* ---------- etiquetas no mundo ---------- */
.zone-label {
  position: absolute; left: 0; top: 0; pointer-events: none;
  background: var(--cream); border: 3px solid var(--ink); border-radius: 999px; box-shadow: var(--shadow);
  padding: 4px 12px 4px 6px; display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: var(--fs-sm);
  white-space: nowrap; will-change: transform; transition: opacity 0.2s;
}
.zone-label.off { opacity: 0; }
.zone-label .lock { width: 22px; height: 22px; border-radius: 50%; background: var(--ink); display: grid; place-items: center; }
.zone-label .lock svg { width: 12px; height: 12px; }

/* ---------- números flutuantes ---------- */
.floater {
  position: absolute; left: 0; top: 0; font-weight: 600; font-size: 20px; color: #ffd35a; white-space: nowrap;
  -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill; will-change: transform, opacity;
}
.floater-crit { color: #ff8a3d; font-size: 26px; }
.floater-big { color: #ffe27a; font-size: 30px; }
.floater-damage { color: #fff; font-size: 16px; }

/* ---------- tutorial ---------- */
#tutorial { position: fixed; inset: 0; pointer-events: none; }
.tap-ring { position: absolute; left: 0; top: 0; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; border: 4px solid #fff; animation: ring 1.1s ease-out infinite; }
@keyframes ring { from { transform: scale(0.5); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }
.tip {
  position: absolute; left: 0; top: 0; transform: translate(-50%, -100%); background: var(--ink); color: var(--cream);
  padding: 8px 14px; border-radius: 12px; font-weight: 500; font-size: var(--fs-md); white-space: nowrap; box-shadow: var(--shadow);
}
.tip::after { content: ''; position: absolute; left: 50%; bottom: -8px; margin-left: -8px; border: 8px solid transparent; border-bottom: 0; border-top-color: var(--ink); }

/* ---------- toasts ---------- */
#toasts { position: fixed; top: calc(max(10px, env(safe-area-inset-top)) + 96px); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; z-index: 5; }
.toast {
  background: var(--ink); color: var(--cream); padding: 8px 16px; border-radius: 999px; font-weight: 500;
  box-shadow: var(--shadow); animation: toast-in 0.25s ease; white-space: nowrap; font-size: var(--fs-md);
}
.toast.gold { background: var(--coin); color: var(--ink); }
.toast.shard { background: var(--shard); color: #fff; }
.toast.out { opacity: 0; transition: opacity 0.3s; }
@keyframes toast-in { from { transform: translateY(-10px); opacity: 0; } }

/* ---------- janelas ---------- */
#modal {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 10;
  padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  background: rgba(46, 30, 22, 0.45);
}
.modal-card {
  width: min(420px, 100%); max-height: 100%; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; background: var(--cream);
  border: 3px solid var(--ink); border-radius: var(--r-panel); box-shadow: 0 6px 0 rgba(46, 30, 22, 0.35); padding: 18px 18px 16px;
  animation: pop 0.22s ease;
}
@keyframes pop { from { transform: scale(0.9); opacity: 0; } }
.modal-card { position: relative; }
.modal-card.wide { width: min(520px, 100%); }
.modal-card h2 { margin: 0 0 8px; font-size: var(--fs-lg); font-weight: 600; padding-right: 36px; }
.modal-card p { margin: 6px 0; font-size: var(--fs-md); line-height: 1.4; }
.modal-card .muted { color: var(--ink-soft); font-size: var(--fs-sm); }
.modal-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.modal-actions .buy { min-height: 56px; }
.modal-actions .buy .buy-label { font-size: var(--fs-md); font-weight: 600; }
.big-amount { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 34px; font-weight: 600; margin: 12px 0; }
.big-amount .coin-icon { width: 34px; height: 34px; }
.plain-btn { border: 0; background: transparent; min-height: 44px; font-weight: 500; color: var(--ink-soft); }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 2px solid var(--line); }
.toggle { min-width: 104px; min-height: 40px; border-radius: 12px; border: 0; font-weight: 600; background: var(--off-bg); color: var(--ink-soft); }
.toggle[aria-pressed='true'] { background: var(--green); color: #fff; }
.danger-btn { border: 0; border-radius: var(--r-btn); min-height: 46px; background: transparent; color: var(--danger); font-weight: 600; border: 2px solid var(--danger); margin-top: 14px; width: 100%; }
.danger-btn.armed { background: var(--danger); color: #fff; }
.lose-keep { font-size: var(--fs-sm); color: var(--ink-soft); }

/* ---------- carregamento ---------- */
#loading { position: fixed; inset: 0; background: #bfe6f5; display: grid; place-items: center; z-index: 20; transition: opacity 0.4s; }
#loading.done { opacity: 0; pointer-events: none; }
.loading-inner { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.loading-title { font-size: 34px; font-weight: 600; }
.loading-gems { display: flex; gap: 10px; }
.loading-gems span { width: 18px; height: 18px; animation: hop 0.9s ease-in-out infinite; }
.loading-gems span:nth-child(2) { animation-delay: 0.15s; }
.loading-gems span:nth-child(3) { animation-delay: 0.3s; }
.loading-gems span:nth-child(4) { animation-delay: 0.45s; }
@keyframes hop { 50% { transform: translateY(-10px); } }


/* ---------- v2: painel ---------- */
.gate { display: flex; align-items: center; gap: 6px; margin: 6px 0 0; font-size: var(--fs-sm); font-weight: 600; color: var(--shard-dark); }
.gate.met { color: var(--green-dark); }
.more-islands { margin: 2px 0 6px; text-align: center; font-size: var(--fs-sm); color: var(--ink-soft); }
.zone-label .shard-icon.sm { margin-left: 4px; }

/* ---------- v2: janelas ---------- */
/* cabeçalho preso no topo das janelas com scroll */
.modal-head { position: sticky; top: -18px; z-index: 3; margin: -18px -18px 6px; padding: 18px 18px 8px; background: var(--cream); }
.modal-head h2 { margin-bottom: 6px; }
.modal-head .tabs { margin-bottom: 4px; }
.modal-head .wallet { margin-bottom: 8px; }
.modal-x {
  position: absolute; right: 10px; top: 10px; width: 40px; height: 40px; border-radius: 12px; border: 0;
  background: var(--off-bg); font-size: 24px; line-height: 1; display: grid; place-items: center; padding: 0 0 2px;
}
.list-title { margin: 16px 0 6px; font-size: var(--fs-md); font-weight: 600; }
.tier-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.tier-list li { display: grid; grid-template-columns: 14px 50px 1fr; align-items: center; gap: 6px; font-size: var(--fs-sm); padding: 6px 8px; border-radius: 10px; background: var(--off-bg); color: var(--ink-soft); }
.tier-list li b { font-variant-numeric: tabular-nums; color: var(--ink); }
.tier-list li.done { background: var(--green-soft); color: var(--green-dark); }
.exp-gain { background: #f1e9ff; border-radius: var(--r-card); padding: 10px 12px; margin: 10px 0; text-align: center; }
.exp-gain > span { font-size: var(--fs-sm); color: var(--ink-soft); }
.exp-gain .big-amount { margin: 4px 0; }
.exp-gain .progress i { background: var(--shard); }
.big-amount .shard-icon.sm { width: 24px; height: 30px; }
.danger-text { color: var(--danger); width: 100%; }
.danger-text.armed { font-weight: 600; }

.wallet { display: flex; gap: 14px; margin: 4px 0 10px; font-size: var(--fs-md); }
.wallet span { display: inline-flex; align-items: center; gap: 6px; }
.wallet b { font-variant-numeric: tabular-nums; }
.tabs { margin-bottom: 12px; }
.tabs button { flex: 1; position: relative; }
.tab-dot { position: absolute; right: 6px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }

.chest-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chest-card { background: var(--card); border: 2px solid var(--line); border-radius: var(--r-card); padding: 10px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.chest-card h3 { margin: 0; font-size: var(--fs-md); font-weight: 600; }
.chest-card .buy { width: 100%; }
.odds { display: flex; flex-direction: column; gap: 1px; font-size: var(--fs-xs); color: var(--ink-soft); }
.odds span { font-variant-numeric: tabular-nums; }
.odds span::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--rar); margin-right: 5px; }
.chest-art { position: relative; width: 64px; height: 50px; margin: 4px 0; }
.chest-art::before { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 30px; border-radius: 4px 4px 8px 8px; background: var(--chest, #b8763c); border: 3px solid var(--ink); }
.chest-art::after { content: ''; position: absolute; left: 0; right: 0; top: 2px; height: 22px; border-radius: 30px 30px 4px 4px; background: var(--chest-lid, #d08a4a); border: 3px solid var(--ink); }
.chest-art i { position: absolute; left: 50%; top: 18px; width: 14px; height: 14px; margin-left: -7px; border-radius: 3px; background: var(--coin); border: 2px solid var(--ink); z-index: 1; }
.chest-gold .chest-art, .chest-art.chest-gold { --chest: #e8a820; --chest-lid: #ffc94a; }
.chest-gold .chest-art i, .chest-art.chest-gold i { background: #9b6bff; }
.key-shop { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.key-shop p { margin: 0; }

.chest-open { display: flex; flex-direction: column; align-items: center; text-align: center; min-height: 250px; }
.chest-art.big { transform: scale(1.5); margin: 22px 0 10px; animation: shake 0.55s ease-in-out, vanish 0.25s 0.55s forwards; }
@keyframes shake { 20%, 60% { transform: scale(1.5) rotate(-8deg); } 40%, 80% { transform: scale(1.5) rotate(8deg); } }
@keyframes vanish { to { transform: scale(2.2); opacity: 0; height: 0; margin: 0; } }
.reveal { opacity: 0; animation: reveal 0.4s 0.75s ease forwards; display: flex; flex-direction: column; align-items: center; }
@keyframes reveal { from { transform: scale(0.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.reveal .mini { transform: scale(1.6); margin: 18px 0 16px; filter: drop-shadow(0 0 12px var(--rar)); }
.reveal h2 { padding: 0; margin: 2px 0; }
.rar { font-size: var(--fs-xs); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--rar); }

.skin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.skin-card { background: var(--card); border: 2px solid var(--line); border-top: 5px solid var(--rar); border-radius: 14px; padding: 10px 6px 8px; display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; }
.skin-card b { font-size: var(--fs-sm); font-weight: 600; line-height: 1.15; }
.skin-card .bonus { font-size: 12px; color: var(--green-dark); font-weight: 600; line-height: 1.2; }
.skin-card .buy { width: 100%; min-height: 40px; margin-top: 2px; }
.skin-card.missing .mini { filter: grayscale(1) brightness(0.55); opacity: 0.55; }
.skin-card.on { background: var(--green-soft); border-color: var(--green); border-top-color: var(--rar); }

/* mini-mineiro em CSS */
.mini { position: relative; display: block; width: 34px; height: 50px; margin: 4px auto 6px; flex: none; }
.mini .b { position: absolute; left: 5px; right: 5px; bottom: 0; height: 22px; border-radius: 6px 6px 3px 3px; background: var(--shirt); border: 2px solid var(--ink); }
.mini .f { position: absolute; left: 7px; right: 7px; top: 13px; height: 17px; border-radius: 4px; background: #f2c9a0; border: 2px solid var(--ink); box-shadow: inset 0 -5px 0 var(--beard); z-index: 1; }
.mini .h { position: absolute; left: 5px; right: 5px; top: 6px; height: 12px; border-radius: 12px 12px 2px 2px; background: var(--hat); border: 2px solid var(--ink); z-index: 2; }
.mini.hat-cowboy .h { left: -2px; right: -2px; height: 10px; top: 8px; border-radius: 10px 10px 3px 3px; }
.mini.hat-tophat .h { left: 8px; right: 8px; top: -6px; height: 22px; border-radius: 2px; box-shadow: 0 16px 0 -4px var(--hat); }
.mini.hat-chef .h { left: 6px; right: 6px; top: -4px; height: 20px; border-radius: 10px 10px 3px 3px; }
.mini.hat-wizard .h { left: 5px; right: 5px; top: -12px; height: 28px; border-radius: 2px; clip-path: polygon(50% 0, 100% 100%, 0 100%); border: 0; }
.mini.hat-crown .h { top: 3px; height: 13px; border-radius: 2px; clip-path: polygon(0 100%, 0 20%, 25% 60%, 50% 0, 75% 60%, 100% 20%, 100% 100%); border: 0; }
.mini.hat-viking .h::before, .mini.hat-viking .h::after { content: ''; position: absolute; top: -7px; width: 7px; height: 11px; background: #f2efe6; border: 2px solid var(--ink); border-radius: 6px 6px 2px 2px; }
.mini.hat-viking .h::before { left: -8px; transform: rotate(-30deg); }
.mini.hat-viking .h::after { right: -8px; transform: rotate(30deg); }
.mini.hat-astronaut .h { left: 3px; right: 3px; top: 5px; height: 26px; border-radius: 50%; background: rgba(255, 255, 255, 0.85); }
.mini.hat-astronaut .h::after { content: ''; position: absolute; left: 4px; right: 4px; top: 7px; height: 9px; border-radius: 5px; background: #2a3a5a; }
.mini.hat-star .h { background: #2a1f4a; }
.mini.hat-star .h::after { content: ''; position: absolute; left: 50%; top: -14px; width: 14px; height: 16px; margin-left: -7px; background: var(--hat); clip-path: polygon(50% 0, 100% 40%, 50% 100%, 0 40%); }
.mini.hat-headband .h { top: 10px; height: 6px; border-radius: 2px; }
.mini.hat-bandana .h::after { content: ''; position: absolute; right: -6px; top: 3px; width: 7px; height: 7px; background: var(--hat); border: 2px solid var(--ink); border-radius: 2px; transform: rotate(45deg); }
.mini.hat-beanie .h::after { content: ''; position: absolute; left: 50%; top: -7px; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: #fff; border: 2px solid var(--ink); }

.calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 10px 0; }
.calendar .wd { text-align: center; font-size: var(--fs-xs); color: var(--ink-soft); font-weight: 600; padding-bottom: 2px; }
.calendar .day { aspect-ratio: 1; display: grid; place-items: center; border-radius: 10px; background: var(--card); border: 2px solid var(--line); font-size: var(--fs-sm); font-weight: 500; position: relative; font-variant-numeric: tabular-nums; }
.calendar .day.empty { background: transparent; border-color: transparent; }
.calendar .day.special { background: #fff1c9; border-color: var(--coin); }
.calendar .day.special::before { content: ''; position: absolute; top: 3px; right: 3px; width: 7px; height: 7px; background: var(--coin-dark); clip-path: polygon(50% 0, 100% 38%, 50% 100%, 0 38%); }
.calendar .day.missed { opacity: 0.45; }
.calendar .day.claimed { background: var(--green); border-color: var(--green-dark); color: #fff; }
.calendar .day.claimed::after { content: '✓'; position: absolute; bottom: 0; right: 4px; font-size: 10px; }
.calendar .day.today { outline: 3px solid var(--ink); outline-offset: 1px; }
.daily-special { font-weight: 600; color: var(--coin-dark); text-align: center; }
.daily-reward { text-align: center; font-weight: 600; }
.buy[aria-disabled='true'] { cursor: default; }

.join-box { background: var(--card); border: 2px solid var(--line); border-radius: var(--r-card); padding: 10px 12px; margin: 8px 0 12px; display: flex; flex-direction: column; gap: 6px; }
.join-box p { margin: 0; font-size: var(--fs-sm); }
.lb-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.lb-list li { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 8px; padding: 8px 10px; background: var(--card); border: 2px solid var(--line); border-radius: 12px; font-size: var(--fs-md); }
.lb-list .rank { font-weight: 600; text-align: center; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.lb-list .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-list b { font-variant-numeric: tabular-nums; }
.lb-list li.top1 .rank { color: var(--coin-dark); }
.lb-list li.top1 { border-color: var(--coin); }
.lb-list li.top2 .rank, .lb-list li.top3 .rank { color: var(--ink); }
.lb-list li.me { background: #efe4ff; border-color: var(--shard); }
.field { display: flex; flex-direction: column; gap: 4px; margin: 10px 0 0; font-size: var(--fs-sm); color: var(--ink-soft); }
.field input {
  font: inherit; font-size: 18px; color: var(--ink); padding: 10px 12px; border-radius: 12px; border: 2px solid var(--line);
  background: #fff; min-height: 48px; -webkit-user-select: text; user-select: text; letter-spacing: 0.02em;
}
.field input:focus { outline: 3px solid var(--shard); outline-offset: 1px; border-color: var(--shard); }
.form-error { color: var(--danger); font-size: var(--fs-sm); min-height: 20px; margin: 6px 0 0; }
.code-box { font-size: 32px; font-weight: 600; text-align: center; letter-spacing: 0.12em; background: #fff; border: 3px dashed var(--shard); border-radius: 14px; padding: 12px; margin: 10px 0; -webkit-user-select: all; user-select: all; }


/* ---------- v3: faixa de objetivos ---------- */
.objective {
  display: flex; align-items: center; gap: 10px; margin: 0 10px; padding: 7px 8px 7px 10px; cursor: pointer;
  background: #f1e9ff; border: 2px solid #d9c8ff; border-radius: 12px; margin-top: 8px; margin-bottom: 2px;
}
.objective.ready { background: #fff1c9; border-color: var(--coin); animation: obj-pulse 1.4s ease-in-out infinite; }
@keyframes obj-pulse { 50% { box-shadow: 0 0 0 4px rgba(255, 176, 32, 0.25); } }
.obj-gem { width: 16px; height: 20px; flex: none; background: var(--shard); clip-path: polygon(50% 0, 100% 38%, 50% 100%, 0 38%); }
.objective.ready .obj-gem { background: var(--coin-dark); }
.obj-text { flex: 1; min-width: 0; }
.obj-label { display: block; font-size: var(--fs-sm); font-weight: 600; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.obj-bar { height: 6px; background: rgba(74, 50, 38, 0.12); border-radius: 99px; overflow: hidden; margin-top: 4px; }
.obj-bar i { display: block; height: 100%; background: var(--shard); border-radius: 99px; transition: width 0.3s; }
.objective.ready .obj-bar i { background: var(--coin); }
.obj-side { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; font-size: var(--fs-xs); color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.obj-reward { display: inline-flex; align-items: center; gap: 3px; font-size: var(--fs-xs); }
.obj-reward .key-icon { width: 15px; height: 15px; }
.obj-claim {
  display: flex; flex-direction: column; align-items: center; gap: 1px; border: 0; border-radius: 10px; padding: 5px 12px;
  background: var(--coin); border-bottom: 3px solid var(--coin-dark); font-weight: 600; font-size: var(--fs-sm); min-height: 40px;
}
.obj-claim .obj-reward { font-weight: 600; }
#panel.collapsed .objective { display: none; }

/* ---------- v3: bênçãos ---------- */
.bless-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 8px 0 4px; }
.bless-card {
  display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; padding: 10px 6px;
  background: var(--card); border: 2px solid var(--line); border-radius: 14px; font: inherit; color: inherit;
}
.bless-card.on { border-color: var(--shard); background: #f1e9ff; box-shadow: 0 0 0 3px rgba(155, 107, 255, 0.25); }
.bless-card b { font-size: var(--fs-sm); line-height: 1.15; }
.bless-lvl { font-size: var(--fs-xs); color: var(--shard-dark); font-weight: 600; }
.bless-fx { font-size: var(--fs-xs); color: var(--ink-soft); line-height: 1.2; }
.bless-reroll { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.bless-reroll[aria-disabled='true'] { opacity: 0.55; }
.buy.prestige:not(.can) .buy-label { color: var(--off-ink); }
.bless-icon { display: inline-block; width: 30px; height: 30px; border-radius: 50%; background: var(--shard); position: relative; flex: none; }
.bless-icon::after { content: ''; position: absolute; inset: 7px; background: #fff; clip-path: var(--shape, polygon(50% 0, 100% 38%, 50% 100%, 0 38%)); }
.bless-iron { background: #8c8178; --shape: polygon(20% 0, 80% 0, 80% 55%, 50% 100%, 20% 55%); }
.bless-eye { background: #2fa3a8; --shape: ellipse(50% 32% at 50% 50%); }
.bless-strike { background: #d0503f; --shape: polygon(55% 0, 20% 55%, 48% 55%, 40% 100%, 80% 42%, 52% 42%); }
.bless-rain { background: #e8a820; --shape: polygon(50% 0, 62% 35%, 100% 38%, 70% 60%, 80% 100%, 50% 76%, 20% 100%, 30% 60%, 0 38%, 38% 35%); }
.bless-veins { background: #c77f00; }
.bless-rest { background: #3f7fd0; --shape: circle(38% at 45% 50%); }
.bless-recruiter { background: #2f9d58; --shape: polygon(30% 0, 70% 0, 70% 40%, 100% 40%, 100% 100%, 0 100%, 0 40%, 30% 40%); }
.bless-pioneer { background: #6f45d8; --shape: polygon(50% 0, 100% 100%, 0 100%); }
.bless-keys { background: #e0913f; --shape: polygon(0 30%, 55% 30%, 55% 0, 100% 50%, 55% 100%, 55% 70%, 0 70%); }
.bless-list li { grid-template-columns: 30px 64px 1fr; }
.bless-list .bless-icon { width: 24px; height: 24px; }
.bless-list .bless-icon::after { inset: 6px; }

/* ---------- v3: leaderboard e amigos ---------- */
.lb-list li { grid-template-columns: 36px 1fr auto; }
.lb-score { display: inline-flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lb-island { font-size: var(--fs-xs); font-weight: 600; background: var(--off-bg); border-radius: 99px; padding: 2px 8px; margin-right: 4px; }
.lb-gap { background: transparent !important; border: 0 !important; justify-content: center; color: var(--ink-soft); padding: 0 !important; display: block !important; text-align: center; }
.lb-next { margin-top: 10px; text-align: center; font-weight: 600; color: var(--shard-dark); }
.fr-form { display: flex; gap: 8px; margin-top: 10px; }
.fr-form input { flex: 1; min-width: 0; font: inherit; font-size: 17px; padding: 8px 12px; border-radius: 12px; border: 2px solid var(--line); background: #fff; min-height: 48px; -webkit-user-select: text; user-select: text; }
.fr-form input:focus { outline: 3px solid var(--shard); outline-offset: 1px; border-color: var(--shard); }
.fr-form .buy { min-width: 110px; }
.lb-list.fr-list li { grid-template-columns: 36px 1fr auto 32px; }
.fr-x { width: 32px; height: 32px; border-radius: 9px; border: 0; background: var(--off-bg); font-size: 20px; line-height: 1; padding: 0 0 2px; color: var(--ink-soft); }
.fr-x-space { width: 32px; }
@media (max-width: 480px) {
  .bless-grid { gap: 6px; }
  .bless-card { padding: 8px 4px; }
  .lb-island { padding: 2px 6px; margin-right: 2px; }
  .lb-list.fr-list li { grid-template-columns: 26px 1fr auto 30px; }
}


/* ---------- v4: loja ---------- */
.wallet { flex-wrap: wrap; gap: 8px 14px; }
.chest-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.chest-star .chest-art, .chest-art.chest-star { --chest: #4a3aa0; --chest-lid: #7a5cc8; }
.chest-star .chest-art i, .chest-art.chest-star i { background: #7fe3f0; }
.chest-star { background: linear-gradient(#f3ecff, var(--card)); }
.chest-card .pity, .chest-open .pity, .pity { margin: 0; font-size: 11px; font-weight: 600; color: var(--shard-dark); text-align: center; line-height: 1.2; }
.chest-alt { width: 100%; font-size: var(--fs-xs); display: inline-flex; align-items: center; justify-content: center; gap: 3px; padding: 4px; }
.chest-alt.off { opacity: 0.5; }
.chest-alt .key-icon { width: 15px; height: 15px; }
.key-sources { margin-top: 10px; font-size: var(--fs-xs); }
.rar-title { display: flex; align-items: baseline; gap: 8px; margin: 16px 0 6px; font-size: var(--fs-md); font-weight: 600; color: var(--rar); }
.rar-title span { font-size: var(--fs-xs); color: var(--ink-soft); font-weight: 500; }
.skin-card { position: relative; }
.stars { font-size: 12px; letter-spacing: 1px; color: #e8a820; line-height: 1; }
.stars i { font-style: normal; color: rgba(74, 50, 38, 0.18); }
.chance { font-size: 10px; color: var(--ink-soft); line-height: 1.1; }
.dupe-count { position: absolute; top: 4px; right: 5px; font-size: 11px; font-weight: 600; background: var(--ink); color: #fff; border-radius: 99px; padding: 1px 6px; }
.only-chests { font-size: var(--fs-xs); font-weight: 600; color: var(--ink-soft); min-height: 36px; display: grid; place-items: center; text-align: center; }
.sell-btn { font-size: 11px; padding: 2px 4px; display: inline-flex; align-items: center; gap: 2px; }
.sell-btn .dust-icon { width: 12px; height: 12px; }
.skin-card.rar-mythic, .skin-card.rar-cosmic { background: linear-gradient(160deg, var(--card) 55%, color-mix(in srgb, var(--rar) 18%, var(--card))); }
.skin-card.rar-cosmic:not(.missing) { box-shadow: 0 0 0 2px color-mix(in srgb, var(--rar) 50%, transparent), 0 0 16px color-mix(in srgb, var(--rar) 35%, transparent); }
.mini.fx::before { content: ''; position: absolute; inset: -6px -8px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--fx) 55%, transparent), transparent 70%); animation: fx-pulse 2s ease-in-out infinite; }
@keyframes fx-pulse { 50% { opacity: 0.45; transform: scale(0.9); } }
.mini.hat-halo .h { top: 10px; height: 6px; border-radius: 3px; background: #4a3226; }
.mini.hat-halo .h::after { content: ''; position: absolute; left: 0; right: 0; top: -12px; height: 7px; border: 3px solid var(--hat); border-radius: 50%; }
.mini.hat-antlers .h { top: 9px; height: 7px; border-radius: 3px; background: #6b4a32; }
.mini.hat-antlers .h::before, .mini.hat-antlers .h::after { content: ''; position: absolute; top: -13px; width: 4px; height: 14px; background: var(--hat); border-radius: 2px; box-shadow: -4px 3px 0 -1px var(--hat); }
.mini.hat-antlers .h::before { left: 0; transform: rotate(-20deg); }
.mini.hat-antlers .h::after { right: 0; transform: rotate(20deg) scaleX(-1); }
.mini.hat-flame .h { top: -10px; height: 26px; border: 0; border-radius: 50% 50% 40% 40% / 70% 70% 30% 30%; background: linear-gradient(var(--hat), #fff1b0); }
.mini.hat-hood .h { left: 2px; right: 2px; top: 5px; height: 26px; border-radius: 14px 14px 4px 4px; background: var(--hat); z-index: 0; }
.mini.hat-hood .f { z-index: 1; }
.chest-open.big-win .reveal .mini { filter: drop-shadow(0 0 18px var(--rar)) drop-shadow(0 0 6px var(--rar)); }
.chest-open.rar-cosmic .reveal h2, .chest-open.rar-mythic .reveal h2 { color: var(--rar); }
.chest-open .stars { font-size: 16px; margin-bottom: 4px; }
.invite-box { background: #f1e9ff; border: 2px solid #d9c8ff; border-radius: 14px; padding: 10px 12px; margin: 12px 0 8px; text-align: center; }
.invite-box > span { font-size: var(--fs-sm); color: var(--ink-soft); }
.invite-code { display: block; font-size: 28px; letter-spacing: 0.1em; margin: 2px 0 4px; -webkit-user-select: all; user-select: all; }
.invite-box p { margin: 4px 0; font-size: var(--fs-xs); }
@media (max-width: 480px) {
  .chest-grid.three { gap: 5px; }
  .chest-grid.three .chest-card { padding: 7px 4px; }
  .chest-grid.three .chest-art { transform: scale(0.8); margin: 0; }
  .chest-grid.three h3 { font-size: 13px; }
  .chest-grid.three .odds { font-size: 10px; }
  .chest-grid.three .odds span::before { width: 6px; height: 6px; margin-right: 3px; }
  .chest-grid.three .buy { min-height: 40px; padding: 4px; }
  .chest-grid.three .buy .buy-label { font-size: 12px; }
}


/* ---------- v5: mutações e índice ---------- */
.mut-list, .set-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; }
.mut-list li { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--off-bg); border-radius: 10px; font-size: var(--fs-sm); }
.mut-list li b { margin-left: auto; font-variant-numeric: tabular-nums; }
.mut-dot { width: 14px; height: 14px; flex: none; border-radius: 50%; background: var(--rar); border: 2px solid var(--ink); }
.set-list li { display: grid; grid-template-columns: 16px 78px 44px 1fr; align-items: center; gap: 8px; padding: 6px 10px; background: var(--off-bg); border-radius: 10px; font-size: var(--fs-sm); }
.set-list li.done { background: var(--green-soft); color: var(--green-dark); }
.set-prog { font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.set-list li.done .set-prog { color: var(--green-dark); }
.set-reward { font-size: var(--fs-xs); color: var(--ink-soft); }
.set-list li.done .set-reward { color: var(--green-dark); font-weight: 600; }
.idx-tabs { flex-wrap: wrap; }
.idx-tabs button { position: relative; flex: 1 1 30%; min-width: 0; font-size: var(--fs-xs); border-bottom: 3px solid var(--rar); }
.tab-done { position: absolute; top: 2px; right: 4px; font-size: 10px; background: var(--green); color: #fff; border-radius: 99px; padding: 0 4px; }
.idx-list { display: grid; gap: 6px; margin-top: 10px; }
.idx-row { display: grid; grid-template-columns: 34px 1fr; gap: 8px; align-items: center; background: var(--card); border: 2px solid var(--line); border-radius: 12px; padding: 6px 8px; }
.idx-row.missing { opacity: 0.75; }
.idx-row .mini { margin: 0; }
.idx-name { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; font-size: var(--fs-sm); }
.idx-have { margin-left: auto; font-size: var(--fs-xs); color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.mut-cells { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.mut-cell { position: relative; display: grid; place-items: center; min-height: 38px; border-radius: 9px; border: 2px solid var(--line); background: var(--off-bg); padding: 0; }
.mut-cell.has { background: color-mix(in srgb, var(--rar) 22%, var(--card)); border-color: var(--rar); }
.mut-cell.miss .mut-dot { background: transparent; border-style: dashed; border-color: rgba(74, 50, 38, 0.3); }
.mut-cell.on { box-shadow: 0 0 0 3px var(--green); }
.mut-count { position: absolute; top: 1px; right: 3px; font-size: 9px; font-weight: 600; color: var(--ink-soft); }
.mut-buy { position: absolute; bottom: 2px; right: 3px; width: 8px; height: 8px; border-radius: 50%; background: var(--shard); }
.skin-detail { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 10px 0 4px; }
.skin-detail .mini { transform: scale(1.7); margin: 18px 0 20px; }
.mut-name { font-size: var(--fs-sm); font-weight: 600; color: var(--mut, var(--ink)); }
.bonus-big { font-size: var(--fs-lg); font-weight: 600; color: var(--green-dark); margin: 4px 0; }
.chest-open .mut-name { font-size: var(--fs-md); }
/* mutações: brilho por cima do mini-mineiro */
.mini.mut-bronze .b, .mini.mut-silver .b, .mini.mut-gold .b, .mini.mut-diamond .b, .mini.mut-obsidian .b,
.mini.mut-bronze .h, .mini.mut-silver .h, .mini.mut-gold .h, .mini.mut-diamond .h, .mini.mut-obsidian .h { position: relative; }
.mini.mut-bronze .b, .mini.mut-bronze .h { background: linear-gradient(140deg, #e8a45f, #a8632a); }
.mini.mut-silver .b, .mini.mut-silver .h { background: linear-gradient(140deg, #f2f5f8, #9aa5b2); }
.mini.mut-gold .b, .mini.mut-gold .h { background: linear-gradient(140deg, #ffe9a0, #e8a820); }
.mini.mut-diamond .b, .mini.mut-diamond .h { background: linear-gradient(140deg, #eafcff, #7fe3f0); }
.mini.mut-obsidian .b, .mini.mut-obsidian .h { background: linear-gradient(140deg, #4a3aa0, #17131f); }
.mini.mut-obsidian .f { box-shadow: inset 0 -5px 0 var(--beard), 0 0 8px #7a4aff; }
.mut-cell .mut-dot { width: 16px; height: 16px; }
@media (max-width: 480px) {
  .set-list li { grid-template-columns: 14px 62px 38px 1fr; padding: 5px 7px; gap: 6px; font-size: var(--fs-xs); }
  .idx-row { grid-template-columns: 30px 1fr; padding: 5px 6px; }
  .mut-cell { min-height: 34px; }
  .idx-tabs button { padding: 6px 2px; }
}

/* modo de demonstração: esconder a interface para gravar só o jogo */
body.demo-nohud #hud, body.demo-nohud #panel, body.demo-nohud #labels, body.demo-nohud .boosts, body.demo-nohud #tutorial { display: none !important; }

/* ---------- janelas em ecrãs estreitos ---------- */
@media (max-width: 480px) {
  .modal-card { padding: 14px 14px 14px; border-radius: 18px; }
  .modal-head { top: -14px; margin: -14px -14px 6px; padding: 14px 14px 8px; }
  .modal-x { top: 8px; right: 8px; }
  .skin-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .skin-card { padding: 6px 4px 6px; border-radius: 12px; border-top-width: 4px; gap: 1px; }
  .skin-card b { font-size: 12px; min-height: 28px; display: grid; place-items: center; }
  .skin-card .rar { font-size: 10px; letter-spacing: 0.03em; }
  .skin-card .buy { min-height: 36px; padding: 4px; }
  .skin-card .buy .buy-label { font-size: 13px; }
  .skin-card .buy .buy-cost { font-size: 14px; gap: 3px; }
  .skin-card .mini { margin: 2px auto 4px; }
  .chest-grid { gap: 8px; }
  .chest-card { padding: 8px 6px; }
  .exp-gain .big-amount { font-size: 30px; }
  .tier-list li { padding: 5px 8px; }
  .lb-list li { grid-template-columns: 30px 1fr auto; padding: 7px 8px; font-size: var(--fs-sm); }
}

/* ---------- paisagem: painel à direita ---------- */
@media (min-aspect-ratio: 1/1) and (min-width: 700px) {
  #panel { left: auto; right: 12px; top: 12px; bottom: 12px; width: 370px; height: auto; }
  #panel.collapsed { height: auto; }
  #panel.collapsed .panel-body { visibility: visible; }
  .panel-toggle { display: none; }
  #hud { right: 394px; }
  .boosts { top: 112px; }
  #toasts { left: calc(50% - 185px); }
}
@media (min-aspect-ratio: 1/1) and (max-height: 520px) {
  #panel { left: auto; right: 8px; top: 8px; bottom: 8px; width: 310px; height: auto; }
  #panel.collapsed { height: auto; }
  #panel.collapsed .panel-body { visibility: visible; }
  .panel-toggle { display: none; }
  #coins { font-size: 24px; }
  .icon-btn { width: 42px; height: 42px; }
  .fab-col { gap: 6px; }
  .boosts { top: 84px; }
  #hud { right: 326px; }
  .buy { min-height: 48px; }
  #toasts { left: calc(50% - 155px); }
}

@media (prefers-reduced-motion: reduce) {
  .tap-ring, .buy.pulse, .loading-gems span, .fab-exp.glow, .objective.ready, .mini.fx::before { animation: none; }
}
