﻿:root {
  --bg: var(--ui-bg);
  --bg-soft: var(--ui-bg-soft);
  --surface: var(--ui-surface);
  --border: var(--ui-border);
  --text: var(--ui-text);
  --muted: var(--ui-muted);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Sora", "Segoe UI", sans-serif;
  background: linear-gradient(145deg, var(--bg), var(--bg-soft));
}

.layout { width: min(980px, calc(100% - 1rem)); margin: 1rem auto; display: grid; gap: 1rem; }

.top,
.game-panel {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 18px;
  padding: 0.9rem;
}

.top { display: grid; gap: 0.45rem; }

h1, #score, .hint { margin: 0; }

#score { color: var(--muted); }
#highscore { margin: 0; color: #bfdbfe; font-size: 0.95rem; }

.game-panel { display: grid; gap: 0.7rem; justify-items: center; }

canvas {
  width: min(96vw, 900px);
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #030711;
}

.hint { color: var(--muted); }

.rotate-notice {
  width: 100%;
  text-align: center;
  border: 1px solid rgba(251, 191, 36, 0.45);
  border-radius: 12px;
  background: rgba(251, 191, 36, 0.12);
  color: #fde68a;
  padding: 0.6rem 0.75rem;
}

.touch-controls {
  display: none;
  gap: 0.6rem;
}

button {
  border: 1px solid rgba(56, 189, 248, 0.5);
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.15);
  color: var(--text);
  padding: 0.5rem 0.9rem;
  cursor: pointer;
}

@media (max-width: 900px) and (pointer: coarse) {
  .touch-controls {
    display: flex;
  }
}
