* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark; /* visual escuro único, por escolha */
  /* Menu flutuante: altura e distância do rodapé. No celular ele sobe para
     deixar livre a faixa de baixo (onde ficam selos como o "Powered by Netlify"). */
  --nav-h: 58px;
  --nav-bottom: 64px;
  --bg: #0e0e14;
  --panel: #17171f;
  --panel-2: #20202b;
  --border: #2c2c3a;
  --text: #e8e8f0;
  --muted: #9a9ab0;
  --gold: #f5c542;
  --accent: #4fc3f7;
  --danger: #e05555;
  --good: #7cfc7c;
  --soul: #c9a6ff;
  --merchant: #9b6bff;
  --fury: #ff7043;
}

html,
body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, sans-serif;
  overflow: hidden;
}

button {
  font: inherit;
  color: inherit;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
}

button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

button:not(:disabled):hover {
  border-color: var(--accent);
}

button.primary {
  border-color: var(--soul);
  color: var(--soul);
  font-weight: 700;
  padding: 10px 14px;
}

h2 {
  margin: 0;
  font-size: 15px;
}

h3 {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---------- Layout: celular (coluna) ---------- */

#app {
  position: relative;
  display: grid;
  height: 100%; /* ocupa o espaço da página (respeita as margens seguras do celular) */
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr;
}

/* Palco: o mapa ocupa tudo; o painel dos menus abre por cima dele. */
#stage {
  position: relative;
  min-height: 0;
  overflow: hidden;
}

#stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  padding: 8px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

.label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.value {
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.gold {
  color: var(--gold);
}

/* ---------- Cena ---------- */

#scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

#game {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: manipulation;
  cursor: pointer;
}

#merchant {
  position: absolute;
  left: 50%;
  bottom: calc(var(--nav-bottom) + var(--nav-h) + 60px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  width: min(94%, 420px);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: rgba(20, 16, 34, 0.94);
  border: 1px solid var(--merchant);
  border-radius: 8px;
}

.merchant-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  font-size: 13px;
}

.merchant-title {
  color: var(--merchant);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

#merchant-compare {
  color: var(--muted);
  font-size: 12px;
}

#merchant-buy {
  white-space: nowrap;
  border-color: var(--gold);
  color: var(--gold);
}

#floor-nav {
  position: absolute;
  left: 50%;
  bottom: calc(var(--nav-bottom) + var(--nav-h) + 12px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}

#floor-nav button {
  background: rgba(20, 20, 28, 0.85);
  white-space: nowrap;
}

#auto-advance.off {
  border-color: var(--danger);
  color: #ffb4b4;
}

/* ---------- Painel com abas ---------- */

/* Painel dos menus: abre logo acima do menu flutuante. */
#panel {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: calc(var(--nav-bottom) + var(--nav-h) + 10px + env(safe-area-inset-bottom, 0px));
  height: min(calc(100% - var(--nav-bottom) - var(--nav-h) - 24px), 620px);
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  z-index: 4;
  animation: sheet-up 0.18s ease-out;
}

@keyframes sheet-up {
  from {
    transform: translateY(24px);
    opacity: 0.6;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 8px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sheet-head h2 {
  font-size: 16px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  background: none;
}

/* Menu flutuante: pílula centralizada por cima do mapa, longe dos cantos. */
#tabs {
  position: absolute;
  left: 50%;
  bottom: calc(var(--nav-bottom) + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  width: min(520px, calc(100% - 24px));
  height: var(--nav-h);
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  gap: 2px;
  padding: 4px;
  background: rgba(23, 23, 31, 0.92);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  z-index: 5;
}

#tabs button {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  max-width: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  border: none;
  border-radius: 8px;
  background: none;
  padding: 6px 2px 4px;
  color: var(--muted);
}

.tab-label {
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

#tabs button.active {
  color: var(--accent);
  background: rgba(79, 195, 247, 0.14);
  border-radius: 14px;
}

#tabs button.badge::after {
  content: "";
  position: absolute;
  top: 5px;
  right: calc(50% - 16px);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--soul);
}

.tab-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
  overflow-y: auto;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.panel-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
}

.hint {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

#prestige-info {
  margin: 0;
  line-height: 1.45;
}

