/* Estilo comum a todas as páginas dos Joguinhos */
:root {
  --bg: #fbf6ec;
  --panel: #ffffff;
  --ink: #2a2620;
  --ink-soft: #5e564b;
  --line: #e6dccb;
  --green: #2f8f4e;
  --green-dark: #23703c;
  --yellow: #f2b632;
  --board: #efe3c8;
  --board-dot: #dccaa4;
  --shadow: 0 3px 0 rgba(0, 0, 0, 0.12), 0 6px 18px rgba(60, 40, 10, 0.08);
  --radius: 18px;
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 20px;
  line-height: 1.35;
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

button, a.btn {
  font: inherit;
  font-weight: 700;
  color: inherit;
  touch-action: manipulation;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 60px;
  padding: 10px 22px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.08s ease;
}
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12); }
.btn svg { width: 30px; height: 30px; flex: none; }
.btn.primary { background: var(--green); border-color: var(--green-dark); color: #fff; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }

.icon-btn { min-width: 60px; padding: 10px 14px; }

.small-print { color: var(--ink-soft); font-size: 15px; text-align: center; }

/* ---------- Janelas ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(42, 30, 12, 0.5);
  animation: fade-in 0.2s ease;
}
.overlay[hidden] { display: none; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes pop-in { from { transform: scale(0.9); opacity: 0; } }

.card {
  width: 100%;
  max-width: 440px;
  max-height: 100%;
  overflow: auto;
  padding: 24px 20px 20px;
  background: var(--panel);
  border-radius: 28px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
  animation: pop-in 0.25s ease;
}
.card.center { text-align: center; }
.card h2 { margin: 0 0 16px; font-size: 32px; }
.card p { margin: 0 0 16px; font-size: 21px; }

.stack { display: grid; gap: 12px; margin-top: 8px; }
.stack .btn { width: 100%; justify-content: flex-start; }
.card.center .stack .btn, .stack .btn.big, .stack [data-close]:only-child { justify-content: center; }
.btn.big { min-height: 72px; font-size: 24px; }
