/* theme.css — shared look: shapes, depth, panels, buttons.
   All colours come from CSS variables that js/util/palette.js writes at boot.
   If a variable is missing, the fallback still keeps things readable. */

:root {
  --font-scale: 1;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --touch: 56px;                     /* minimum touch target */
  --shadow-soft: 0 6px 0 rgba(0, 0, 0, 0.10), 0 10px 22px rgba(0, 0, 0, 0.12);
  --shadow-press: 0 2px 0 rgba(0, 0, 0, 0.12);
  --panel-blur: blur(8px);
  color-scheme: light;
}

body {
  background: var(--c-sky-low, #cfe9ff);
}

/* ---------------- surfaces ---------------- */
.surface {
  background: var(--c-card, #fffdf8);
  border: 3px solid var(--c-line, #b9d7ea);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.card {
  background: var(--c-card, #fffdf8);
  border: 4px solid var(--c-line, #b9d7ea);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 1.1rem 1.2rem 1.3rem;
  width: min(92vw, 30rem);
  max-height: 88vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.card.wide { width: min(94vw, 46rem); }

.card h1, .card h2 { color: var(--c-ink, #33404d); }
.card h2 { font-size: 1.4em; }

.game-title {
  font-size: 2.2em;
  letter-spacing: 0.02em;
  color: var(--c-mint, #7fd6b5);
  text-shadow: 0 3px 0 var(--c-line, #b9d7ea);
}

.tagline { color: var(--c-ink-soft, #63707d); }
.fine { font-size: 0.86em; color: var(--c-ink-soft, #63707d); }

/* ---------------- buttons ---------------- */
.big-btn {
  min-height: var(--touch);
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-md);
  background: var(--c-btn, #eaf6ff);
  border: 3px solid var(--c-line, #b9d7ea);
  box-shadow: var(--shadow-soft);
  font-size: 1.05em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: transform 0.08s ease, filter 0.12s ease;
}
.big-btn:hover { filter: brightness(1.04); }
.big-btn:active { transform: translateY(3px); box-shadow: var(--shadow-press); }
.big-btn.primary {
  background: var(--c-mint, #7fd6b5);
  border-color: var(--c-mint-deep, #4fb894);
}
.big-btn[aria-pressed="true"] {
  background: var(--c-lavender, #cbb8f0);
  border-color: var(--c-line, #b9d7ea);
}
.big-btn:disabled { opacity: 0.55; cursor: default; }

.menu {
  display: grid;
  gap: 0.6rem;
  margin: 0.2rem 0;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  justify-content: space-between;
}

/* ---------------- svg icons ---------------- */
.icon { width: 1.6em; height: 1.6em; display: block; }
.icon svg { width: 100%; height: 100%; display: block; }

/* ---------------- motion preferences ---------------- */
body[data-motion="gentle"] * {
  animation-duration: 0.001s !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001s !important;
}

@keyframes pulse-soft {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.06); opacity: 0.82; }
}
@keyframes glow-soft {
  0%, 100% { box-shadow: 0 0 0 0 var(--c-mint, #7fd6b5); }
  50% { box-shadow: 0 0 14px 4px var(--c-mint, #7fd6b5); }
}
@keyframes float-in {
  from { transform: translateY(14px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
