/* Style commun des petits jeux du portail (Merge Zoo, Squad Rush) */
:root {
  --bg: #0d0616;
  --panel: rgba(20, 10, 34, .92);
  --line: #3a2356;
  --text: #f3eefb;
  --muted: #b3a6c6;
  --accent: #e040fb;
  --gold: #ffd740;
  --ok: #69f0ae;
  --bad: #ff6e7a;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  touch-action: none; user-select: none; -webkit-user-select: none;
}
#game { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }

.hud {
  position: fixed; left: 0; right: 0; top: 0; display: flex; gap: 6px; align-items: center;
  padding: max(8px, env(safe-area-inset-top)) 10px 6px; pointer-events: none; flex-wrap: wrap;
}
.pill {
  background: rgba(0, 0, 0, .55); border: 1px solid rgba(255, 255, 255, .14); border-radius: 999px;
  padding: 5px 10px; font-weight: 800; font-size: 14px; white-space: nowrap;
}
.hud .spacer { flex: 1; }
.hud a, .hud button { pointer-events: auto; }

.bar {
  position: fixed; left: 0; right: 0; bottom: 0; display: flex; gap: 8px; justify-content: center;
  padding: 8px 10px max(10px, env(safe-area-inset-bottom)); flex-wrap: wrap;
}
button.b {
  font: inherit; font-weight: 800; font-size: 15px; color: #fff; border: 0; border-radius: 14px;
  padding: 11px 14px; background: linear-gradient(180deg, #8e24aa, #5e1580); cursor: pointer;
  box-shadow: 0 3px 0 rgba(0, 0, 0, .45); min-height: 46px;
}
button.b:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0, 0, 0, .45); }
button.b:disabled { filter: grayscale(.8) brightness(.7); }
button.b.gold { background: linear-gradient(180deg, #ffca28, #ff8f00); color: #2b1600; }
button.b.green { background: linear-gradient(180deg, #43a047, #1b5e20); }
button.b.blue { background: linear-gradient(180deg, #1e88e5, #0d47a1); }
button.b.small { padding: 7px 10px; min-height: 36px; font-size: 13px; }
button.b .sub { display: block; font-size: 11px; font-weight: 700; opacity: .85; }

.modal {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .6); display: flex; align-items: center;
  justify-content: center; padding: 16px; z-index: 10;
}
.modal[hidden] { display: none; }
.box {
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 16px;
  width: min(440px, 100%); max-height: 86vh; overflow: auto; touch-action: pan-y;
}
.box h2 { margin: 0 0 10px; font-size: 20px; }
.box p { color: var(--muted); margin: 6px 0; font-size: 14px; }
.row {
  display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.row .t { flex: 1; min-width: 0; }
.row .t b { display: block; }
.row .t small { color: var(--muted); }
.close { float: right; background: none; border: 0; color: var(--muted); font-size: 22px; cursor: pointer; }
.msg { min-height: 20px; color: var(--gold); font-weight: 700; font-size: 14px; margin-top: 8px; }
.toast {
  position: fixed; left: 50%; top: 22%; transform: translateX(-50%); font-size: 30px; font-weight: 900;
  color: var(--gold); text-shadow: 0 3px 0 #000, 0 0 18px rgba(255, 200, 0, .5); pointer-events: none;
  transition: opacity .4s; opacity: 0; text-align: center; white-space: nowrap; z-index: 5;
}
.toast.show { opacity: 1; }
.big { font-size: 34px; font-weight: 900; margin: 6px 0; }
a.link { color: var(--accent); font-weight: 800; }
@media (max-width: 380px) { button.b { padding: 9px 10px; font-size: 14px; } .pill { font-size: 13px; padding: 4px 8px; } }
