* {
  box-sizing: border-box;
  user-select: none;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: #0d1210;
  color: #e6efe9;
  font-family: "Courier New", Consolas, "Meiryo", monospace;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

#wrap {
  position: relative;
  container-type: inline-size;
  width: min(800px, 96vw, calc(96vh * 4 / 3));
  max-height: 96vh;
  aspect-ratio: 4 / 3;
  border: 3px solid #486b5c;
  background: #0b100e;
  box-shadow: 0 14px 48px rgba(0, 0, 0, 0.85);
}

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

#mute-btn {
  position: absolute;
  top: 55.5%;
  right: 3.25%;
  z-index: 5;
  background: rgba(24, 42, 34, 0.85);
  color: #d8ebe0;
  border: 1.5px solid #729c89;
  padding: clamp(2px, 0.5cqw, 4px) clamp(6px, 1.25cqw, 10px);
  font-family: inherit;
  font-size: clamp(9px, 1.5cqw, 12px);
  line-height: 1.2;
  white-space: nowrap;
  font-weight: bold;
  cursor: pointer;
}

#mute-btn:hover {
  background: rgba(45, 75, 62, 0.95);
}

#error-box {
  display: none;
  position: absolute;
  inset: 16px;
  background: rgba(120, 20, 20, 0.95);
  color: #fff;
  padding: 16px;
  font-size: 14px;
  white-space: pre-wrap;
  z-index: 10;
}
