* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 16px;
  overflow-x: hidden;
}

h1 {
  font-size: 1.8rem;
  margin-bottom: 4px;
  color: var(--text-strong);
  text-align: center;
}

.parent-hint {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 12px;
  line-height: 1.4;
}

.parent-hint strong {
  color: var(--accent-red);
}

.canvas-wrapper {
  width: min(100%, 500px);
  margin: 0 auto;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 24px var(--shadow-color);
  touch-action: none;
}

.canvas-wrapper canvas {
  display: block;
  width: 100% !important;
  height: auto !important;
  touch-action: none;
}

.nav-bar {
  width: 100%;
  max-width: 500px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 8px 14px;
  border-radius: 8px;
  transition: all 0.2s;
}

.nav-link:hover, .nav-link:active {
  color: var(--text-strong);
  background: color-mix(in srgb, var(--bg-surface) 80%, transparent);
}

.activity-nav {
  width: min(100%, 500px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.activity-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 2px solid color-mix(in srgb, var(--accent-teal) 38%, transparent);
  background: color-mix(in srgb, var(--bg-surface) 88%, transparent);
  color: var(--text-strong);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 700;
  box-shadow: 0 8px 22px var(--shadow-color);
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.activity-link:hover,
.activity-link:active {
  transform: translateY(-1px);
  border-color: var(--accent-red);
  background: var(--bg-hover);
}

.activity-link--center {
  border-color: color-mix(in srgb, var(--accent-yellow) 38%, transparent);
}

@media (max-width: 560px) {
  body { padding: 12px 8px; }
  h1 { font-size: 1.5rem; }
  .nav-bar {
    max-width: 100%;
    gap: 8px;
  }
  .nav-link {
    padding: 8px 10px;
    font-size: 0.85rem;
  }
  .canvas-wrapper {
    width: 100%;
    border-radius: 16px;
  }
  .activity-nav {
    width: 100%;
    gap: 8px;
  }
  .activity-link {
    font-size: 0.9rem;
    padding: 10px 8px;
  }
}
