/* ============================================================================
   LIBERTY ARCADE — Cheat engine styling (toast + touch code-pad + wall)
   Liberty-Steel themed; reuses the shared design tokens from design.css.
   Loaded automatically by cheats.js if not already <link>ed.
   ============================================================================ */

/* Local fallbacks so the engine still looks right even on a page that somehow
   didn't load design.css (the smoketest links both, but be defensive). */
.lc-toast-wrap, .lc-pad, .lc-wall {
  --lc-navy:       var(--c-navy, #0A2342);
  --lc-navy-deep:  var(--c-navy-deep, #061528);
  --lc-navy-soft:  var(--c-navy-soft, #14365C);
  --lc-cream:      var(--c-cream, #F7F3E8);
  --lc-gold:       var(--c-gold, #C9A227);
  --lc-gold-light: var(--c-gold-light, #E4C95B);
  --lc-red:        var(--c-red, #B22234);
  --lc-blue:       var(--c-blue, #3D5AFE);
  --lc-line:       var(--line, rgba(201,162,39,0.28));
  --lc-line-soft:  var(--line-soft, rgba(247,243,232,0.12));
  --lc-font-serif: var(--font-serif, "Iowan Old Style", Palatino, Georgia, serif);
  --lc-font-sans:  var(--font-sans, -apple-system, "Segoe UI", Roboto, sans-serif);
}

/* ---------------------------------------------------------------------------
   TOAST
   --------------------------------------------------------------------------- */
.lc-toast-wrap {
  position: fixed;
  left: 50%;
  bottom: clamp(16px, 6vh, 64px);
  transform: translateX(-50%);
  z-index: 9000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  width: max-content;
  max-width: min(92vw, 480px);
}
.lc-toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--lc-navy-soft), var(--lc-navy-deep));
  border: 1px solid var(--lc-gold);
  box-shadow: 0 0 0 1px rgba(201,162,39,0.25), 0 10px 34px rgba(0,0,0,0.55);
  color: var(--lc-cream);
  font-family: var(--lc-font-sans);
  opacity: 0;
  transform: translateY(14px) scale(0.96);
  transition: opacity .28s ease, transform .28s cubic-bezier(.2,.9,.3,1.2);
}
.lc-toast.is-in  { opacity: 1; transform: translateY(0) scale(1); }
.lc-toast.is-out { opacity: 0; transform: translateY(-10px) scale(0.98); }
.lc-toast--cosmetic { border-color: var(--lc-blue); }
.lc-toast__star {
  font-size: 20px;
  color: var(--lc-gold-light);
  text-shadow: 0 0 10px rgba(228,201,91,0.7);
  flex: 0 0 auto;
}
.lc-toast--cosmetic .lc-toast__star { color: var(--lc-blue); text-shadow: 0 0 10px rgba(61,90,254,0.7); }
.lc-toast__body { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.lc-toast__main {
  font-family: var(--lc-font-serif);
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lc-toast__sub {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lc-gold-light);
  margin-top: 2px;
}
.lc-toast--cosmetic .lc-toast__sub { color: #aeb9ff; text-transform: none; letter-spacing: 0.04em; font-style: italic; }

@media (prefers-reduced-motion: reduce) {
  .lc-toast { transition: opacity .2s linear; transform: none !important; }
}

/* ---------------------------------------------------------------------------
   TOUCH HOTSPOT (invisible long-press corner)
   --------------------------------------------------------------------------- */
.lc-hotspot {
  position: fixed;
  right: 0; bottom: 0;
  width: 56px; height: 56px;
  z-index: 8500;
  background: transparent;
  /* invisible but tappable; never blocks the rest of the screen */
  -webkit-tap-highlight-color: transparent;
}

/* ---------------------------------------------------------------------------
   TOUCH CODE-ENTRY PAD
   --------------------------------------------------------------------------- */
.lc-pad {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(6,21,40,0.78);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  padding: 16px;
}
.lc-pad.is-open { display: flex; }
.lc-pad__card {
  width: min(340px, 92vw);
  background: linear-gradient(180deg, var(--lc-navy-soft), var(--lc-navy-deep));
  border: 1px solid var(--lc-gold);
  border-radius: 16px;
  box-shadow: 0 0 0 1px rgba(201,162,39,0.25), 0 18px 50px rgba(0,0,0,0.6);
  padding: 18px;
  color: var(--lc-cream);
  font-family: var(--lc-font-sans);
}
.lc-pad__title {
  font-family: var(--lc-font-serif);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: var(--lc-gold-light);
  text-align: center;
}
.lc-pad__readout {
  margin: 12px 0 14px;
  min-height: 38px;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  letter-spacing: 0.18em;
  color: var(--lc-cream);
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--lc-line-soft);
  border-radius: 10px;
}
.lc-pad__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.lc-pad__foot {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}
.lc-key {
  appearance: none;
  border: 1px solid var(--lc-line);
  background: rgba(247,243,232,0.05);
  color: var(--lc-cream);
  font-family: var(--lc-font-sans);
  font-weight: 700;
  font-size: 1.1rem;
  min-height: 48px;
  border-radius: 10px;
  cursor: pointer;
  transition: background .12s ease, transform .06s ease;
  -webkit-tap-highlight-color: transparent;
}
.lc-key:hover  { background: rgba(201,162,39,0.16); }
.lc-key:active { transform: translateY(1px); }
.lc-key--ok    { background: var(--lc-gold); color: var(--lc-navy-deep); border-color: var(--lc-gold); font-size: 0.85rem; }
.lc-key--clear,
.lc-key--close { font-size: 0.78rem; letter-spacing: 0.06em; }

/* ---------------------------------------------------------------------------
   DISCOVERED CHEATS WALL
   --------------------------------------------------------------------------- */
.lc-wall {
  font-family: var(--lc-font-sans);
  color: var(--lc-cream);
  background: linear-gradient(180deg, rgba(27,64,106,0.5), rgba(6,21,40,0.7));
  border: 1px solid var(--lc-line-soft);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}
.lc-wall__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--lc-line);
  padding-bottom: 12px;
  margin-bottom: 16px;
}
.lc-wall__title {
  font-family: var(--lc-font-serif);
  margin: 0;
  font-size: 1.4rem;
  letter-spacing: 0.03em;
  color: var(--lc-cream);
}
.lc-wall__tally {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lc-gold-light);
}
.lc-wall__game { margin-bottom: 18px; }
.lc-wall__game:last-child { margin-bottom: 0; }
.lc-wall__game-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.lc-wall__game-name {
  font-family: var(--lc-font-serif);
  font-size: 1.05rem;
  color: var(--lc-cream);
}
.lc-wall__game-head::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--lc-line);
}
.lc-wall__game-count {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--lc-gold-light);
  font-weight: 700;
}
.lc-wall__rows { display: flex; flex-direction: column; gap: 6px; }

