:root{
  --bg: #0b0f16;
  --card: rgba(18, 24, 36, .92);
  --line: rgba(255,255,255,.16);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.70);
  --accent: rgba(120,255,180,.95);
}

*{ box-sizing: border-box; }
html, body{
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", sans-serif;
}

.app{
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar{
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px 8px;
}

.menuBtn{
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 16px;
}

.title .name{
  font-weight: 700;
  font-size: 18px;
  line-height: 1.1;
}
.title .meta{
  margin-top: 2px;
  font-size: 13px;
  color: var(--muted);
}

.stageWrap{
  padding: 10px 12px 14px;
  flex: 1;
  display: flex;
}

.game{
  width: 100%;
  height: min(74vh, 780px);
  border-radius: 14px;
  background: #0b0f16;
  border: 1px solid var(--line);
  touch-action: none; /* pointer drag優先 */
}

.overlay{
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(0,0,0,.35);
}

.overlay.is-hidden{
  display: none;
}

.card{
  width: min(520px, 92vw);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  text-align: center;
}

.ovTitle{
  margin: 8px 0 14px;
  font-size: 20px;
}

.levelRow{
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.lvBtn{
  border: 1px solid var(--line);
  background: rgba(255,255,255,.06);
  color: var(--text);
  border-radius: 16px;
  padding: 14px 10px;
  font-size: 18px;
}

.lvBtn.is-active{
  border-color: rgba(120,255,180,.65);
  box-shadow: 0 0 0 2px rgba(120,255,180,.18) inset;
}

.startBtn{
  width: 100%;
  border: none;
  background: var(--accent);
  color: rgba(0,0,0,.85);
  border-radius: 18px;
  padding: 16px 12px;
  font-size: 22px;
  font-weight: 700;
}

.back-btn a {
	position: absolute;text-decoration: none;
	left: 0px;
	top: 0px;
	display: block;
	background: #ff0000;
	color: #fff;
	font-size: 30px;
	padding: 1rem;
	border-radius: 0px 0px 30px 0px;
	z-index: 10000;
}
