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

:root {
  --bg: #faf8ef;
  --ink: #776e65;
  --accent: #8f7a66;
  --line: #e7e0d4;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: "Clear Sans", "Helvetica Neue", "Apple SD Gothic Neo", "Pretendard", Arial, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  overscroll-behavior: 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(250,248,239,.95), rgba(250,248,239,0));
  font-size: 13px; letter-spacing: .2px; font-weight: 700;
}
.topbar .back { color: var(--accent); text-decoration: none; opacity: .9; }
.topbar .back:hover { opacity: 1; }
.topbar .brand { color: var(--ink); opacity: .85; }
.topbar .hs { color: #bbada0; font-size: 12px; }
.topbar .hs b { color: var(--ink); }

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

canvas#game {
  display: block; width: 100%; height: 100%;
  touch-action: none; cursor: default;
}

.hint {
  position: fixed; bottom: 12px; left: 0; right: 0; text-align: center;
  font-size: 12px; color: #b3a795; z-index: 20; pointer-events: none;
  padding: 0 16px; font-weight: 600; transition: opacity 1s;
}

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