.big {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--soul);
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

#buy-amount {
  display: flex;
  gap: 4px;
}

#buy-amount button.active {
  border-color: var(--accent);
  color: var(--accent);
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#upgrades {
  padding: 8px;
}

.list.compact {
  gap: 4px;
  font-size: 13px;
}

.upgrade {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  padding: 10px;
}

.name {
  font-weight: 700;
}

.level {
  color: var(--muted);
  font-weight: 400;
  margin-left: 4px;
}

.desc {
  font-size: 12px;
  color: var(--muted);
}

.upgrade .desc {
  display: block;
  margin-top: 2px;
}

.upgrade-group {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.upgrade.class-upgrade {
  border-left: 3px solid var(--class-color, var(--border));
}

.upgrade .cost {
  color: var(--gold);
  font-weight: 700;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.item-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.item-row .slot {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

#stat-list {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  margin: 0;
  font-size: 13px;
}

#stat-list dt {
  color: var(--muted);
}

#stat-list dd {
  margin: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.achievement {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.achievement.done {
  border-color: rgba(124, 252, 124, 0.4);
}

.ach-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.reward {
  font-size: 12px;
  color: var(--gold);
  white-space: nowrap;
}

.bar {
  height: 4px;
  background: #000000;
  border-radius: 2px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  width: 0;
  background: var(--accent);
}

.achievement.done .bar-fill {
  background: var(--good);
}

/* ---------- Conta e ranking ---------- */

.account {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.account label {
  font-size: 12px;
  color: var(--muted);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.account input {
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  width: 100%;
}

.account input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

button.link {
  background: none;
  border: none;
  color: var(--accent);
  padding: 4px 0;
  text-align: left;
}

.error-text {
  margin: 0;
  color: #ff8a80;
  font-size: 13px;
  line-height: 1.45;
}

.error-text.info {
  color: var(--good);
}

.table-wrap {
  overflow-x: auto;
}

#board {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

#board th {
  text-align: left;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
}

#board td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
}

#board .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

#board th:nth-child(1),
#board th:nth-child(4),
#board th:nth-child(5) {
  text-align: right;
}

#board tr.me td {
  color: var(--gold);
  font-weight: 700;
}

/* ---------- Classe atual e bolsa (aba Itens) ---------- */

.class-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.class-now {
  display: flex;
  flex-direction: column;
}

.class-current {
  font-size: 16px;
  font-weight: 700;
}

.bag-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

button.small {
  font-size: 12px;
  padding: 4px 8px;
}

.item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.class-tag {
  font-size: 11px;
  color: var(--good);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

#class-cancel {
  align-self: flex-end;
}

/* ---------- Itens em quadrados ---------- */

.tile-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 76px));
  gap: 6px;
}

.bag-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 76px));
  gap: 6px;
}

.tile {
  --q: var(--border);
  position: relative;
  aspect-ratio: 1;
  max-width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px 2px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
}

.tile.filled {
  border: 2px solid var(--q);
  color: var(--q);
  background: color-mix(in srgb, var(--q) 10%, var(--bg));
}

/* Peça de conjunto: cantinho marcado na cor do conjunto (a borda é a raridade) */
.tile.set::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--s, var(--q));
  box-shadow: 0 0 0 1px #000;
}

.tile.other-class {
  opacity: 0.55;
}

.tile.empty {
  border-style: dashed;
  opacity: 0.45;
  cursor: default;
}

.tile.empty-slot {
  border-style: dashed;
  opacity: 0.7;
}

