/* Loja de Ampulhetas (painel 'shop'), compras rápidas no inventário e trava da Automação (Assinatura Cronal) */
.shop { display: grid; gap: 12px; }
.shop .hg { width: 1em; height: 1em; flex: none; }

/* botão da Loja na barra: pulsa amarelo → azul → branco com halo suave.
   ÚNICA exceção à regra "sem brilho", pedida pelo dono do jogo; não copiar para outros elementos. */
#menu button[data-p="shop"] { animation: shopPulseBtn 4.5s ease-in-out infinite; }
#menu button[data-p="shop"] i { color: #5fb0f0; animation: shopPulse 4.5s ease-in-out infinite; }
#menu button[data-p="shop"] span { color: #9fcbf0; }
@keyframes shopPulse {
  0%, 100% { color: #e0b764; }
  33%      { color: #5fb0f0; }
  66%      { color: #f4f1e8; }
}
@keyframes shopPulseBtn {
  0%, 100% { border-color: #8c6a35; box-shadow: 0 0 0 1px #000, 0 4px 10px rgba(0, 0, 0, .6), 0 0 6px rgba(224, 183, 100, .22); }
  33%      { border-color: #4a86b8; box-shadow: 0 0 0 1px #000, 0 4px 10px rgba(0, 0, 0, .6), 0 0 9px rgba(95, 176, 240, .32); }
  66%      { border-color: #b8b2a2; box-shadow: 0 0 0 1px #000, 0 4px 10px rgba(0, 0, 0, .6), 0 0 9px rgba(244, 241, 232, .26); }
}
@media (prefers-reduced-motion: reduce) { #menu button[data-p="shop"], #menu button[data-p="shop"] i { animation: none; } }

/* coroa no cartão do jogador enquanto a Assinatura Cronal estiver ativa (mesmo selo do botão de party) */
.pc-who { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.pc-crown { cursor: default; color: var(--brass2); border-color: #8a6a3e; padding: 0 3px; }
.pc-crown:hover { color: var(--brass2); border-color: #8a6a3e; }
.pc-crown[hidden] { display: none; }

/* ampulheta em traço nos toasts e no cartão do jogador (no lugar do emoji ⌛) */
.toast .hg-ico { width: 1em; height: 1em; vertical-align: -.15em; color: var(--brass2); }
.pc-res .hg .hg-ico { width: 1em; height: 1em; flex: none; color: var(--brass2); }

/* saldo */
.shop-wallet { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid #4a3622; border-radius: 4px; background: linear-gradient(180deg, #241912, #170f0d); }
.shop-wallet-ico { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid #6b5230; border-radius: 50%; background: #2b1d14; color: var(--brass2); font-size: 22px; }
.shop-wallet-txt { display: grid; line-height: 1.1; }
.shop-wallet-txt strong { color: var(--brass2); font: 700 26px Cinzel, serif; }
.shop-rate { margin-left: auto; }

/* Assinatura Cronal */
.shop-cronal {
  display: grid; grid-template-columns: 120px minmax(0, 1fr) minmax(190px, auto); align-items: center; gap: 16px;
  padding: 14px 16px; border: 1px solid #8c6a35; border-radius: 4px;
  background: radial-gradient(ellipse at 12% 40%, #4a3020, transparent 60%), linear-gradient(135deg, #3a2618, #1a110e 70%);
}
.shop-cronal-art svg { display: block; width: 120px; height: 120px; }
.shop-cronal-txt h3 { margin: 0 0 8px; color: #f3d28d; font: 700 20px Cinzel, serif; }
.shop-perks { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.shop-perks li { position: relative; padding-left: 18px; color: var(--text); font-size: 14px; }
.shop-perks li::before { content: ''; position: absolute; left: 2px; top: .45em; width: 7px; height: 7px; background: var(--brass2); transform: rotate(45deg); }
.shop-cronal-side { display: grid; gap: 4px; justify-items: end; text-align: right; }
.shop-cronal-left { color: #f3d28d; font: 700 24px Cinzel, serif; }
.shop-cronal:not(.on) .shop-cronal-left { color: var(--muted); }
.shop-cronal-side .shop-foot { margin-top: 6px; }

/* vitrine */
.shop-h { display: flex; align-items: center; gap: 10px; margin: 6px 0 0; color: var(--brass2); font: 700 15px Cinzel, serif; }
.shop-h::after { content: ''; flex: 1; height: 1px; background: #3a2a1e; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.shop-card { display: grid; grid-template-rows: auto 1fr auto; border: 1px solid #3a2a1e; border-radius: 4px; background: #1b1316; overflow: hidden; }
.shop-card:hover { border-color: #6b5230; }
.shop-card.owned { border-color: #6b5230; }
.shop-art {
  display: grid; place-items: center; height: 108px; border-bottom: 1px solid #3a2a1e;
  background: radial-gradient(ellipse at 50% 55%, #2f2018, #160f0d 75%);
}
.shop-art svg { width: 160px; height: 96px; }
.art-num { fill: #f0d08a; font: 700 22px Cinzel, serif; }
.shop-art-hero canvas { display: block; }
.shop-plate {
  display: flex; align-items: center; gap: 10px; min-width: 150px; max-width: 86%; padding: 10px 14px;
  border: 1px solid #8c6a35; border-radius: 3px; background: linear-gradient(180deg, #6a4c26, #3e2a15);
  color: #fbe6b4; font: 700 18px Cinzel, serif; justify-content: space-between;
}
.shop-plate span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop-plate i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: #2a1a0c; border: 1px solid #b08a4a; }
.shop-body { display: grid; align-content: start; gap: 6px; padding: 10px 12px 4px; }
.shop-body h4 { margin: 0; color: var(--text); font: 700 15px Cinzel, serif; }
.shop-body p { margin: 0; font-size: 13px; line-height: 1.35; }
.shop-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px 12px; }
.shop-cronal-side .shop-foot { padding: 0; }
.shop-price { display: inline-flex; align-items: center; gap: 5px; color: var(--brass2); font-size: 17px; }
.shop-price b { font: 700 19px Cinzel, serif; }

/* pacotes de apoio */
.shop-card:has(.shop-art-pack) .shop-art { height: 128px; position: relative; }
.shop-art-pack { display: grid; place-items: end center; height: 100%; width: 100%; }
.shop-pack-title { position: absolute; top: 8px; left: 10px; font: 700 13px Cinzel, serif; }
.shop-perks.small li { font-size: 13px; }
.shop-perks .shop-swatch { display: inline-block; width: 12px; height: 12px; margin-left: 6px; vertical-align: -2px; border: 1px solid #000; border-radius: 2px; }

/* medidores */
.shop-meter { display: grid; gap: 4px; margin-top: 2px; }
.shop-bar { display: block; height: 8px; border: 1px solid #3a2a1e; border-radius: 2px; background: #120c0b; overflow: hidden; }
.shop-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #4f6e3c, #7fae5c); transition: width .9s linear; }
.shop-slots { display: flex; align-items: center; gap: 10px; margin-top: 2px; }
.shop-slot-row { display: flex; gap: 4px; }
.shop-slot-row i { width: 14px; height: 14px; border: 1px solid #4a3622; border-radius: 2px; background: #120c0b; }
.shop-slot-row i.on { border-color: #b0884a; background: #8a6428; }
.shop-offline { display: flex; align-items: baseline; gap: 8px; margin-top: 2px; font: 700 18px Cinzel, serif; flex-wrap: wrap; }
.shop-offline .was { color: var(--muted); text-decoration: line-through; font-size: 15px; }
.shop-offline .arrow { color: var(--muted); }
.shop-offline .now { color: var(--brass2); }
.shop-ok { color: #9fcf7a; font: 600 12px sans-serif; }
.shop-note { margin: 4px 0 0; font-size: .85rem; text-align: center; }

#shopDialog { width: min(480px, calc(100vw - 32px)); max-width: none; box-sizing: border-box; color: var(--text); }
#shopDialog .dlg-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
#shopDialog .dlg-head h2 { margin: 0; color: var(--brass2); }
.shop-field { display: grid; gap: 6px; }
.shop-field input { width: 100%; box-sizing: border-box; }
.shop-look { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 12px; align-items: center; }
.shop-look-cv { width: 160px; height: 200px; border: 1px solid #3a2a1e; border-radius: 4px; background: #120c0f; }
.shop-look-opts { display: grid; gap: 8px; }
.shop-look-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.shop-look-row .lbl { width: 92px; }

/* compra de ampulhetas: 3 pacotes em cima, 2 embaixo; a nota reserva altura para o modal não mudar de tamanho */
.shop-hg { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.shop-hg-cell { grid-column: span 2; display: grid; justify-items: center; gap: 4px; padding: 12px 6px; border: 1px solid #3a2a1e; border-radius: 4px; background: #1b1316; color: var(--text); font: inherit; cursor: pointer; }
.shop-hg-cell:nth-child(n+4) { grid-column: span 3; }
.shop-hg-cell:hover:not(:disabled) { border-color: #6b5230; }
.shop-hg-cell.on { border-color: var(--brass2); background: #2b1d14; }
.shop-hg-cell:disabled { cursor: default; opacity: .7; }
.shop-hg-cell-n { display: inline-flex; align-items: center; gap: 6px; color: var(--brass2); font-size: 20px; }
.shop-hg-cell-n .hg { width: 1em; height: 1em; }
.shop-hg-cell-n b { font: 700 24px Cinzel, serif; }
.shop-hg-cell small { font-size: 12px; }
.shop-hg-cell-price { font-weight: 700; font-size: 15px; }
.shop-hg-how { margin-top: 12px; }
.shop-hg-how button { flex: 1; min-height: 34px; }
.shop-hg-stack { display: grid; }
.shop-hg-stack > * { grid-area: 1 / 1; min-width: 0; }
.shop-hg-stack.pix > .shop-hg-pick, .shop-hg-stack:not(.pix) > .shop-pix { visibility: hidden; }
.shop-pix { display: grid; grid-template-columns: 196px minmax(0, 1fr); gap: 14px; align-items: center; }
.shop-pix-qr { width: 196px; height: 196px; padding: 6px; box-sizing: border-box; background: #fff; border-radius: 4px; line-height: 0; }
.shop-pix-qr svg { width: 100%; height: 100%; }
.shop-pix-qr.dead { opacity: .15; }
.shop-pix-info { display: grid; gap: 8px; }
.shop-pix-info p { margin: 0; font-size: 13px; line-height: 1.4; }
.shop-pix-sum { min-height: 1.5em; color: var(--brass2); font: 700 18px/1.5 Cinzel, serif; }
.shop-pix-clock { color: var(--text); font-variant-numeric: tabular-nums; }
.shop-pix-state { min-height: 5.6em; }
.shop-pix-code { width: 100%; box-sizing: border-box; font: 12px ui-monospace, Consolas, monospace; }
.shop-pix-sim { color: var(--brass2); font-size: 12px; }
@media (max-width: 480px) { .shop-pix { grid-template-columns: 1fr; justify-items: center; text-align: center; } .shop-pix-info { width: 100%; } .shop-pix-state { min-height: 4.2em; } }
.shop-hg-note { min-height: 4.2em; margin: 12px 0 0; font-size: 13px; line-height: 1.4; }

.inv-more { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid #2e2218; }

.auto-lock { display: grid; gap: 8px; margin: 8px 0; padding: 10px; border: 1px solid #6b5230; border-radius: 4px; background: #241812; }
.auto-lock[hidden] { display: none; }
.auto-lock p { margin: 0; font-size: 13px; color: #d8c8a8; }
.auto-lock .btn { justify-self: start; }
#automation.locked .automation-option, #automation.locked .automation-ranged:not(.pet-grind-auto), #automation.locked .preset-rule { opacity: .55; }
.district-lock { color: #e6b070; }

@media (max-width: 640px) {
  .shop-cronal { grid-template-columns: 84px minmax(0, 1fr); gap: 12px; }
  .shop-cronal-art svg { width: 84px; height: 84px; }
  .shop-cronal-side { grid-column: 1 / -1; justify-items: stretch; text-align: left; }
  .shop-cronal-side .shop-foot .btn { flex: 1; }
  .shop-grid { grid-template-columns: 1fr; }
  .shop-card .btn, .shop-cronal .btn { min-height: 44px; }
  .shop-look { grid-template-columns: 1fr; justify-items: center; }
}

/* abas da vitrine: quebram em duas linhas no celular em vez de espremer */
.shop-tabs { flex-wrap: wrap; }
.shop-tabs .tab { flex: 1 0 auto; white-space: nowrap; }
.shop-own { white-space: nowrap; }
