* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #090a0f;
  color: #f4f4f5;
  min-height: 100vh;
  text-align: center;
  padding: clamp(12px, 3.5vw, 30px);
  -webkit-font-smoothing: antialiased;
}
h1 { font-size: clamp(1.8rem, 5vw, 3rem); margin: 10px 0; font-weight: 700; letter-spacing: -0.02em; color: #f4f4f5; }
.sub { color: #8b929e; font-size: clamp(0.95rem, 2.5vw, 1.15rem); margin: 0 0 20px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(240px, 100%), 1fr)); gap: 14px; max-width: 1200px; margin: 20px auto; }
.card {
  background: #111317;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 16px;
  color: #f4f4f5;
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
  text-align: left;
}
.card:hover, .card:active {
  transform: translateY(-2px);
  background: #161820;
  border-color: rgba(255, 255, 255, 0.2);
}
.emoji { font-size: 2rem; margin-bottom: 8px; }
.card p { color: #8b929e; font-size: 0.875rem; line-height: 1.45; margin: 6px 0 0; }
.back {
  position: absolute;
  top: 12px;
  left: 12px;
  color: #f4f4f5;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 8px 14px;
  border-radius: 8px;
  backdrop-filter: blur(12px);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  z-index: 100;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
  touch-action: manipulation;
  min-height: 38px;
}
.back:hover, .back:active {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.24);
  transform: translateY(-1px);
  color: #fff;
}
canvas {
  background: #000;
  border-radius: 8px;
  display: block;
  margin: 16px auto;
  max-width: 100%;
  height: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.info { color: #8b929e; font-size: clamp(0.85rem, 2.2vw, 1rem); }
.touch-controls { display: flex; justify-content: center; align-items: center; gap: 10px; margin: 14px auto; user-select: none; -webkit-user-select: none; }
.touch-btn {
  background: #14171d;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #f4f4f5;
  border-radius: 10px;
  font-size: 1.25rem;
  font-weight: 600;
  min-width: 48px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  transition: transform 0.05s, background 0.05s, border-color 0.05s;
  touch-action: manipulation;
}
.touch-btn:active { transform: scale(0.94); background: #222631; border-color: rgba(255, 255, 255, 0.25); }
.arcade-footer { margin-top: 48px; padding: 24px 12px; font-size: 0.85rem; color: #717682; border-top: 1px solid rgba(255, 255, 255, 0.07); }
