/* Local app additions; upstream styles are retained in style.css. */

/* Pixelify's fi/fl ligatures read as an "A" ("final" → "Anal"). The many `font:`
   shorthands reset ligatures, hence !important; canvases follow it too (HUD text). */
* {
  font-variant-ligatures: none !important;
}

.btn.wallet {
  background: linear-gradient(180deg, #ffffff, #dfe6f2);
  color: #1f2a44;
  text-shadow: none;
}

.wallet-address {
  max-width: 60%;
  overflow-wrap: anywhere;
  text-align: right;
}

.sync.error {
  background: #ff6b7b;
}

.wallet-recovery {
  z-index: 10000;
}

/* Hordemon v1: Solana sign-in, legacy import, provisional top 10, run save status. */
.login-why { margin-top: 4px; }
.wallet-list { display: grid; gap: 8px; margin: 14px 0 4px; }
.wallet-list:empty { display: none; }
.btn.wallet { display: flex; align-items: center; justify-content: center; gap: 10px; }
.btn.wallet img { width: 24px; height: 24px; border-radius: 6px; flex: none; }
.wallet-none { margin: 14px 0 4px; padding: 12px 14px; }
.wallet-none p { margin: 0 0 10px; font-size: 14px; }
.err.ok { color: var(--muted); }

.legacy-import, .session-lost { z-index: 10000; }
.legacy-list { display: grid; gap: 8px; margin: 4px 0 10px; }
.legacy-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; }
.legacy-row small { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; }

.rank-provisional {
  margin: 4px 0 12px; padding: 8px 12px; border-left: 3px solid #5fe0d0; border-radius: 6px;
  background: rgba(95, 224, 208, .08); color: var(--muted); font-size: 14px;
}
.rank-provisional b { color: #bff7ef; }
.rk-row.top-row { grid-template-columns: 54px 1fr auto; padding: 8px 12px; }

.over-save { margin-top: 2px; text-align: center; font-size: 14px; }
.over-save.ok { color: #5fe08a; }
.over-save.bad { color: #ff8a96; }
.over-save.muted { color: var(--muted); }

/* Essence packs: crystal heaps that grow with the pack; teal is Essence's color. */
.swap-box { width: min(780px, 100%); max-height: calc(100dvh - 24px); overflow-y: auto; }
.swap-packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 4px 0 12px; }
.swap-pack {
  appearance: none; cursor: pointer; font: inherit; color: var(--ink);
  display: grid; justify-items: center; gap: 2px; padding: 8px 10px 12px;
  background: linear-gradient(180deg, #1d3f86, #142c63);
  border: 3px solid var(--edge-in); border-radius: 10px;
  box-shadow: 0 0 0 2px var(--edge-out), 0 4px 0 var(--edge-out);
  text-shadow: 2px 2px 0 var(--shadow);
  /* Pile, amount, guarantee, price, tokens: rows shared across cards, so prices line up. */
  grid-row: span 5; grid-template-rows: subgrid; row-gap: 2px;
}
.swap-pack:hover:not(:disabled), .swap-pack:focus-visible { border-color: #5fe0d0; outline: none; }
.swap-pack.on { border-color: #5fe0d0; background: linear-gradient(180deg, #1c4d8c, #12366a); }
.swap-pack:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 0 0 2px var(--edge-out), 0 2px 0 var(--edge-out); }
.swap-pack:disabled { cursor: not-allowed; filter: saturate(.45) brightness(.75); }
.swap-pile { position: relative; display: block; width: 100%; height: 92px; }
.swap-pile::before {
  content: ''; position: absolute; left: 50%; bottom: 0; width: 130px; height: 30px; transform: translateX(-50%);
  border-radius: 50%; background: radial-gradient(closest-side, rgba(95, 224, 208, var(--glow)), transparent);
}
.swap-pile i { position: absolute; line-height: 0; }
.swap-pile img { filter: drop-shadow(0 2px 0 rgba(5, 15, 40, .65)); }
.swap-n { font-size: 30px; line-height: 1; color: #bff7ef; }
.swap-usd { font-size: 17px; }
/* "N Legendary guaranteed": Legendary gold (the 5★ rarity color) on a hard red pixel shadow. */
.swap-legend { font-size: 14px; font-weight: 700; line-height: 1.15; text-align: center; color: #ffcb3d; text-shadow: 2px 2px 0 #a3162a; margin: 2px 0 1px; }
.swap-pack small { font-size: 13px; color: var(--muted); }
.swap-panel { margin-bottom: 8px; }
.swap-panel p { margin: 0 0 8px; }
.swap-check { display: flex; gap: 8px; align-items: flex-start; margin: 0; font-size: 14px; color: var(--muted); cursor: pointer; }
.swap-check input { margin-top: 3px; accent-color: #5fe0d0; }
.swap-teal { color: #7ff0e2; }
.swap-foot { min-height: 20px; }
#essence-pill { cursor: pointer; }
#gacha-get { margin-left: 6px; padding: 4px 10px; font-size: 14px; }
@media (max-height: 520px) {
  .swap-pile { height: 68px; }
  .swap-n { font-size: 24px; }
}
.over-cap { display: block; font-size: 13px; color: var(--muted); font-weight: 400; }
