* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg0: #2a1b3d;
  --bg1: #3d2b54;
  --accent: #ff9e6d;
  --accent2: #ffd1a3;
  --ink: #fff3ea;
  --sub: #c7a9c9;
}

html, body {
  height: 100%;
  background: linear-gradient(180deg, #5a3a6e 0%, var(--bg0) 55%, #1c1230 100%);
  color: var(--ink);
  font-family: "Quicksand", "Apple SD Gothic Neo", "Pretendard", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.topbar {
  position: fixed; top: 0; left: 0; right: 0; height: 44px; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 14px;
  background: linear-gradient(180deg, rgba(28,18,48,.85), rgba(28,18,48,0));
  font-size: 13px; letter-spacing: .3px; font-weight: 600;
}
.topbar .back { color: var(--accent2); text-decoration: none; opacity: .92; }
.topbar .back:hover { opacity: 1; }
.topbar .brand { color: var(--ink); opacity: .85; font-size: 13px; }
.topbar .hs { color: var(--accent); font-size: 12px; }

#stage {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  touch-action: none;
}

canvas#game {
  display: block;
  background: #1c1230;
  box-shadow: 0 18px 50px rgba(0,0,0,.55), 0 0 0 1px rgba(255,209,163,.14);
  border-radius: 16px;
  touch-action: none;
  cursor: pointer;
}

.hint {
  position: fixed; bottom: 14px; left: 0; right: 0; text-align: center;
  font-size: 12px; color: var(--sub); z-index: 20; pointer-events: none;
  text-shadow: 0 1px 3px rgba(0,0,0,.6); transition: opacity 1s;
  padding: 0 18px; font-weight: 500;
}

@media (max-width: 640px) {
  .topbar .brand { display: none; }
}
