body {
  font-family: var(--font-family);
  font-size: var(--font-base);
  line-height: var(--line);
  color: var(--color-ink);
  background: var(--color-bg);
}

.app {
  max-width: var(--app-max);
  margin: 0 auto;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
}

.app__header {
  height: var(--header-h);
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 0 var(--space-4);
  background: var(--color-primary);
  color: var(--color-on-primary);
  position: sticky;
  top: 0;
  z-index: 10;
}

.app__brand {
  font-weight: 700;
  font-size: var(--font-base);
}

.app__family {
  font-size: var(--font-sm);
  opacity: 0.9;
  max-width: 45%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app__main {
  flex: 1 1 auto;
  padding: var(--space-4) var(--space-4) var(--space-7);
  outline: none;
}

/* Bottom navigation */
.app__nav {
  height: var(--nav-h);
  flex: 0 0 auto;
  position: sticky;
  bottom: 0;
  display: flex;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.nav__item {
  flex: 1;
  min-height: var(--tap);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--color-ink-soft);
  font-size: 0.8125rem;
  font-weight: 600;
}

.nav__item--active {
  color: var(--color-primary);
}

.nav__item svg {
  width: 24px;
  height: 24px;
}

/* A vertically stacked screen with consistent rhythm */
.screen {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.screen__title {
  font-size: var(--font-2xl);
  font-weight: 800;
  line-height: 1.15;
}

.screen__subtitle {
  font-size: var(--font-base);
  color: var(--color-ink-soft);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.stack--tight {
  gap: var(--space-2);
}

.app__help {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: var(--color-on-primary);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  line-height: 1;
  flex-shrink: 0;
}
.app__help:hover { background: rgba(255, 255, 255, 0.35); }

/* How-to-play step cards */
.step__icon { color: var(--color-primary); margin-bottom: var(--space-2); }
.step__icon svg { width: 32px; height: 32px; }
.step__title { font-size: var(--font-lg); font-weight: 700; margin-bottom: var(--space-1); }
.step__body  { color: var(--color-ink-soft); line-height: 1.55; }
.step__demo  { margin-top: var(--space-4); }

.example-answer {
  line-height: 1.6;
  margin-top: var(--space-3);
}