.tile.selected {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.tile-power {
  font-size: 10px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.tile.empty-slot .tile-power {
  color: var(--muted);
}

.item-detail {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.detail-head {
  display: flex;
  gap: 10px;
  align-items: center;
}

.detail-icon {
  width: 52px;
  flex-shrink: 0;
}

.detail-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

button.primary-soft {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- Conjuntos ---------- */

.set-help {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.set-help p {
  margin: 0;
}

.set-help strong {
  color: var(--text);
}

.set-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.set-card {
  --q: var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--q);
  border-radius: 8px;
}

.set-card.locked {
  opacity: 0.5;
}

.set-card.complete {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold) inset;
}

.set-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px 10px;
}

.set-pieces {
  display: flex;
  gap: 6px;
}

.set-piece {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px dashed var(--border);
  color: var(--muted);
  opacity: 0.6;
}

.set-piece.on {
  border: 2px solid var(--q);
  color: var(--q);
  background: color-mix(in srgb, var(--q) 15%, var(--bg));
  opacity: 1;
}

.set-piece.bag {
  border: 1px solid var(--q);
  color: var(--q);
  opacity: 0.85;
}

.set-bonuses {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}

.set-bonuses li {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.set-bonuses li.on {
  color: var(--good);
}

.set-bonuses li.complete {
  font-weight: 700;
}

.set-bonuses li.complete.on {
  color: var(--gold);
}

.set-count {
  display: inline-flex;
  justify-content: center;
  min-width: 18px;
  padding: 0 4px;
  border-radius: 4px;
  background: var(--bg);
  font-variant-numeric: tabular-nums;
}

/* ---------- Escolha de classe ---------- */

#class-picker {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.75);
  padding: 16px;
  z-index: 7;
  overflow-y: auto;
}

.picker-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(100%, 720px);
  max-height: 100%;
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
}

.picker-box h2 {
  font-size: 18px;
}

.class-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.class-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
  padding: 12px;
  border-top: 3px solid var(--class-color);
  min-width: 0;
}

.class-card:not(:disabled):hover {
  border-color: var(--class-color);
}

.class-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--class-color);
}

.class-role {
  font-size: 12px;
  color: var(--text);
}

.set-on {
  color: var(--good);
}

#toggle-sound.on,
#toggle-music.on {
  border-color: var(--good);
}

.danger {
  color: #ffb4b4;
}

/* ---------- Telas largas: painel dos menus centralizado sobre o mapa ---------- */

@media (max-width: 420px) {
  #tabs {
    width: calc(100% - 16px);
  }
}

@media (min-width: 900px) {
  :root {
    --nav-bottom: 18px;
  }
  #panel {
    left: 50%;
    right: auto;
    width: 620px;
    transform: translateX(-50%);
    animation: none;
  }
}

/* ---------- Avisos ---------- */

#toast {
  position: fixed;
  left: 50%;
  top: 70px;
  transform: translate(-50%, -10px);
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  max-width: 90vw;
  text-align: center;
  z-index: 5;
}

#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

#modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  padding: 16px;
  z-index: 8;
}

.modal-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  width: min(100%, 420px);
  text-align: center;
}

.modal-box p {
  white-space: pre-line;
  margin: 0;
  line-height: 1.5;
}



.modal-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
}

#error {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: #120a0a;
  color: #ff8a80;
  font-size: 18px;
  text-align: center;
  white-space: pre-line;
  z-index: 10;
}

.hidden {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  #toast {
    transition: none;
  }
}