.lc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--lc-line-soft);
  background: rgba(0,0,0,0.22);
}
.lc-row.is-found {
  border-color: rgba(201,162,39,0.45);
  background: linear-gradient(180deg, rgba(201,162,39,0.10), rgba(0,0,0,0.25));
}
.lc-row.is-found.is-cosmetic { border-color: rgba(61,90,254,0.45); }
.lc-row.is-locked { opacity: 0.62; }
.lc-row__pip { flex: 0 0 auto; font-size: 1rem; color: var(--lc-gold-light); width: 1.2em; text-align: center; }
.lc-row.is-cosmetic .lc-row__pip { color: #aeb9ff; }
.lc-row.is-locked .lc-row__pip { color: var(--lc-line); }
.lc-row__name {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--lc-cream);
  flex: 1;
  min-width: 0;
}
.lc-row.is-locked .lc-row__name { color: #8aa0bd; letter-spacing: 0.2em; }
.lc-row__code {
  font-size: 0.88rem;
  letter-spacing: 0.12em;
  color: var(--lc-gold-light);
  white-space: nowrap;
}
.lc-row.is-locked .lc-row__code { color: var(--lc-line); }
.lc-row__tag {
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #aeb9ff;
  border: 1px solid rgba(61,90,254,0.5);
  border-radius: 999px;
  padding: 2px 8px;
}
.lc-row__hint {
  flex-basis: 100%;
  font-size: 0.74rem;
  font-style: italic;
  color: var(--text-dim, #B9C6D8);
  margin-top: 2px;
}
.lc-wall__empty {
  font-style: italic;
  color: var(--text-dim, #B9C6D8);
  padding: 12px 4px;
}
