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

html, body {
  background: #000;
  color: #fff;
  font-family: "Courier New", ui-monospace, Menlo, monospace;
  height: 100%;
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
}

/* ---- Score band ---- */
#score-band {
  display: flex;
  align-items: flex-end;
  padding: 12px 12px 6px;
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
  height: 44px;
  flex: 0 0 44px;
  color: rgb(255, 84, 41);
}
.score-col { display: flex; flex-direction: column; gap: 1px; }
.score-col.left   { flex: 1; }
.score-col.center { flex: 1; align-items: center; }
.score-col.right  { flex: 1; align-items: flex-end; }
.score-col .label { font-size: 13px; font-weight: bold; }
.score-col .value { font-size: 16px; font-weight: bold; }

/* ---- Maze ---- */
#maze-wrap {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
#maze {
  width: 100%;
  height: auto;
  display: block;
}

/* ---- Lives band ---- */
#lives-band {
  flex: 0 0 26px;
  padding: 3px 18px;
  display: flex;
  align-items: center;
}
#lives { display: flex; gap: 10px; }
.life {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgb(255, 204, 0);
}

/* ---- Divider ---- */
#divider { flex: 0 0 1px; background: rgb(64, 64, 64); }

/* ---- Control bar ---- */
#control-bar {
  flex: 0 0 210px;
  display: flex;
  align-items: center;
  padding: 0 24px;
  background: #000;
}

#start-btn {
  width: 110px;
  height: 52px;
  border: none;
  border-radius: 8px;
  background: rgb(255, 204, 0);
  color: #000;
  font-family: inherit;
  font-size: 15px;
  font-weight: bold;
  transition: transform 0.1s, opacity 0.1s;
}
#start-btn:active { transform: scale(0.94); opacity: 0.85; }
#start-btn.hidden { visibility: hidden; }

#dpad {
  margin-left: auto;
  width: 180px;
  height: 180px;
  touch-action: none;
}
#dpad-svg { display: block; }
#dpad-body { fill: rgb(41, 41, 41); stroke: rgba(255, 255, 255, 0.45); stroke-width: 1.5; }
#dpad polygon { fill: rgb(115, 115, 115); }
#dpad polygon.active { fill: rgb(217, 217, 217); }

/* ---- Sound hint ---- */
#sound-hint {
  position: fixed;
  left: 12px;
  bottom: 12px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.08);
  padding: 6px 10px;
  border-radius: 6px;
}