/* ---------- Aba Herói ---------- */
.power { color: #ffb347; }

.hero-card {
  background: var(--panel-2);
  border: 1px solid #2c2c3a;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.hero-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.hero-line .big { margin: 0; }
.hero-card .bar { margin: 6px 0 8px; }
.hero-card .bar > span {
  display: block;
  height: 100%;
  width: 0;
  background: #f5c542;
  border-radius: inherit;
  transition: width 0.2s;
}
.hero-summary, .mastery-others {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 12px;
  margin: 4px 0 6px;
  font-size: 13px;
}
.hero-summary dt, .mastery-others dt { color: var(--muted); }
.hero-summary dd, .mastery-others dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }

.points { font-size: 13px; color: var(--muted); }
.points.has { color: #f5c542; font-weight: 600; }

.attr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  background: var(--panel-2);
  border-radius: 8px;
}
.attr .name { font-weight: 600; }
.attr .level { color: #f5c542; font-weight: 600; }
.attr .desc { display: block; font-size: 12px; color: var(--muted); }
.attr-ctrl { display: flex; gap: 6px; flex-shrink: 0; }
.attr-ctrl button { width: 36px; height: 36px; padding: 0; font-size: 18px; }

.mastery-title { font-weight: 600; }
.perk-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.perk-list li { display: flex; gap: 8px; color: var(--muted); opacity: 0.7; }
.perk-list li.done { color: var(--text, #eee); opacity: 1; }
.perk-lv { min-width: 52px; color: #f5c542; font-variant-numeric: tabular-nums; }

.relic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}
.relic {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  text-align: left;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #2c2c3a;
  background: var(--panel-2);
  font: inherit;
  color: inherit;
}
button.relic { border-color: color-mix(in srgb, var(--relic-color) 40%, transparent); }
.relic.active {
  border-color: var(--relic-color);
  box-shadow: 0 0 0 1px var(--relic-color) inset, 0 0 12px color-mix(in srgb, var(--relic-color) 35%, transparent);
}
.relic-icon { color: var(--relic-color, var(--muted)); font-weight: 700; }
.relic-name { font-weight: 600; font-size: 13px; }
.relic-desc { font-size: 12px; color: var(--muted); }
.relic-state { font-size: 11px; color: var(--muted); margin-top: 2px; }
.relic.active .relic-state { color: var(--relic-color); }
.relic.unknown { opacity: 0.45; border-style: dashed; }
.hero-card .bar { height: 8px; border-radius: 4px; }
.value { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 420px) {
  .value { font-size: 15px; }
  .label { font-size: 10px; letter-spacing: 0.02em; }
}

/* ---------- Cadeado e venda automática ---------- */
.tile-lock {
  position: absolute;
  top: 3px;
  right: 3px;
  display: flex;
  color: var(--gold);
  filter: drop-shadow(0 0 2px #000);
}
.lock-btn { display: inline-flex; align-items: center; gap: 5px; }
.lock-btn.on { border-color: var(--gold); color: var(--gold); }

.auto-sell { display: grid; gap: 8px; }
.auto-group .label { display: block; margin-bottom: 4px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  --chip: var(--muted);
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 13px;
  border: 1px solid color-mix(in srgb, var(--chip) 45%, transparent);
  background: transparent;
  color: var(--chip);
}
.chip.on {
  background: color-mix(in srgb, var(--chip) 22%, transparent);
  border-color: var(--chip);
  color: var(--text);
  text-decoration: line-through;
  text-decoration-color: color-mix(in srgb, var(--chip) 80%, transparent);
}

/* ---------- Forja, comparação e bolsa ---------- */
.tile-plus {
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 700;
  color: var(--gold);
  text-shadow: 0 0 3px #000, 0 0 2px #000;
  line-height: 1;
}
.cmp { font-size: 9px; margin-right: 2px; }
.cmp.up { color: var(--good); }
.cmp.down { color: var(--danger); }

.forge {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid var(--border);
  padding-top: 8px;
  margin-top: 2px;
}
.forge-title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gold); }
.danger-text { font-size: 12px; color: #ff8a8a; }
.protect-btn.on { border-color: var(--soul); color: var(--soul); }

.bag-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: -2px 0 8px;
}
.bag-tools .sort { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.bag-tools select {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 6px;
  font: inherit;
  font-size: 12px;
}

/* ---------- Missões ---------- */
.mission {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.mission.done { opacity: 0.6; }
.mission-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.mission-info .name { font-weight: 600; font-size: 14px; }
.mission-info .desc { font-size: 12px; color: var(--muted); }
.mission button { flex-shrink: 0; }
.mission-bonus { margin: 8px 0 14px; }
.mission-bonus button { width: 100%; }

/* ---------- Eventos ---------- */
}

/* ---------- Dicas ---------- */
.tip {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(var(--nav-bottom) + var(--nav-h) + 14px + env(safe-area-inset-bottom, 0px));
  width: min(420px, calc(100% - 24px));
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #1c2733;
  border: 1px solid var(--accent);
  border-radius: 12px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
  z-index: 6;
}
.tip p { margin: 0; font-size: 13px; line-height: 1.4; flex: 1; }
.tip button { flex-shrink: 0; }
.tip.hidden { display: none; }
#tabs button.pulse { animation: tab-pulse 1.2s ease-in-out infinite; }
@keyframes tab-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(79, 195, 247, 0); }
  50% { box-shadow: 0 0 0 4px rgba(79, 195, 247, 0.55); background: rgba(79, 195, 247, 0.15); }
}
@media (prefers-reduced-motion: reduce) {
  #tabs button.pulse { animation: none; outline: 2px solid var(--accent); }
}

/* ---------- Perfil ---------- */
#profile {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  padding: 16px;
  z-index: 8;
}
#profile.hidden { display: none; }
.profile-box { text-align: left; max-height: 90vh; overflow-y: auto; }
.profile-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.profile-head h2 { margin: 0; }
.profile-eq { margin: 4px 0; }
.profile-eq .tile { cursor: default; opacity: 1; }
#board tbody tr[data-user] { cursor: pointer; }
#board tbody tr[data-user]:hover { background: var(--panel-2); }

/* ---------- O que há de novo ---------- */
#news {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  padding: 16px;
  z-index: 9;
}
#news.hidden { display: none; }
.news-box { text-align: left; max-height: 88vh; overflow-y: auto; width: min(100%, 480px); }
.news-entry { display: flex; flex-direction: column; gap: 6px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.news-entry:last-child { border-bottom: 0; }
.news-entry.old { opacity: 0.75; }
.news-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.news-head strong { color: var(--gold); }
.news-list { margin: 0; padding-left: 18px; display: grid; gap: 5px; font-size: 14px; line-height: 1.45; }

/* ---------- Faixa de atualização ---------- */
.update-bar {
  position: fixed;
  left: 50%;
  top: 64px;
  transform: translateX(-50%);
  width: min(460px, calc(100% - 24px));
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #13261a;
  border: 1px solid var(--good);
  border-radius: 12px;
  z-index: 7;
  font-size: 13px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
}
.update-bar span { flex: 1; }
.update-bar.hidden { display: none; }

/* ---------- Título, bestiário, daltônico ---------- */
.hero-actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 6px; }
.hero-actions .sort { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.hero-actions select {
  background: var(--panel-2); color: var(--text); border: 1px solid var(--border);
  border-radius: 6px; padding: 5px 6px; font: inherit; font-size: 13px; max-width: 190px;
}
.rank-title { display: block; font-size: 11px; color: var(--soul); }

.bestiary { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.best-card { background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; display: grid; gap: 3px; }
.best-card.complete { border-color: var(--good); }
.best-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 2px; }
.best-row { display: flex; justify-content: space-between; gap: 6px; font-size: 13px; color: var(--muted); }
.best-row.done { color: var(--good); }
.best-row.boss span:first-child { color: var(--fury); }
.best-row.boss.done span:first-child { color: var(--good); }

.tile-rarity { display: none; }
body.cb .tile-rarity {
  display: block;
  position: absolute;
  top: 3px;
  right: 4px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  color: var(--q);
  text-shadow: 0 0 3px #000, 0 0 2px #000;
}

body.cb .tile-lock { right: 15px; }

/* ---------- Correio ---------- */
.seg-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.seg-tabs button { flex: 1; font-size: 13px; padding: 7px 6px; }
.seg-tabs button.active { border-color: var(--accent); color: var(--accent); background: rgba(79, 195, 247, 0.1); }
.seg-tabs .count { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 11px; margin-left: 4px; }
.seg-tabs .count:empty { display: none; }
.mail-list { display: grid; gap: 8px; }
.mail-card { display: flex; flex-direction: column; gap: 5px; padding: 10px 12px; background: var(--panel-2); border: 1px solid var(--border); border-left: 3px solid var(--gold); border-radius: 8px; }
.mail-card.claimed { opacity: 0.6; border-left-color: var(--border); }
.mail-card.notice { border-left-color: var(--soul); }
.mail-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.mail-body { margin: 0; font-size: 13px; white-space: pre-line; line-height: 1.45; }
.mail-rewards { margin: 0; font-size: 13px; color: var(--gold); }
.mail-card button { align-self: flex-start; }
#mail-news .news-entry { margin-bottom: 10px; }

/* ---------- Segundo plano e anúncio ---------- */
.catchup {
  position: fixed;
  left: 50%;
  top: 64px;
  transform: translateX(-50%);
  width: min(420px, calc(100% - 24px));
  padding: 8px 12px;
  border-radius: 10px;
  background: #1c2733;
  border: 1px solid var(--accent);
  font-size: 13px;
  text-align: center;
  z-index: 6;
}
.catchup.hidden { display: none; }
#ad-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  z-index: 10;
  padding: 16px;
}
#ad-overlay.hidden { display: none; }
.ad-box {
  width: min(360px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px;
  background: var(--panel);
  border: 1px dashed var(--muted);
  border-radius: 12px;
  text-align: center;
}
.ad-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.ad-text { margin: 0; font-size: 13px; color: var(--muted); }
.ad-count { font-size: 56px; font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; }

/* ---------- Competir ---------- */
.tower-bar {
  position: absolute;
  left: 50%;
  bottom: calc(var(--nav-bottom) + var(--nav-h) + 60px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 6px 14px;
  border-radius: 999px;
  background: rgba(24, 16, 40, 0.92);
  border: 1px solid var(--soul);
  white-space: nowrap;
  font-size: 13px;
}
.tower-tag { color: var(--soul); font-weight: 700; }
.tower-time { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 15px; }
.tower-time.low { color: var(--danger); }
.tower-floor { color: var(--muted); }
@media (max-width: 420px) { .tower-tag { display: none; } }

.comp-tabs button { font-size: 12px; padding: 7px 4px; }
.comp-sec h2 { margin-top: 4px; }
.comp-card { display: flex; flex-direction: column; gap: 8px; padding: 12px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; margin-bottom: 12px; }
.comp-card.tower { border-color: var(--soul); }
.comp-big { font-size: 22px; font-weight: 700; }
.mod-list { display: flex; flex-wrap: wrap; gap: 6px; }
.mod-chip { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--soul); color: var(--soul); font-size: 12px; }
.mod-chip small { color: var(--muted); margin-left: 4px; }
.class-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.class-chips button { flex: 1; min-width: 80px; font-size: 13px; }
.class-chips button.active { border-color: var(--soul); color: var(--soul); background: rgba(201, 166, 255, 0.12); }
.league { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; border: 1px solid currentColor; }
.league.bronze { color: #d08a52; } .league.prata { color: #c8d0dc; } .league.ouro { color: var(--gold); }
.league.diamante { color: #7fe3ff; } .league.mestre { color: #ff7ad9; }
.opp-list, .rival-list { display: flex; flex-direction: column; gap: 6px; }
.opp, .rival { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; }
.opp .who, .rival .who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.opp .who strong, .rival .who strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rival.ahead { border-left: 3px solid var(--danger); }
.rival.behind { border-left: 3px solid var(--good); }
.hist { display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.hist .w { color: var(--good); } .hist .l { color: var(--danger); }

#checkin, #duel {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.6); padding: 16px; z-index: 8;
}
#checkin.hidden, #duel.hidden { display: none; }
.checkin-days { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.checkin-day { display: flex; flex-direction: column; gap: 3px; padding: 8px 4px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel-2); font-size: 11px; }
.checkin-day b { font-size: 12px; color: var(--muted); }
.checkin-day.done { opacity: 0.55; }
.checkin-day.done b::after { content: ' ✓'; color: var(--good); }
.checkin-day.today { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.checkin-day.today b { color: var(--gold); }
.checkin-day.big { grid-column: span 2; }

.duel-row { display: flex; align-items: center; gap: 10px; }
.duel-side { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.duel-side strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.duel-vs { font-weight: 800; color: var(--fury); }
.duel-hp { height: 8px; border-radius: 4px; background: #2a1a1a; overflow: hidden; }
.duel-hp i { display: block; height: 100%; width: 100%; background: var(--good); transition: width 0.25s ease; }
.duel-result { font-size: 18px; font-weight: 700; min-height: 1.5em; }
.duel-result.win { color: var(--good); } .duel-result.loss { color: var(--danger); }
.duel-box.shake { animation: duel-shake 0.18s linear 2; }
.duel-box { width: min(100%, 440px); }
.duel-canvas { width: 100%; aspect-ratio: 360 / 230; border-radius: 8px; border: 1px solid var(--border); background: #1a1520; }
@keyframes duel-shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.shards { margin-left: auto; color: var(--soul); font-weight: 700; font-size: 13px; }
.talent-list { display: flex; flex-direction: column; gap: 6px; }
.talent { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; }
.talent .who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.talent .next { color: var(--soul); font-size: 12px; }
.talent .next:empty { display: none; }
.talent button { min-width: 74px; }
.swap-row { display: flex; flex-wrap: wrap; gap: 6px; }
.swap-row select { flex: 1; min-width: 120px; }
.hist-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 28px; }
button.danger-soft { border-color: var(--danger); color: #ffb4b4; background: rgba(224, 85, 85, 0.12); }



.net-bar {
  position: fixed; left: 50%; top: 64px; transform: translateX(-50%);
  width: min(460px, calc(100% - 24px)); display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; background: #2a1414; border: 1px solid var(--danger); border-radius: 12px;
  z-index: 7; font-size: 13px; color: #ffd0d0; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
}
.net-bar span { flex: 1; }
.net-bar.hidden { display: none; }

/* ---------- Janelas extras, filtros, títulos e atributos ---------- */
.overlay { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.6); padding: 16px; z-index: 8; }
.overlay.hidden { display: none; }
.wide-box { width: min(100%, 460px); max-height: calc(100vh - 32px); overflow-y: auto; text-align: left; }
.wide-box h2 { margin: 0; text-align: center; }
.auto-sell-btn { width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin: 8px 0 4px; padding: 9px 12px; text-align: left; }
.auto-sell-btn .label { font-weight: 700; }
.auto-sell-btn .desc { font-size: 12px; }
.titles-list { display: flex; flex-direction: column; gap: 6px; }
.title-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; }
.title-row .who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.title-row.locked { opacity: 0.55; }
.title-row.owned strong { color: var(--soul); }
.title-row.current { border-color: var(--gold); }
.attr-step { max-width: 220px; margin: 0 0 8px auto; }
.attr-step button { padding: 4px 6px; }
.attr-prof { display: grid; grid-template-columns: 1fr 1fr auto; align-items: center; gap: 10px; }
.prof-bar { height: 8px; border-radius: 4px; background: var(--panel-2); overflow: hidden; border: 1px solid var(--border); }
.prof-bar i { display: block; height: 100%; background: var(--accent); }
.attr-total { text-align: center; font-weight: 700; color: var(--good); margin: 0; }
.attr-total.bad { color: var(--danger); }
#titles-count { background: var(--border); color: var(--text); }

/* ---------- Barra de menus: 5 principais + "Mais" ---------- */
#tabs .tab-label { font-size: 12px; }
#tabs > button { padding: 5px 2px 4px; }
#more-btn.open { color: var(--accent); }
.more-menu {
  position: absolute; right: 0; bottom: calc(100% + 8px);
  width: min(340px, calc(100vw - 16px));
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 8px;
  background: rgba(23, 23, 31, 0.97); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
}
.more-menu.hidden { display: none; }
#tabs .more-menu button {
  max-width: none; min-height: 68px; justify-content: center; gap: 4px;
  border-radius: 12px; background: var(--panel-2);
}
#tabs .more-menu .tab-label { font-size: 13px; }

/* ---------- Topo da tela: habilidades, chefe e eventos ---------- */
#hud {
  position: absolute; top: 8px; left: 8px;
  max-width: calc(100% - 150px);
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  pointer-events: none;
}
#hud > * { pointer-events: auto; }
#skills { display: flex; flex-wrap: wrap; gap: 6px; }
.skill {
  position: relative; width: 46px; height: 46px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(20, 20, 28, 0.88); border-radius: 12px; overflow: hidden;
  color: var(--text); touch-action: manipulation;
}
.skill svg { position: relative; z-index: 1; }
.skill::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: conic-gradient(rgba(0, 0, 0, 0.68) calc(var(--p, 0) * 1turn), transparent 0);
}
.skill-cd {
  position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; color: #fff; text-shadow: 0 1px 2px #000;
  font-variant-numeric: tabular-nums; pointer-events: none;
}
.skill.ready { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(245, 197, 66, 0.35), 0 0 10px rgba(245, 197, 66, 0.25); }
.skill.ready svg { color: var(--gold); }
.skill:disabled { opacity: 1; }
.skill.active { border-color: var(--fury); box-shadow: 0 0 10px rgba(255, 112, 67, 0.45); }
.skill.active svg { color: var(--fury); }
.boss-bar {
  width: min(240px, 100%); padding: 6px 8px; border-radius: 10px;
  background: rgba(30, 10, 10, 0.88); border: 1px solid var(--danger);
}
.boss-bar.hidden { display: none; }
.boss-head { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 700; margin-bottom: 4px; }
.boss-head span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.boss-track { height: 6px; border-radius: 3px; background: #000; overflow: hidden; }
.boss-track i { display: block; height: 100%; background: var(--danger); transition: width 0.1s linear; }
.events { display: flex; flex-wrap: wrap; gap: 6px; }
.events.hidden { display: none; }
.event-chip {
  padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: rgba(40, 28, 6, 0.9); border: 1px solid var(--gold); color: var(--gold);
  white-space: nowrap;
}

#more-btn.hidden { display: none; }
#tabs.wide { width: min(760px, calc(100% - 24px)); }
.nav-pins { margin-bottom: 4px; }
.nav-pins .chip.on { text-decoration: none; color: var(--accent); border-color: var(--accent); background: rgba(79, 195, 247, 0.14); opacity: 1; }
.nav-pins .chip.on::before { content: "📌 "; }

.prestige-count { display: flex; gap: 8px; margin: 4px 0 10px; }
.pc-box { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 8px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; }
.pc-value { font-size: 22px; font-weight: 800; color: var(--soul); font-variant-numeric: tabular-nums; }
.pc-label { font-size: 12px; color: var(--muted); }

#relics-count { background: var(--border); color: var(--text); }

/* ---------- 0.20: Talentos de Almas ---------- */
.talent-icon { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; background: var(--panel-2); color: var(--soul); }
#soul-talents .talent { border-color: #3a2f52; }
#auto-buy { font-size: 12px; padding: 5px 9px; }
#auto-buy.on { border-color: var(--good); color: var(--good); }

/* ---------- 0.20: Cosméticos (nomes) ---------- */
.cos-name { font-weight: 700; }
.cos-grad { background-clip: text; -webkit-background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.cos-border-iron, .cos-border-gold, .cos-border-arcane { padding: 1px 6px; border-radius: 6px; border: 2px solid; }
.cos-border-iron { border-color: #8d97a8; box-shadow: inset 0 0 0 1px #4a505c; }
.cos-border-gold { border-color: #f5c542; box-shadow: 0 0 6px rgba(245, 197, 66, 0.45); }
.cos-border-arcane { border-color: #b57bff; animation: cos-arcane 2.4s linear infinite; }
@keyframes cos-arcane {
  0% { border-color: #b57bff; box-shadow: 0 0 6px #b57bff; }
  33% { border-color: #4fc3f7; box-shadow: 0 0 8px #4fc3f7; }
  66% { border-color: #ff7ad9; box-shadow: 0 0 6px #ff7ad9; }
  100% { border-color: #b57bff; box-shadow: 0 0 6px #b57bff; }
}
@media (prefers-reduced-motion: reduce) { .cos-border-arcane { animation: none; } }
.cos-supporter { margin-left: 5px; color: #ff6b9a; font-size: 0.9em; }

/* ---------- 0.20: Loja de Runas ---------- */
.runa-balance { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 800; color: #7cf3ff; }
.runa-icon { width: 22px; height: 22px; background: linear-gradient(135deg, #7cf3ff, #b57bff); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.shop-preview { display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px dashed var(--border); border-radius: 8px; }
.shop-preview-name { font-size: 16px; }
.shop-group h2 { margin: 6px 0; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.shop-item { display: flex; flex-direction: column; gap: 4px; align-items: center; text-align: center; padding: 10px 8px; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; }
.shop-item.wide { flex-direction: row; text-align: left; gap: 12px; }
.shop-item button { width: 100%; margin-top: auto; }
.shop-sample { min-height: 40px; display: flex; align-items: center; justify-content: center; }
.shop-skin { width: 48px; height: 48px; image-rendering: pixelated; }
.shop-fx { font-size: 28px; }
.shop-packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.shop-pack { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); opacity: 0.85; }
.pack-bonus { font-size: 11px; color: var(--good); font-weight: 700; }
.event-chip.corrupt-chip { border-color: #c04dff; color: #ff9cf7; }
